This is the main class you will use to peform the offline learning process. Assign it to the unit of a SimulatedGame. It will gather properly vectorized data. You get access to this data by methods of this class.
More...
#include <OfflineLearner.hh>
|
class | SimulatedGameThinkingUnit |
|
This is the main class you will use to peform the offline learning process. Assign it to the unit of a SimulatedGame. It will gather properly vectorized data. You get access to this data by methods of this class.
◆ OfflineLearner()
grail::simulation::OfflineLearner::OfflineLearner |
( |
std::unique_ptr< IVectorizer > |
vectorizer | ) |
|
Constructs a new OfflineLearner object.
- Parameters
-
vectorizer | Object that implements the @IVectorizer interface. It will provide the way of gathering data. |
◆ FillSamplesDataset()
void grail::simulation::OfflineLearner::FillSamplesDataset |
( |
UniqueTreeDataset & |
dataset, |
|
|
double |
minFractionOfSimulationsThreshold = 0.7 |
|
) |
| |
Gets data gathered by OfflineLearner and adds it to dataset. Pass the container you want to add data to.
- Parameters
-
dataset | Output dataset to write the data. |
minFractionOfSimulationsThreshold | Threshold that defines which game states will contribute to learning. This value is multiplied by MAX - the number of visits to the starting state, which is equal to the number of training simulations States with at least [minFractionOfSimulationsThreshold * MAX] visits will contribute to learning. |
◆ GetSamplesDataset()
std::unique_ptr< UniqueTreeDataset > grail::simulation::OfflineLearner::GetSamplesDataset |
( |
double |
minFractionOfSimulationsThreshold = 0.7 | ) |
|
Gets data gathered by OfflineLearner in the form of UniqueTreeDataset.
- Parameters
-
minFractionOfSimulationsThreshold | Threshold that defines which game states will contribute to learning. This value is multiplied by MAX - the number of visits to the starting state, which is equal to the number of training simulations States with at least [minFractionOfSimulationsThreshold * MAX] visits will contribute to learning. |
- Returns
The documentation for this class was generated from the following files:
- GrailSimulatedGames/Learning/OfflineLearner.hh
- GrailSimulatedGames/Learning/OfflineLearner.cpp