Grail (C++)  1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
DecisionNode.h
1 #ifndef GRAIL_DECISION_NODE_H
2 #define GRAIL_DECISION_NODE_H
3 
4 #include <memory>
5 #include <string>
6 #include <unordered_map>
7 #include <vector>
8 #include "DecisionNodeType.h"
9 
10 namespace grail
11 {
12  namespace simulation
13  {
14  const int decisionTreeMaxDepth = 99999;
15 
19  template <class TDecisionType>
20  struct DecisionNode
21  {
22  virtual ~DecisionNode()
23  {
24  }
25 
26  const virtual TDecisionType* Predict(std::vector<float>& data) const = 0;
27  virtual void Print(std::unordered_map<int, std::string>& columnNames,
28  const std::string& indent = "") const = 0;
29  virtual DecisionNodeType GetNodeType() const = 0;
30  template <class T>
31  friend struct IDecisionTreeSerializer;
32  };
33  }
34 }
35 #endif //GRAIL_DECISION_NODE_H
grail::simulation::IDecisionTreeSerializer
A base class for an object that is passed to Serialize() and Deserialize() methods of DecisionTree....
Definition: DecisionTree.hh:19
grail::simulation::DecisionNode
Class for internal usage. Decision tree node base type.
Definition: DecisionNode.h:20