1 #ifndef GRAIL_SIMULATED_GAME_ACTION_H
2 #define GRAIL_SIMULATED_GAME_ACTION_H
4 #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;
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition: ISimulatedGameAction.hh:41
virtual std::string ToString() const
Returns a text representation of an action - used only for printing and debugging purposes.
Definition: ISimulatedGameAction.cpp:12
virtual ISimulatedGameUnit * Apply(ISimulatedGameUnit ¤tUnit, SimulatedGameRuntime &runtimeControl) const =0
Applies the effects of the action and returns the next Unit to make an action.
virtual size_t HashForLearning() const
Definition: ISimulatedGameAction.cpp:22
virtual bool EqualsForLearning(const ISimulatedGameAction &other) const
Definition: ISimulatedGameAction.cpp:27
virtual std::unique_ptr< ISimulatedGameAction > CloneForLearning() const
Definition: ISimulatedGameAction.cpp:17
Base class of a unit in the SimulatedGame framework. A unit represents part of the game-state and pef...
Definition: ISimulatedGameUnit.hh:27
An interface that is used to terminate simulation in MCTS and set scores to players....
Definition: SimulatedGameRuntime.hh:16
Helper that provides a EqualsForLearning() method. Used with ISimulatedGameAction only by OfflineLear...
Definition: ISimulatedGameAction.hh:25
Helper that provides a HashForLearning() method. Used with ISimulatedGameAction only by OfflineLearni...
Definition: ISimulatedGameAction.hh:15