Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
SimulatedGameThinkingUnit.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_SIMULATED_GAME_THINKING_UNIT_H
4 #define GRAIL_SIMULATED_GAME_THINKING_UNIT_H
5 
6 #include <memory>
7 #include <vector>
8 #include "ISimulatedGameAction.hh"
9 #include "ISimulatedGameUnit.hh"
10 #include "ISimulatedGameNodeObserver.h"
11 
12 namespace grail
13 {
14 namespace simgames
15 {
16  class SimulatedGameRuntime;
17 
24  {
25  public:
26  virtual ~SimulatedGameThinkingUnit() override;
27  virtual bool IsStochastic() const override final;
28 
32  std::vector<std::shared_ptr<ISimulatedGameNodeObserver>> Observers = {};
33 
34  private:
35  virtual void ObserveNode(const SimulatedGameNode& node) override final;
36 
37  friend class SimulatedGame;
38  };
39 }
40 }
41 
42 #endif //GRAIL_SIMULATED_GAME_THINKING_UNIT_H
grail::simgames::SimulatedGameThinkingUnit::Observers
std::vector< std::shared_ptr< ISimulatedGameNodeObserver > > Observers
Add or remove objects for OfflineLearning. See @OfflineLerner and the OfflineLearning project.
Definition: SimulatedGameThinkingUnit.hh:32
grail::simgames::SimulatedGame
The main interface class for the SimulatedGame reasoner based on the MCTS algorithm....
Definition: SimulatedGame.hh:30
grail::simgames::SimulatedGameThinkingUnit
A base class of a unit related to a rational/intelligent player. MCTS chooses actions for this kind o...
Definition: SimulatedGameThinkingUnit.hh:23
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::SimulatedGameNode
This class should not be visible to developers at all.
Definition: SimulatedGameNode.hh:25