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