(C++)  1.0.0
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 "DecisionNodeType.h"
5 #include <memory>
6 #include <vector>
7 #include <unordered_map>
8 #include <string>
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 
27  const virtual TDecisionType* Predict(std::vector<float>& data) const = 0;
28  virtual void Print(std::unordered_map<int, std::string>& columnNames, const std::string& indent = "") const = 0;
29  virtual DecisionNodeType GetNodeType() const = 0;
30  template <class T> friend struct IDecisionTreeSerializer;
31  };
32  }
33 }
34 #endif //GRAIL_DECISION_NODE_H
Class for internal usage. Decision tree node base type.
Definition: DecisionNode.h:21
A base class for an object that is passed to Serialize() and Deserialize() methods of DecisionTree....
Definition: IDecisionTreeSerializer.hh:21