(C++)  1.1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
EvaluationDebugData.h
1 #ifndef GRAIL_EVALUATION_DEBUG_DATA_H
2 #define GRAIL_EVALUATION_DEBUG_DATA_H
3 
4 #include "../UtilityModel/EvaluatorType.h"
5 #include <vector>
6 #include <string>
7 
8 namespace YAML
9 {
10  template<typename DataType>
11  struct convert;
12 }
13 
14 namespace grail
15 {
20  {
21  friend struct YAML::convert<EvaluationDebugData>;
22  public:
29  EvaluationDebugData(EvaluatorType evaluatorType, float score, std::size_t nodeIndex);
30  EvaluationDebugData() = default;
31 
36  void AddChildNode(std::size_t childNodeIndex);
37 
42  EvaluatorType GetEvaluatorType() const;
43 
48  float GetScore() const;
49 
54  std::size_t GetNodeIndex() const;
55 
60  const std::vector<std::size_t>& GetChildNodes() const;
61 
66  const std::string& GetMetadata() const;
67 
68  void SetMetadata(const std::string& newMetadata);
69 
70  private:
71  EvaluatorType evaluatorType{};
72  float score{};
73  std::size_t nodeIndex{};
74  std::vector<std::size_t> childNodes{};
75  std::string metadata{};
76  };
77 }
78 
79 #endif
The EvaluationDebugData class - debug data describing singular evaluator.
Definition: EvaluationDebugData.h:20
float GetScore() const
GetScore - provides output of the evaluator descibed by this debug data.
Definition: EvaluationDebugData.cpp:17
EvaluatorType GetEvaluatorType() const
GetEvaluatorType - provides type of the evalutor described by this debug data.
Definition: EvaluationDebugData.cpp:16
const std::vector< std::size_t > & GetChildNodes() const
GetChildNodes - provides indexes of all nodes attached to this node as children.
Definition: EvaluationDebugData.cpp:19
void AddChildNode(std::size_t childNodeIndex)
AddChildNode - add node as leaf/child to this data node.
Definition: EvaluationDebugData.cpp:11
std::size_t GetNodeIndex() const
GetNodeIndex - provides this nodes position in debug tree.
Definition: EvaluationDebugData.cpp:18
const std::string & GetMetadata() const
GetMetadata - provides a metadata string.
Definition: EvaluationDebugData.cpp:20
Definition: EvaluationDebugData.h:11