 |
Grail (C++)
1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
1 #ifndef GRAIL_SIMULATED_GAME_ACTION_H
2 #define GRAIL_SIMULATED_GAME_ACTION_H
7 #include "SimulatedGameRuntime.hh"
16 template <
typename Po
interType>
17 std::size_t operator()(
const PointerType& p)
const
19 return p->HashForLearning();
26 template <
typename Po
interType>
27 bool operator()(
const PointerType& p1,
const PointerType& p2)
const
29 return p1->EqualsForLearning(*p2);
54 virtual std::string
ToString()
const;
72 #endif //GRAIL_SIMULATED_GAME_ACTION_H
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition: ISimulatedGameAction.hh:39
virtual std::string ToString() const
Returns a text representation of an action - used only for printing and debugging purposes.
Definition: ISimulatedGameAction.cpp:11
virtual bool EqualsForLearning(const ISimulatedGameAction &other) const
Definition: ISimulatedGameAction.cpp:26
Helper that provides a EqualsForLearning() method. Used with ISimulatedGameAction only by OfflineLear...
Definition: ISimulatedGameAction.hh:24
Helper that provides a HashForLearning() method. Used with ISimulatedGameAction only by OfflineLearni...
Definition: ISimulatedGameAction.hh:14
virtual std::unique_ptr< ISimulatedGameAction > CloneForLearning() const
Definition: ISimulatedGameAction.cpp:16
virtual size_t HashForLearning() const
Definition: ISimulatedGameAction.cpp:21
virtual ISimulatedGameUnit * Apply(ISimulatedGameUnit ¤tUnit, SimulatedGameRuntime &runtimeControl) const =0
Applies the effects of the action and returns the next Unit to make an action.
An interface that is used to terminate simulation in MCTS and set scores to players....
Definition: SimulatedGameRuntime.hh:15
Base class of a unit in the SimulatedGame framework. A unit represents part of the game-state and pef...
Definition: ISimulatedGameUnit.hh:26