 |
Grail (C++)
1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
1 #ifndef GRAIL_SIMULATED_GAME_SNAPSHOT_OBSERVER_H
2 #define GRAIL_SIMULATED_GAME_SNAPSHOT_OBSERVER_H
6 #include <unordered_map>
8 #include "SimulatedGameActionMetadata.hh"
9 #include "../GrailData/DebugInfo/SimulatedGamesSnapshots.h"
15 class SimulatedGameThinkingUnit;
16 class SimulatedGameStochasticUnit;
17 class ISimulatedGameAction;
18 class ISimulatedGameUnit;
19 class SimulatedGameNode;
32 void OnGameStart(
const std::vector<std::shared_ptr<SimulatedGameThinkingUnit>>& thinkingUnits,
33 const std::vector<std::shared_ptr<SimulatedGameStochasticUnit>>& stochasticUnits);
34 void OnIterationStart(
size_t iterationNumber);
37 void OnIterationEnd(
const std::vector<float>& scores);
56 std::unordered_map<const ISimulatedGameUnit*, int> idMap = {};
57 bool isInitialized =
false;
58 size_t minIteration = 0;
59 size_t maxIteration = std::numeric_limits<size_t>::max();
60 unsigned long globalIterationIndex = 0;
64 #endif //GRAIL_SIMULATED_GAME_SNAPSHOT_OBSERVER_H
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition: ISimulatedGameAction.hh:39
Definition: SimulatedGamesSnapshots.h:74
size_t GetMinIteration() const
Gets the minimum number of iteration that will be gathered during the debugging.
Definition: SimulatedGameSnapshotObserver.cpp:26
This class should not be visible to developers at all.
Definition: SimulatedGameNode.h:23
SimulatedGameReasonerSnapshot & GetSnapshot()
Returns serialized snapshot of SimulatedGameReasoner.
Definition: SimulatedGameSnapshotObserver.cpp:11
size_t GetMaxIteration() const
Gets the maximum number of iteration that will be gathered during the debugging.
Definition: SimulatedGameSnapshotObserver.cpp:36
void SetMinIteration(size_t iteration)
Sets the minimum number of iteration that will be gathered during the debugging.
Definition: SimulatedGameSnapshotObserver.cpp:21
void SetMaxIteration(size_t iteration)
Sets the maximum number of iteration that will be gathered during the debugging.
Definition: SimulatedGameSnapshotObserver.cpp:31
bool IsInitialized() const
Returns true if the observer is initialized and ready to gather data.
Definition: SimulatedGameSnapshotObserver.cpp:16
Definition: SimulatedGamesSnapshots.h:94
Definition: SimulatedGameSnapshotObserver.h:21
Base class of a unit in the SimulatedGame framework. A unit represents part of the game-state and pef...
Definition: ISimulatedGameUnit.hh:26