Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
SimulatedGameActionMetadata.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_SIMULATED_GAME_ACTION_METADATA_H
4 #define GRAIL_SIMULATED_GAME_ACTION_METADATA_H
5 
6 #include <string>
7 
8 namespace grail
9 {
10 namespace simgames
11 {
12  class ISimulatedGameAction;
13 
16  {
23  SimulatedGameActionMetadata(double score, int visits, const ISimulatedGameAction* action);
24 
25  std::string ToString() const;
26 
30  double Score = 0;
31 
36  int Visits = 0;
37 
39  const ISimulatedGameAction* Action = nullptr;
40  };
41 }
42 }
43 #endif //GRAIL_SIMULATED_GAME_ACTION_METADATA_H
grail::planner::Action
Definition: Action.hh:12
grail::simgames::SimulatedGameActionMetadata::Visits
int Visits
The number of times the action has been tested by the MCTS algorithm. The @Score value is an average ...
Definition: SimulatedGameActionMetadata.hh:36
grail::simgames::SimulatedGameActionMetadata::Score
double Score
The average score of performing this action from the perspective of the unit that performed it.
Definition: SimulatedGameActionMetadata.hh:30
grail::simgames::ISimulatedGameAction
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition: ISimulatedGameAction.hh:41
grail::simgames::SimulatedGameActionMetadata::SimulatedGameActionMetadata
SimulatedGameActionMetadata(double score, int visits, const ISimulatedGameAction *action)
Constructs a new SimulatedGameActionMetadata object.
Definition: SimulatedGameActionMetadata.cpp:10
grail::simgames::SimulatedGameActionMetadata
This class represents action defined in the SimulatedGames module with additional statistics (score,...
Definition: SimulatedGameActionMetadata.hh:15