Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
ISimulatedGameHeuristic.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_SIMULATED_GAME_HEURISTIC
4 #define GRAIL_SIMULATED_GAME_HEURISTIC
5 
6 #include <memory>
7 
8 namespace grail
9 {
10 namespace simgames
11 {
12  class ISimulatedGameUnit;
13  class ISimulatedGameAction;
14 
21  {
22  public:
23  virtual ~SimulatedGameHeuristic() = default;
24 
26  virtual std::unique_ptr<ISimulatedGameAction> GetAction() const = 0;
27 
33  virtual bool IsHeuristicSituation(const ISimulatedGameUnit& unit) const = 0;
34  };
35 }
36 }
37 #endif //GRAIL_SIMULATED_GAME_HEURISTIC
grail::simgames::SimulatedGameHeuristic::GetAction
virtual std::unique_ptr< ISimulatedGameAction > GetAction() const =0
If @IsHeuristicSituation() function returns true, then this method returns action to be executed.
grail::simgames::SimulatedGameHeuristic::IsHeuristicSituation
virtual bool IsHeuristicSituation(const ISimulatedGameUnit &unit) const =0
This function tests whether the heuristic should apply in the current moment in the game.
grail::simgames::ISimulatedGameUnit
Base class of a unit in the SimulatedGame framework. A unit represents part of the game-state and pef...
Definition: ISimulatedGameUnit.hh:28
grail::simgames::SimulatedGameHeuristic
Interface that encapsulates an algorithm responsible for action-selection inside SimulatedGame (MCTS)...
Definition: ISimulatedGameHeuristic.hh:20