GEGELATI

Loading...
Searching...
No Matches
Public Attributes | Static Public Attributes | List of all members
Learn::LearningParameters Struct Reference

Structure for simplifying the transmission of LearningParameters to functions. More...

`#include <learningParameters.h>`

## Public Attributes
Mutator::MutationParameters | mutation
Selector::SelectionParameters | selection
size_t | archiveSize = 50
| Number of recordings held in the Archive.
double | archivingProbability = 0.05
| Probability of archiving the result of each Program execution.
uint64_t | nbIterationsPerPolicyEvaluation = 5
| Number of evaluation of each policy per generation.
uint64_t | nbIterationsPerPolicyValidation = 5
| Number of evaluation of each policy per generation for validation.
uint64_t | maxNbActionsPerEval = 1000
uint64_t | nbGenerations = 500
| Number of generations of the training.
size_t | maxNbEvaluationPerPolicy = 1000
size_t | nbRegisters = 8
| Number of registers for the Program execution.
size_t | nbProgramConstant = 0
| Number of Constants available in a program.
size_t | nbThreads = std::thread::hardware_concurrency()
| Number of threads (ParallelLearningAgent only)
std::string | activationFunction = "none"
bool | doValidation = false
uint64_t | stepValidation = 1
| Value to indicate how many generation between each validation step.

## Static Public Attributes
static const std::string | archiveSizeComment
| JSon comment.
static const std::string | archivingProbabilityComment
| JSon comment.
static const std::string | nbIterationsPerPolicyEvaluationComment
| JSon comment.
static const std::string | nbIterationsPerPolicyValidationComment
| JSon comment.
static const std::string | maxNbActionsPerEvalComment
| JSon comment.
static const std::string | nbGenerationsComment
| JSon comment.
static const std::string | maxNbEvaluationPerPolicyComment
| JSon comment.
static const std::string | nbRegistersComment
| JSon comment.
static const std::string | nbProgramConstantComment
| JSon comment.
static const std::string | nbThreadsComment
| JSon comment.
static const std::string | activationFunctionComment
| JSon comment.
static const std::string | doValidationComment
| JSon comment.
static const std::string | stepValidationComment
| JSon comment.

## Detailed Description

Structure for simplifying the transmission of LearningParameters to functions.

When modifying this structure and its comments, you must also update the functions in the ParameterParser namespace.

## Member Data Documentation

## ◆ activationFunction

std::string Learn::LearningParameters::activationFunction = "none"

string that indicate the activation function used for continuous actions

## ◆ activationFunctionComment

const std::string Learn::LearningParameters::activationFunctionComment
| inline static

Initial value:
=
"// string that indicate the activation function used for "
"continuous actions \n"
"// \"activationFunction\" : 'none', // Default value"

JSon comment.

## ◆ archiveSizeComment

const std::string Learn::LearningParameters::archiveSizeComment
| inline static

Initial value:
=
"// Number of recordings held in the Archive.\n"
"// \"archiveSize\" : 50, // Default value"

JSon comment.

## ◆ archivingProbabilityComment

const std::string Learn::LearningParameters::archivingProbabilityComment
| inline static

Initial value:
=
"// Probability of archiving the result of each Program "
"execution.\n"
"// \"archivingProbability\" : 0.05, // Default value"

JSon comment.

## ◆ doValidation

bool Learn::LearningParameters::doValidation = false

Boolean set to true if the user wants a validation after each training, and false otherwise

## ◆ doValidationComment

const std::string Learn::LearningParameters::doValidationComment
| inline static

Initial value:
=
"// Boolean used to activate an evaluation of the surviving roots "
"in validation\n"
"// mode after the training at each generation.\n"
"// \"doValidation\" : false, // Default value"

JSon comment.

## ◆ maxNbActionsPerEval

uint64_t Learn::LearningParameters::maxNbActionsPerEval = 1000

Maximum number of actions performed on the learning environment during the each evaluation of a root

## ◆ maxNbActionsPerEvalComment

const std::string Learn::LearningParameters::maxNbActionsPerEvalComment
| inline static

