GEGELATI
mutationParameters.h
1
37#ifndef MUTATION_PARAMETERS_H
38#define MUTATION_PARAMETERS_H
39
40#include <cstddef>
41
42namespace Mutator {
46 typedef struct TPGParameters
47 {
49 inline static const std::string nbActionsComment =
50 "// Number of TPGAction vertex of the initialized TPGGraph.\n"
51 "// This parameter is generally automatically set by the "
52 "LearningEnvironment.\n"
53 "// /* \"nbActions\" : 0,*/ // Commented by default";
55 size_t nbActions = 0;
56
58 inline static const std::string nbRootsComment =
59 "// Number of root TPGTeams to maintain when populating the "
60 "TPGGraph\n"
61 "// \"nbRoots\" : 100, // Default value";
63 size_t nbRoots = 100;
64
66 inline static const std::string maxInitOutgoingEdgesComment =
67 "// Maximum number of TPGEdge connected to each TPGTeam of the "
68 "TPGGraph when\n"
69 "// initialized.\n"
70 "// \"maxInitOutgoingEdges\" : 3, // Default value";
74
76 inline static const std::string maxOutgoingEdgesComment =
77 "// Maximum number of outgoing edge during TPGGraph mutations.\n"
78 "// \"maxOutgoingEdges\" : 5, // Default value";
80 size_t maxOutgoingEdges = 5;
81
83 inline static const std::string pEdgeDeletionComment =
84 "// Probability of deleting an outgoing Edge of a Team.\n"
85 "// \"pEdgeDeletion\" : 0.7, // Default value";
87 double pEdgeDeletion = 0.7;
88
90 inline static const std::string pEdgeAdditionComment =
91 "// Probability of adding an outgoing Edge to a Team.\n"
92 "// \"pEdgeAddition\" : 0.7, // Default value";
94 double pEdgeAddition = 0.7;
95
97 inline static const std::string pProgramMutationComment =
98 "// Probability of mutating the Program of an outgoing Edge.\n"
99 "// \"pProgramMutation\" : 0.2, // Default value";
101 double pProgramMutation = 0.2;
102
104 inline static const std::string
106 "// When a Program is mutated, makes sure its behavior is no "
107 "longer the same.\n"
108 "// \"forceProgramBehaviorChangeOnMutation\" : false, // "
109 "Default value";
115
117 inline static const std::string pEdgeDestinationChangeComment =
118 "// Probability of changing the destination of an Edge.\n"
119 "// \"pEdgeDestinationChange\" : 0.1, // Default value";
122
124 inline static const std::string pEdgeDestinationIsActionComment =
125 "// Probability of the new destination of an Edge to be an "
126 "Action.\n"
127 "// \"pEdgeDestinationIsAction\" : 0.5, // Default value";
131
135 typedef struct ProgramParameters
136 {
138 inline static const std::string maxProgramSizeComment =
139 "// Maximum number of Line within the Program of the TPG.\n"
140 "// \"maxProgramSize\" : 96, // Default value";
142 size_t maxProgramSize = 96;
143
145 inline static const std::string pDeleteComment =
146 "// Probability of deleting a line of the Program.\n"
147 "// \"pDelete\" : 0.5, // Default value";
149 double pDelete = 0.5;
150
152 inline static const std::string pAddComment =
153 "// Probability of inserting a line in the Program.\n"
154 "// \"pAdd\" : 0.5, // Default value";
156 double pAdd = 0.5;
157
159 inline static const std::string pMutateComment =
160 "// Probability of altering a line of the Program.\n"
161 "// \"pMutate\" : 1.0, // Default value";
163 double pMutate = 1.0;
164
166 inline static const std::string pSwapComment =
167 "// Probability of swapping two lines of the Program.\n"
168 "// \"pSwap\" : 1.0, // Default value";
170 double pSwap = 1.0;
171
173 inline static const std::string pConstantMutationComment =
174 "// Probability of each constant to be mutated.\n"
175 "// \"pConstantMutation\" : 0.5, // Default value";
177 double pConstantMutation = 0.5;
178
180 inline static const std::string minConstValueComment =
181 "// Minimum constant value possible.\n"
182 "// \"minConstValue\" : -10, // Default value";
184 int32_t minConstValue = -100;
185
187 inline static const std::string maxConstValueComment =
188 "// Maximum constant value possible.\n"
189 "// \"maxConstValue\" : 100, // Default value";
191 int32_t maxConstValue = 100;
193
197 typedef struct MutationParameters
198 {
204} // namespace Mutator
205
206#endif
Definition: deterministicRandom.h:44
struct Mutator::ProgramParameters ProgramParameters
Structure holding all parameters affecting mutations of Program.
struct Mutator::TPGParameters TPGParameters
Structure holding all parameters affecting mutations of TPGGraph.
struct Mutator::MutationParameters MutationParameters
Structure holding all parameters affecting stochastic mutations.
Structure holding all parameters affecting stochastic mutations.
Definition: mutationParameters.h:198
ProgramParameters prog
Parameters for ProgramMutator.
Definition: mutationParameters.h:202
TPGParameters tpg
Parameters for TPGMutator.
Definition: mutationParameters.h:200
Structure holding all parameters affecting mutations of Program.
Definition: mutationParameters.h:136
static const std::string pSwapComment
JSon comment.
Definition: mutationParameters.h:166
size_t maxProgramSize
Maximum number of Line within the Program of the TPGGraph.
Definition: mutationParameters.h:142
static const std::string maxProgramSizeComment
JSon comment.
Definition: mutationParameters.h:138
static const std::string pDeleteComment
JSon comment.
Definition: mutationParameters.h:145
double pDelete
Probability of deleting a line of the Program.
Definition: mutationParameters.h:149
static const std::string maxConstValueComment
JSon comment.
Definition: mutationParameters.h:187
double pConstantMutation
Probability of each constant to be mutated.
Definition: mutationParameters.h:177
double pMutate
Probability of altering a line of the Program.
Definition: mutationParameters.h:163
int32_t minConstValue
Minimum constant value possible.
Definition: mutationParameters.h:184
static const std::string pConstantMutationComment
JSon comment.
Definition: mutationParameters.h:173
double pSwap
Probability of swapping two lines of the Program.
Definition: mutationParameters.h:170
double pAdd
Probability of inserting a line in the Program.
Definition: mutationParameters.h:156
static const std::string pMutateComment
JSon comment.
Definition: mutationParameters.h:159
static const std::string minConstValueComment
JSon comment.
Definition: mutationParameters.h:180
int32_t maxConstValue
Maximum constant value possible.
Definition: mutationParameters.h:191
static const std::string pAddComment
JSon comment.
Definition: mutationParameters.h:152
Structure holding all parameters affecting mutations of TPGGraph.
Definition: mutationParameters.h:47
double pEdgeDeletion
Probability of deleting an outgoing TPGEdge of a TPGTeam.
Definition: mutationParameters.h:87
static const std::string pEdgeDeletionComment
JSon comment.
Definition: mutationParameters.h:83
double pEdgeAddition
Probability of adding an outgoing TPGEdge to a TPGTeam.
Definition: mutationParameters.h:94
size_t maxInitOutgoingEdges
Definition: mutationParameters.h:73
size_t nbRoots
Number of root TPGTeams to maintain when populating the TPGGraph.
Definition: mutationParameters.h:63
size_t nbActions
Number of TPGAction vertex of the initialized TPGGraph.
Definition: mutationParameters.h:55
static const std::string forceProgramBehaviorChangeOnMutationComment
JSon comment.
Definition: mutationParameters.h:105
static const std::string pEdgeAdditionComment
JSon comment.
Definition: mutationParameters.h:90
static const std::string pEdgeDestinationChangeComment
JSon comment.
Definition: mutationParameters.h:117
static const std::string pProgramMutationComment
JSon comment.
Definition: mutationParameters.h:97
static const std::string nbRootsComment
JSon comment.
Definition: mutationParameters.h:58
static const std::string pEdgeDestinationIsActionComment
JSon comment.
Definition: mutationParameters.h:124
bool forceProgramBehaviorChangeOnMutation
Definition: mutationParameters.h:114
double pProgramMutation
Probability of mutating the Program of an outgoing TPGEdge.
Definition: mutationParameters.h:101
static const std::string nbActionsComment
JSon comment.
Definition: mutationParameters.h:49
static const std::string maxInitOutgoingEdgesComment
JSon comment.
Definition: mutationParameters.h:66
double pEdgeDestinationIsAction
Probability of the new destination of a TPGEdge to be a TPGAction.
Definition: mutationParameters.h:129
static const std::string maxOutgoingEdgesComment
JSon comment.
Definition: mutationParameters.h:76
double pEdgeDestinationChange
Probability of changing the destination of a TPGEdge.
Definition: mutationParameters.h:121
size_t maxOutgoingEdges
Maximum number of outgoing edge during TPGGraph mutations.
Definition: mutationParameters.h:80