(C++)  1.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(const planning::Action& action, const planning::WorldState& worldState);
39  PlannerActionSnapshot() = default;
40 
41  private:
42  void AddParametrizedObjectSnapshot(const planning::ParametrizedObject& parametrizedObject,
43  unsigned int objectId, const std::string& objectName);
44  };
45 
49  {
51  size_t iterationNumber = 0;
52 
54  std::vector<PlannerActionSnapshot> planActions = {};
55 
56  bool goalReached = false;
57 
59  double score = 0;
60  double totalCost = std::numeric_limits<double>::max();
61  PlannerIterationSnapshot(size_t keyIterationIndex);
62  PlannerIterationSnapshot() = default;
63  };
64 
67 
69  {
70  std::vector<PlannerIterationSnapshot> iterations = {};
71 
72  float absoluteTime = 0;
73  float relativeTime = 0;
74  size_t entityId = 0;
75  };
76 }
77 #endif
Definition: PlannerSnapshots.h:32
Definition: ParametrizedObject.h:20
Definition: Action.hh:10
Definition: PlannerSnapshots.h:21
Definition: AIEntity.cpp:10
Definition: PlannerSnapshots.h:68
A class representing planner world state.
Definition: WorldState.hh:14
Definition: PlannerSnapshots.h:48