GEGELATI

Loading...
Searching...
No Matches
programMutator.h
1
37#ifndef PROGRAM_MUTATOR_H
38#define PROGRAM_MUTATOR_H
39
40#include "mutator/lineMutator.h"
41#include "mutator/mutationParameters.h"
42#include "program/line.h"
43#include "program/program.h"
44
45 namespace Mutator {
50 namespace ProgramMutator {
51
66 void initRandomProgram(Program::Program& p,
67 const MutationParameters& params,
68 Mutator::RNG& rng);
69
86 bool deleteRandomLine(Program::Program& p, Mutator::RNG& rng);
87
105 void insertRandomLine(Program::Program& p, Mutator::RNG& rng);
106
124 bool swapRandomLines(Program::Program& p, Mutator::RNG& rng);
125
143 bool alterRandomLine(Program::Program& p, Mutator::RNG& rng);
144
162 bool alterRandomConstant(Program::Program& p,
163 const MutationParameters& params,
164 Mutator::RNG& rng);
165
185 bool mutateProgram(Program::Program& p,
186 const MutationParameters& params, Mutator::RNG& rng);
187 }; // namespace ProgramMutator
188}; // namespace Mutator
189
190#endif
Mutator::RNG
Definition rng.h:52
Program::Program
The Program class contains a list of program lines that can be executed within a well defined Environ...
Definition program.h:57
Mutator::ProgramMutator::alterRandomLine
bool alterRandomLine(Program::Program &p, Mutator::RNG &rng)
Alter a randomly selected Line in a given Program.
Definition programMutator.cpp:107
Mutator::ProgramMutator::insertRandomLine
void insertRandomLine(Program::Program &p, Mutator::RNG &rng)
Insert a new Line at a randomly selected position within the given Program.
Definition programMutator.cpp:83
Mutator::ProgramMutator::alterRandomConstant
bool alterRandomConstant(Program::Program &p, const MutationParameters &params, Mutator::RNG &rng)
Alter a program's constant.
Definition programMutator.cpp:119
Mutator::ProgramMutator::initRandomProgram
void initRandomProgram(Program::Program &p, const MutationParameters &params, Mutator::RNG &rng)
(Re)Initialize a program randomly.
Definition programMutator.cpp:42
Mutator::ProgramMutator::deleteRandomLine
bool deleteRandomLine(Program::Program &p, Mutator::RNG &rng)
Deletes a randomly selected Line of the given Program.
Definition programMutator.cpp:70
Mutator::ProgramMutator::mutateProgram
bool mutateProgram(Program::Program &p, const MutationParameters &params, Mutator::RNG &rng)
Mutate the behavior of the Program with given probabilities.
Definition programMutator.cpp:144
Mutator::ProgramMutator::swapRandomLines
bool swapRandomLines(Program::Program &p, Mutator::RNG &rng)
Swap two randomly selected instructions within the given Program.
Definition programMutator.cpp:91
Mutator
Definition deterministicRandom.h:44
Mutator::MutationParameters
Structure holding all parameters affecting stochastic mutations.
Definition mutationParameters.h:315