GEGELATI

Loading...
Searching...
No Matches
tpgMutator.h
1
37#ifndef TPG_MUTATOR_H
38#define TPG_MUTATOR_H
39
40#include <thread>
41
42#include "archive.h"
43#include "mutator/mutationParameters.h"
44#include "selector/selector.h"
45#include "tpg/tpgGraph.h"
46
47namespace Mutator {
48 namespace TPGMutator {
49
60 const TPG::TPGAction* initActionVertex(
61 TPG::TPGGraph& graph, const Mutator::MutationParameters& params,
62 Mutator::RNG& rng, uint64_t nbActionEdgeInit, uint64_t actionID);
63
93 void initRandomTPG(TPG::TPGGraph& graph,
94 const MutationParameters& params, Mutator::RNG& rng,
95 uint64_t nbAction);
96
105 void removeRandomActionEdge(TPG::TPGGraph& graph,
106 const TPG::TPGAction& action,
107 Mutator::RNG& rng);
108
121 void addRandomActionEdge(TPG::TPGGraph& graph,
122 const TPG::TPGAction& action,
123 const Selector::SelectionContext* context,
124 Mutator::RNG& rng);
125
134 void swapActionEdges(TPG::TPGGraph& graph, const TPG::TPGAction& action,
135 Mutator::RNG& rng);
136
149 void mutateTPGActionEdge(
150 TPG::TPGGraph& graph, const TPG::TPGAction& action,
151 TPG::TPGActionEdge* actionEdge,
152 std::list<std::shared_ptr<Program::Program>>& newPrograms,
153 const Mutator::MutationParameters& params, Mutator::RNG& rng);
154
175 void mutateTPGAction(
176 TPG::TPGGraph& graph, const TPG::TPGAction& action,
177 const Selector::SelectionContext* context,
178 std::list<std::shared_ptr<Program::Program>>& newPrograms,
179 const Mutator::MutationParameters& params, Mutator::RNG& rng);
180
192 void crossProgram(TPG::TPGGraph& graph,
193 std::vector<const TPG::TPGAction*> childs,
194 size_t actionID,
195 const Mutator::MutationParameters& params,
196 Mutator::RNG& rng);
197
208 void crossEdges(TPG::TPGGraph& graph,
209 std::vector<const TPG::TPGAction*> childs,
210 size_t actionID,
211 const Mutator::MutationParameters& params,
212 Mutator::RNG& rng);
213
223 void crossTPGAction(TPG::TPGGraph& graph,
224 std::vector<const TPG::TPGAction*> childs,
225 const Mutator::MutationParameters& params,
226 Mutator::RNG& rng);
227
236 void removeRandomEdge(TPG::TPGGraph& graph, const TPG::TPGTeam& team,
237 Mutator::RNG& rng);
238
259 void addRandomEdge(TPG::TPGGraph& graph, const TPG::TPGTeam& team,
260 const Selector::SelectionContext* context,
261 Mutator::RNG& rng);
262
288 void mutateEdgeDestination(TPG::TPGGraph& graph,
289 const TPG::TPGEdge* edge,
290 const Selector::SelectionContext* context,
291 const Mutator::MutationParameters& params,
292 Mutator::RNG& rng);
293
316 void mutateOutgoingEdge(
317 TPG::TPGGraph& graph, const TPG::TPGEdge* edge,
318 const Selector::SelectionContext* context,
319 std::list<std::shared_ptr<Program::Program>>& newPrograms,
320 const Mutator::MutationParameters& params, Mutator::RNG& rng);
321
349 void mutateTPGTeam(
350 TPG::TPGGraph& graph, const Archive& archive,
351 const TPG::TPGTeam& team, const Selector::SelectionContext* context,
352 std::list<std::shared_ptr<Program::Program>>& newPrograms,
353 const Mutator::MutationParameters& params, Mutator::RNG& rng);
354
365 void mutateProgramBehaviorAgainstArchive(
366 std::shared_ptr<Program::Program>& newProg,
367 const Mutator::MutationParameters& params, const Archive& archive,
368 Mutator::RNG& rng);
369
383 void mutateNewProgramBehaviors(
384 const uint64_t& maxNbThreads,
385 std::list<std::shared_ptr<Program::Program>>& newPrograms,
386 Mutator::RNG& rng, const Mutator::MutationParameters& params,
387 const Archive& archive);
388
420 void populateTPG(
421 TPG::TPGGraph& graph, Selector::Selector& selector,
422 const Archive& archive, const Mutator::MutationParameters& params,
423 Mutator::RNG& rng, uint64_t nbActions,
424 uint64_t maxNbThreads = std::thread::hardware_concurrency());
425 }; // namespace TPGMutator
426}; // namespace Mutator
427
428#endif
Archive
Definition archive.h:80
Mutator::RNG
Definition rng.h:52
Selector::Selector
Abstract class for the selection classes, that will choose which agents survived or not at each gener...
Definition selector.h:20
TPG::TPGActionEdge
Class representing ActionEdges of the Tangled Program Graphs.
Definition tpgActionEdge.h:61
TPG::TPGAction
Class representing an Action of a TPGGraph.
Definition tpgAction.h:55
TPG::TPGEdge
Class representing edges of the Tangled Program Graphs.
Definition tpgEdge.h:54
TPG::TPGGraph
Class for storing a Tangled-Program-Graph.
Definition tpgGraph.h:58
TPG::TPGTeam
Definition tpgTeam.h:49
Mutator
Definition deterministicRandom.h:44
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:333
Selector::SelectionContext
Structure to interface between the selector and the TPGMutator.
Definition selectionContext.h:17