GEGELATI

Loading...
Searching...
No Matches
mutationParameters.h
1
38#ifndef MUTATION_PARAMETERS_H
39#define MUTATION_PARAMETERS_H
40
41#include <cstddef>
42#include <cstdint>
43
44 namespace Mutator {
48 typedef struct TPGParameters
49 {
50
52 inline static const std::string nbRootsComment =
53 "// Number of root TPGTeams to maintain when populating the "
54 "TPGGraph\n"
55 "// \"nbRoots\" : 100, // Default value";
57 size_t nbRoots = 100;
58
60 inline static const std::string ratioTeamsOverActionsComment =
61 "// Ratio of teams roots over the number of actions roots.\n"
62 "// If set to 1, there will be no action roots, if set to 0, there "
63 "will be no team root.\n"
64 "// \"ratioTeamsOverActions\" : 1.0, // Default value";
68 double ratioTeamsOverActions = 1.0;
69
71 inline static const std::string maxInitOutgoingEdgesComment =
72 "// Maximum number of TPGEdge connected to each TPGTeam of the "
73 "TPGGraph when\n"
74 "// initialized.\n"
75 "// \"maxInitOutgoingEdges\" : 3, // Default value";
78 size_t maxInitOutgoingEdges = 3;
79
81 inline static const std::string pChangeActionClassComment =
82 "// Probablity of changing the action edge by any other action "
83 "edge in the graph\n"
84 "// \"pChangeActionClass\" : 0.1, // Default value";
87 double pChangeActionClass = 0.1;
89 inline static const std::string pActionEdgeDeletionComment =
90 "// Probability of deleting an outgoing ActionEdge of a Action.\n"
91 "// \"pActionEdgeDeletion\" : 0.7, // Default value";
93 double pActionEdgeDeletion = 0.7;
94
96 inline static const std::string pActionEdgeAdditionComment =
97 "// Probability of adding an outgoing Action Edge to a Action.\n"
98 "// \"pActionEdgeAddition\" : 0.7, // Default value";
100 double pActionEdgeAddition = 0.7;
101
103 inline static const std::string pMutateActionProgramComment =
104 "// Probablity of mutation the program on the action edge\n"
105 "// \"pMutateActionProgram\" : 0.1, // Default value";
107 double pMutateActionProgram = 0.1;
108
110 inline static const std::string pSwapActionProgramComment =
111 "// Probablity of swapping two action edge within the same action "
112 "vertex\n"
113 "// \"pSwapActionProgram\" : 0.1, // Default value";
116 double pSwapActionProgram = 0.1;
117
119 inline static const std::string nbActionEdgeInitComment =
120 "// Number of edge per action vertex at initialisation\n"
121 "// \"nbActionEdgeInit\" : 1, // Default value";
123 size_t nbActionEdgeInit = 1;
124
126 inline static const std::string maxOutgoingEdgesComment =
127 "// Maximum number of outgoing edge during TPGGraph mutations.\n"
128 "// \"maxOutgoingEdges\" : 5, // Default value";
130 size_t maxOutgoingEdges = 5;
131
133 inline static const std::string pEdgeDeletionComment =
134 "// Probability of deleting an outgoing Edge of a Team.\n"
135 "// \"pEdgeDeletion\" : 0.7, // Default value";
137 double pEdgeDeletion = 0.7;
138
140 inline static const std::string pEdgeAdditionComment =
141 "// Probability of adding an outgoing Edge to a Team.\n"
142 "// \"pEdgeAddition\" : 0.7, // Default value";
144 double pEdgeAddition = 0.7;
145
147 inline static const std::string pProgramMutationComment =
148 "// Probability of mutating the Program of an outgoing Edge.\n"
149 "// \"pProgramMutation\" : 0.2, // Default value";
151 double pProgramMutation = 0.2;
152
154 inline static const std::string probaContextOverActionProgramComment =
155 "// When an edge is mutate, the choice between action and context "
156 "program is based on this\n"
157 "// \"probaContextOverActionProgram\" : 0.5, // Default value";
160 double probaContextOverActionProgram = 0.5;
161
163 inline static const std::string
164 forceProgramBehaviorChangeOnMutationComment =
165 "// When a Program is mutated, makes sure its behavior is no "
166 "longer the same.\n"
167 "// \"forceProgramBehaviorChangeOnMutation\" : false, // "
168 "Default value";
173 bool forceProgramBehaviorChangeOnMutation = false;
174
176 inline static const std::string pEdgeDestinationChangeComment =
177 "// Probability of changing the destination of an Edge.\n"
178 "// \"pEdgeDestinationChange\" : 0.1, // Default value";
180 double pEdgeDestinationChange = 0.1;
181
183 inline static const std::string pEdgeDestinationIsActionComment =
184 "// Probability of the new destination of an Edge to be an "
185 "Action.\n"
186 "// \"pEdgeDestinationIsAction\" : 0.5, // Default value";
188 double pEdgeDestinationIsAction = 0.5;
189
191 inline static const std::string useActionProgramComment =
192 "// Create action program, instead of using context program to "
193 "select continuous action(s)"
194 ".\n"
195 "// \"useActionProgram\" : false, // Default value";
198 bool useActionProgram = false;
199
201 inline static const std::string useMultiActionProgramComment =
202 "// Create multiple action program, instead of one outputting "
203 "multiple action in a single program"
204 ".\n"
205 "// \"useMultiActionProgram\" : false, // Default value";
208 bool useMultiActionProgram = false;
209
211 inline static const std::string teamAccessAllActionsComment =
212 "// During mutation of a team, setting this parameter to true "
213 "allow a team\n"
214 "//to change destination toward any other actions. If set to "
215 "false, it can only\n"
216 "//change destination toward a root action.\n"
217 "// \"teamAccessAllActions\" : true, // Default value";
221 bool teamAccessAllActions = true;
222
223 } TPGParameters;
224
228 typedef struct ProgramParameters
229 {
231 inline static const std::string maxProgramSizeComment =
232 "// Maximum number of Line within the Program of the TPG.\n"
233 "// \"maxProgramSize\" : 96, // Default value";
235 size_t maxProgramSize = 96;
236
238 inline static const std::string initMinProgramSizeComment =
239 "// Initial minimum number of Line within the Program of the "
240 "TPGGraph.\n"
241 "// \"initMinProgramSize\" : 1, // Default value";
243 size_t initMinProgramSize = 1;
244
246 inline static const std::string initMaxProgramSizeComment =
247 "// Initial maximum number of Line within the Program of the "
248 "TPGGraph.\n"
249 "// \"initMaxProgramSize\" : 10, // Default value";
251 size_t initMaxProgramSize = 10;
252
254 inline static const std::string pDeleteComment =
255 "// Probability of deleting a line of the Program.\n"
256 "// \"pDelete\" : 0.5, // Default value";
258 double pDelete = 0.5;
259
261 inline static const std::string pAddComment =
262 "// Probability of inserting a line in the Program.\n"
263 "// \"pAdd\" : 0.5, // Default value";
265 double pAdd = 0.5;
266
268 inline static const std::string pMutateComment =
269 "// Probability of altering a line of the Program.\n"
270 "// \"pMutate\" : 1.0, // Default value";
272 double pMutate = 1.0;
273
275 inline static const std::string pSwapComment =
276 "// Probability of swapping two lines of the Program.\n"
277 "// \"pSwap\" : 1.0, // Default value";
279 double pSwap = 1.0;
280
282 inline static const std::string pConstantMutationComment =
283 "// Probability of each constant to be mutated.\n"
284 "// \"pConstantMutation\" : 0.5, // Default value";
286 double pConstantMutation = 0.5;
287
289 inline static const std::string pNewProgramComment =
290 "// Probability of creating a new program.\n"
291 "// \"pNewProgram\" : 0.0, // Default value";
293 double pNewProgram = 0.0;
294
296 inline static const std::string minConstValueComment =
297 "// Minimum constant value possible.\n"
298 "// \"minConstValue\" : -1.0, // Default value";
300 double minConstValue = -1.0;
301
303 inline static const std::string maxConstValueComment =
304 "// Maximum constant value possible.\n"
305 "// \"maxConstValue\" : 1.0, // Default value";
307 double maxConstValue = 1.0;
308
309 } ProgramParameters;
310
314 typedef struct MutationParameters
315 {
317 TPGParameters tpg;
319 ProgramParameters prog;
320 } MutationParameters;
321} // namespace Mutator
322
323#endif
Mutator
Definition deterministicRandom.h:44
Mutator::ProgramParameters
struct Mutator::ProgramParameters ProgramParameters
Structure holding all parameters affecting mutations of Program.
Mutator::TPGParameters
struct Mutator::TPGParameters TPGParameters
Structure holding all parameters affecting mutations of TPGGraph.
Mutator::MutationParameters
struct Mutator::MutationParameters MutationParameters
Structure holding all parameters affecting stochastic mutations.
Mutator::MutationParameters
Structure holding all parameters affecting stochastic mutations.
Definition mutationParameters.h:315
Mutator::MutationParameters::prog
ProgramParameters prog
Parameters for ProgramMutator.
Definition mutationParameters.h:319
Mutator::MutationParameters::tpg
TPGParameters tpg
Parameters for TPGMutator.
Definition mutationParameters.h:317
Mutator::ProgramParameters
Structure holding all parameters affecting mutations of Program.
Definition mutationParameters.h:229
Mutator::ProgramParameters::minConstValue
double minConstValue
Minimum constant value possible.
Definition mutationParameters.h:300
Mutator::ProgramParameters::initMinProgramSizeComment
static const std::string initMinProgramSizeComment
JSon comment.
Definition mutationParameters.h:238
Mutator::ProgramParameters::initMaxProgramSize
size_t initMaxProgramSize
Initial maximum number of Line within the Program of the TPGGraph.
Definition mutationParameters.h:251
Mutator::ProgramParameters::pSwapComment
static const std::string pSwapComment
JSon comment.
Definition mutationParameters.h:275
Mutator::ProgramParameters::initMinProgramSize
size_t initMinProgramSize
Initial minimum number of Line within the Program of the TPGGraph.
Definition mutationParameters.h:243
Mutator::ProgramParameters::maxProgramSize
size_t maxProgramSize
Maximum number of Line within the Program of the TPGGraph.
Definition mutationParameters.h:235
Mutator::ProgramParameters::maxProgramSizeComment
static const std::string maxProgramSizeComment
JSon comment.
Definition mutationParameters.h:231
Mutator::ProgramParameters::pDeleteComment
static const std::string pDeleteComment
JSon comment.
Definition mutationParameters.h:254
Mutator::ProgramParameters::pDelete
double pDelete
Probability of deleting a line of the Program.
Definition mutationParameters.h:258
Mutator::ProgramParameters::maxConstValueComment
static const std::string maxConstValueComment
JSon comment.
Definition mutationParameters.h:303
Mutator::ProgramParameters::pConstantMutation
double pConstantMutation
Probability of each constant to be mutated.
Definition mutationParameters.h:286
Mutator::ProgramParameters::pMutate
double pMutate
Probability of altering a line of the Program.
Definition mutationParameters.h:272
Mutator::ProgramParameters::initMaxProgramSizeComment
static const std::string initMaxProgramSizeComment
JSon comment.
Definition mutationParameters.h:246
Mutator::ProgramParameters::pConstantMutationComment
static const std::string pConstantMutationComment
JSon comment.
Definition mutationParameters.h:282
Mutator::ProgramParameters::pSwap
double pSwap
Probability of swapping two lines of the Program.
Definition mutationParameters.h:279
Mutator::ProgramParameters::pNewProgram
double pNewProgram
Probability of creating a new program.
Definition mutationParameters.h:293
Mutator::ProgramParameters::maxConstValue
double maxConstValue
Maximum constant value possible.
Definition mutationParameters.h:307
Mutator::ProgramParameters::pAdd
double pAdd
Probability of inserting a line in the Program.
Definition mutationParameters.h:265
Mutator::ProgramParameters::pMutateComment
static const std::string pMutateComment
JSon comment.
Definition mutationParameters.h:268
Mutator::ProgramParameters::minConstValueComment
static const std::string minConstValueComment
JSon comment.
Definition mutationParameters.h:296
Mutator::ProgramParameters::pAddComment
static const std::string pAddComment
JSon comment.
Definition mutationParameters.h:261
Mutator::ProgramParameters::pNewProgramComment
static const std::string pNewProgramComment
JSon comment.
Definition mutationParameters.h:289
Mutator::TPGParameters
Structure holding all parameters affecting mutations of TPGGraph.
Definition mutationParameters.h:49
Mutator::TPGParameters::useActionProgram
bool useActionProgram
Definition mutationParameters.h:198
Mutator::TPGParameters::pEdgeDeletion
double pEdgeDeletion
Probability of deleting an outgoing TPGEdge of a TPGTeam.
Definition mutationParameters.h:137
Mutator::TPGParameters::pMutateActionProgram
double pMutateActionProgram
Probablity of mutation the program on the action edge.
Definition mutationParameters.h:107
Mutator::TPGParameters::pEdgeDeletionComment
static const std::string pEdgeDeletionComment
JSon comment.
Definition mutationParameters.h:133
Mutator::TPGParameters::pEdgeAddition
double pEdgeAddition
Probability of adding an outgoing TPGEdge to a TPGTeam.
Definition mutationParameters.h:144
Mutator::TPGParameters::nbActionEdgeInit
size_t nbActionEdgeInit
Init each team with one edge per action.
Definition mutationParameters.h:123
Mutator::TPGParameters::pSwapActionProgramComment
static const std::string pSwapActionProgramComment
JSon comment.
Definition mutationParameters.h:110
Mutator::TPGParameters::pSwapActionProgram
double pSwapActionProgram
Definition mutationParameters.h:116
Mutator::TPGParameters::pActionEdgeDeletionComment
static const std::string pActionEdgeDeletionComment
JSon comment.
Definition mutationParameters.h:89
Mutator::TPGParameters::maxInitOutgoingEdges
size_t maxInitOutgoingEdges
Definition mutationParameters.h:78
Mutator::TPGParameters::ratioTeamsOverActionsComment
static const std::string ratioTeamsOverActionsComment
JSon comment.
Definition mutationParameters.h:60
Mutator::TPGParameters::nbRoots
size_t nbRoots
Number of root TPGTeams to maintain when populating the TPGGraph.
Definition mutationParameters.h:57
Mutator::TPGParameters::useMultiActionProgram
bool useMultiActionProgram
Definition mutationParameters.h:208
Mutator::TPGParameters::forceProgramBehaviorChangeOnMutationComment
static const std::string forceProgramBehaviorChangeOnMutationComment
JSon comment.
Definition mutationParameters.h:164
Mutator::TPGParameters::pEdgeAdditionComment
static const std::string pEdgeAdditionComment
JSon comment.
Definition mutationParameters.h:140
Mutator::TPGParameters::pMutateActionProgramComment
static const std::string pMutateActionProgramComment
JSon comment.
Definition mutationParameters.h:103
Mutator::TPGParameters::pEdgeDestinationChangeComment
static const std::string pEdgeDestinationChangeComment
JSon comment.
Definition mutationParameters.h:176
Mutator::TPGParameters::probaContextOverActionProgramComment
static const std::string probaContextOverActionProgramComment
JSon comment.
Definition mutationParameters.h:154
Mutator::TPGParameters::pProgramMutationComment
static const std::string pProgramMutationComment
JSon comment.
Definition mutationParameters.h:147
Mutator::TPGParameters::nbRootsComment
static const std::string nbRootsComment
JSon comment.
Definition mutationParameters.h:52
Mutator::TPGParameters::pEdgeDestinationIsActionComment
static const std::string pEdgeDestinationIsActionComment
JSon comment.
Definition mutationParameters.h:183
Mutator::TPGParameters::forceProgramBehaviorChangeOnMutation
bool forceProgramBehaviorChangeOnMutation
Definition mutationParameters.h:173
Mutator::TPGParameters::pProgramMutation
double pProgramMutation
Probability of mutating the Program of an outgoing TPGEdge.
Definition mutationParameters.h:151
Mutator::TPGParameters::teamAccessAllActionsComment
static const std::string teamAccessAllActionsComment
JSon comment.
Definition mutationParameters.h:211
Mutator::TPGParameters::pActionEdgeDeletion
double pActionEdgeDeletion
Probability of deleting an outgoing TPGEdge of a TPGTeam.
Definition mutationParameters.h:93
Mutator::TPGParameters::teamAccessAllActions
bool teamAccessAllActions
Definition mutationParameters.h:221
Mutator::TPGParameters::pActionEdgeAdditionComment
static const std::string pActionEdgeAdditionComment
JSon comment.
Definition mutationParameters.h:96
Mutator::TPGParameters::maxInitOutgoingEdgesComment
static const std::string maxInitOutgoingEdgesComment
JSon comment.
Definition mutationParameters.h:71
Mutator::TPGParameters::pEdgeDestinationIsAction
double pEdgeDestinationIsAction
Probability of the new destination of a TPGEdge to be a TPGAction.
Definition mutationParameters.h:188
Mutator::TPGParameters::maxOutgoingEdgesComment
static const std::string maxOutgoingEdgesComment
JSon comment.
Definition mutationParameters.h:126
Mutator::TPGParameters::pChangeActionClass
double pChangeActionClass
Definition mutationParameters.h:87
Mutator::TPGParameters::nbActionEdgeInitComment
static const std::string nbActionEdgeInitComment
JSon comment.
Definition mutationParameters.h:119
Mutator::TPGParameters::pActionEdgeAddition
double pActionEdgeAddition
Probability of adding an outgoing TPGEdge to a TPGTeam.
Definition mutationParameters.h:100
Mutator::TPGParameters::useMultiActionProgramComment
static const std::string useMultiActionProgramComment
JSon comment.
Definition mutationParameters.h:201
Mutator::TPGParameters::useActionProgramComment
static const std::string useActionProgramComment
JSon comment.
Definition mutationParameters.h:191
Mutator::TPGParameters::ratioTeamsOverActions
double ratioTeamsOverActions
Definition mutationParameters.h:68
Mutator::TPGParameters::pEdgeDestinationChange
double pEdgeDestinationChange
Probability of changing the destination of a TPGEdge.
Definition mutationParameters.h:180
Mutator::TPGParameters::pChangeActionClassComment
static const std::string pChangeActionClassComment
JSon comment.
Definition mutationParameters.h:81
Mutator::TPGParameters::maxOutgoingEdges
size_t maxOutgoingEdges
Maximum number of outgoing edge during TPGGraph mutations.
Definition mutationParameters.h:130
Mutator::TPGParameters::probaContextOverActionProgram
double probaContextOverActionProgram
Definition mutationParameters.h:160