Initial value:
=
"// Maximum number of actions performed on the learning "
"environment during the\n"
"// each evaluation of a root.\n"
"// \"maxNbActionsPerEval\" : 1000, // Default value"

JSon comment.

## ◆ maxNbEvaluationPerPolicy

size_t Learn::LearningParameters::maxNbEvaluationPerPolicy = 1000

Maximum number of times a given policy (i.e. a root TPGVertex) is evaluated.

## ◆ maxNbEvaluationPerPolicyComment

const std::string Learn::LearningParameters::maxNbEvaluationPerPolicyComment
| inline static

Initial value:
=
"// Maximum number of times a given root is evaluated."
"After this number is\n"
"// reached, possibly after several generations, the score of the "
"root will be\n"
"// fixed, and no further evaluation will be done.\n"
"// \"maxNbEvaluationPerPolicy\" : 1000, // Default value"

JSon comment.

## ◆ mutation

Mutator::MutationParameters Learn::LearningParameters::mutation

MutationParameters for controlling stochastic aspects of the learning process.

## ◆ nbGenerationsComment

const std::string Learn::LearningParameters::nbGenerationsComment
| inline static

Initial value:
=
"// Number of generations of the training.\n"
"// \"nbGenerations\" : 500, // Default value"

JSon comment.

## ◆ nbIterationsPerPolicyEvaluation

uint64_t Learn::LearningParameters::nbIterationsPerPolicyEvaluation = 5

Number of evaluation of each policy per generation.

In LearningAgent and ParallelLearningAgent it is just the number of times the evaluations are repeated (that can produce a more representative result in non-deterministic environments).

## ◆ nbIterationsPerPolicyEvaluationComment

const std::string Learn::LearningParameters::nbIterationsPerPolicyEvaluationComment
| inline static

Initial value:
=
"// Number of evaluation of each root per generation.\n"
"// \"nbIterationsPerPolicyEvaluation\" : 5, // Default value"

JSon comment.

## ◆ nbIterationsPerPolicyValidationComment

const std::string Learn::LearningParameters::nbIterationsPerPolicyValidationComment
| inline static

Initial value:
=
"// Number of evaluation of each root per generation.\n"
"// \"nbIterationsPerPolicyValidation\" : 5, // Default value"

JSon comment.

## ◆ nbProgramConstantComment

const std::string Learn::LearningParameters::nbProgramConstantComment
| inline static

Initial value:
=
"// Number of Constant available in each Program.\n"
"// \"nbProgramConstant\" : 0, // Default value"

JSon comment.

## ◆ nbRegistersComment

const std::string Learn::LearningParameters::nbRegistersComment
| inline static

Initial value:
=
"// Number of registers for the Program execution.\n"
"// \"nbRegisters\" : 8, // Default value"

JSon comment.

## ◆ nbThreads

size_t Learn::LearningParameters::nbThreads = std::thread::hardware_concurrency()

Number of threads (ParallelLearningAgent only)

Integer parameter controlling the number of threads used for parallel execution. Possible values are:

- default : Let the runtime decide using std::thread::hardware_concurrency().
- `0` or `1`: Do not use parallelism.
- `n > 1`: Set the number of threads explicitly.

## ◆ nbThreadsComment

const std::string Learn::LearningParameters::nbThreadsComment
| inline static

Initial value:
=
"// [Only used in ParallelLearningAgent and child classes.]\n"
"// Number of threads used for the training process.\n"
"// When undefined in the json file, this parameter is "
"automatically set to the\n"
"// number of cores of the CPU.\n"
"// /* \"nbThreads\" : 0,*/ // Commented by default"

JSon comment.

## ◆ selection

Selector::SelectionParameters Learn::LearningParameters::selection

SelectionParameters for controlling selection aspects of the learning process.

## ◆ stepValidationComment

const std::string Learn::LearningParameters::stepValidationComment
| inline static

Initial value:
=
"// Value to indicate how many generation between each validation "
"step\n"
"// \"stepValidation\" : 1, // Default value"

JSon comment.

The documentation for this struct was generated from the following file:

- D:/a/gegelati/gegelati/gegelatilib/include/learn/learningParameters.h