(C++)  1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
TreeDataSample.hh
1 #ifndef GRAIL_TREE_DATA_SAMPLE_H
2 #define GRAIL_TREE_DATA_SAMPLE_H
3 
4 #include "C45GameActionCounter.h"
5 #include <vector>
6 #include <memory>
7 
8 namespace grail
9 {
10  namespace simulation
11  {
12  class ISimulatedGameAction;
13  struct DatasetSample;
14 
16  {
17  public:
18  TreeDataSample(std::vector<float>& initData);
19  TreeDataSample(std::vector<float>& initData, const ISimulatedGameAction* decision);
20 
21  virtual ~TreeDataSample();
22 
23  void AddDecision(const ISimulatedGameAction* decision);
24  std::unique_ptr<DatasetSample> Reduce();
25  const ISimulatedGameAction* GetFirstDecision() const;
26 
27  size_t HashForLearning() const;
28  bool EqualsForLearning(const TreeDataSample& other) const;
29 
30  std::vector<float> data;
31 
32  private:
33  C45GameActionCounter counter;
34 
35  };
36  }
37 }
38 #endif //GRAIL_TREE_DATA_SAMPLE_H
The whole class should be INTERNAL; part of the private interface.
Definition: C45GameActionCounter.h:14
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition: ISimulatedGameAction.hh:41
Definition: TreeDataSample.hh:16