Grail (C++)
1.1.1
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 <memory>
5
#include <vector>
6
#include "C45GameActionCounter.h"
7
8
namespace
grail
9
{
10
namespace
simulation
11
{
12
class
ISimulatedGameAction;
13
struct
DatasetSample;
14
15
class
TreeDataSample
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
#endif //GRAIL_TREE_DATA_SAMPLE_H
grail::simulation::ISimulatedGameAction
Base class for all actions in SimulatedGame. Derive from it for your actions.
Definition:
ISimulatedGameAction.hh:39
grail::simulation::TreeDataSample
Definition:
TreeDataSample.hh:15
grail::simulation::C45GameActionCounter
The whole class should be INTERNAL; part of the private interface.
Definition:
C45GameActionCounter.h:13
GrailSimulatedGames
OfflineLearning
TreeDataSample.hh
Generated by
1.8.17