(C++)  1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
PlannerSnapshots.h
1 #ifndef GRAIL_PLANNER_SNAPSHOT_H
2 #define GRAIL_PLANNER_SNAPSHOT_H
3 
4 #include <vector>
5 #include <map>
6 #include <limits>
7 #include <utility>
8 #include <string>
9 
10 namespace grail
11 {
12  namespace planning
13  {
14  class WorldState;
15  class Action;
16  class ParametrizedObject;
17  }
18 
22  {
23  std::string typeName;
24  int objectId = 0;
25 
27  std::map<std::string, std::string> objectData{};
28  };
29 
33  {
34  std::string name{};
35  std::vector<std::string> parametrization{};
36  std::vector<PlannerWorldObjectSnapshot> resultingWorldState{};
37 
38  PlannerActionSnapshot() = default;
39  };
40 
44  {
46  size_t iterationNumber = 0;
47 
49  std::vector<PlannerActionSnapshot> planActions = {};
50 
51  bool goalReached = false;
52 
54  double score = 0;
55  double totalCost = std::numeric_limits<double>::max();
56  PlannerIterationSnapshot(size_t keyIterationIndex);
57  PlannerIterationSnapshot() = default;
58  };
59 
62 
64  {
65  std::vector<PlannerIterationSnapshot> iterations = {};
66 
67  float absoluteTime = 0;
68  float relativeTime = 0;
69  size_t entityId = 0;
70  };
71 }
72 #endif
Definition: PlannerSnapshots.h:33
Definition: PlannerSnapshots.h:44
double score
Heuristic score of the plan.
Definition: PlannerSnapshots.h:54
size_t iterationNumber
The object contains info about iteration with number = IterationNumber.
Definition: PlannerSnapshots.h:46
std::vector< PlannerActionSnapshot > planActions
In the serialized iteration, the plan consists of planActions.
Definition: PlannerSnapshots.h:49
Definition: PlannerSnapshots.h:64
Definition: PlannerSnapshots.h:22
std::map< std::string, std::string > objectData
Internal state of the WorldObject.
Definition: PlannerSnapshots.h:27