4#include "../../ECF/tree/Tree.h"
5#include "../../ECF/tree/PrimitiveSet.h"
6#include "../../ECF/tree/Primitive.h"
8#include "../../ECF/RealValueGenotype.h"
9#include "../../ECF/floatingpoint/FloatingPointMutSimple.h"
10#include "../../ECF/floatingpoint/FloatingPointCrsOnePoint.h"
11#include "../../ECF/floatingpoint/FloatingPointCrsArithmetic.h"
12#include "../../ECF/floatingpoint/FloatingPointCrsDiscrete.h"
13#include "../../ECF/floatingpoint/FloatingPointCrsArithmeticSimple.h"
14#include "../../ECF/floatingpoint/FloatingPointCrsArithmeticSingle.h"
15#include "../../ECF/floatingpoint/FloatingPointCrsAverage.h"
16#include "../../ECF/floatingpoint/FloatingPointCrsFlat.h"
17#include "../../ECF/floatingpoint/FloatingPointCrsBlx.h"
18#include "../../ECF/floatingpoint/FloatingPointCrsHeuristic.h"
19#include "../../ECF/floatingpoint/FloatingPointCrsRandom.h"
20#include "../../ECF/floatingpoint/FloatingPointCrsSbx.h"
21#include "../../ECF/floatingpoint/FloatingPointCrsBga.h"
22#include "../../ECF/floatingpoint/FloatingPointCrsLocal.h"
23#include "../../ECF/floatingpoint/FloatingPointCrsBlxAlpha.h"
24#include "../../ECF/floatingpoint/FloatingPointCrsBlxAlphaBeta.h"
26#include "PrimitiveSetAP.h"
52 PrimitiveSetAPP primitiveSet;
53 std::vector<PrimitiveP> userFunctions_;
54 std::vector<PrimitiveP> userTerminals_;
58 std::vector<NodeP> nodes;
71 bool addFunction(PrimitiveP);
72 bool addTerminal(PrimitiveP);
74 void buildTree(std::vector<uint> indices, uint current, uint depth);
76 std::vector<uint> getDiscreteIndices();
77 Tree* convertToPhenotype();
100 std::vector<CrossoverOpP> crx;
122 std::vector<MutationOpP> mut;
127 void setTerminalValue(
Tree* tree, std::string name,
void* value);
129 void write(XMLNode& xFloatingPoint);
130 void read(XMLNode& xFloatingPoint);
135typedef boost::shared_ptr<Tree::APGenotype> APGenotypeP;
FloatingPoint genotype: offspring is defined as a linear combination of two vectors.
FloatingPoint genotype: take recombination point k. Child 1 is parent1 until k, rest is arithmetic av...
FloatingPoint genotype: take random allele k. That point is arithmetic average of parents,...
FloatingPoint genotype: child is average value of parent genes.
FloatingPoint genotype: BGA crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: BLX alpha-beta crossover (http://bib.irb.hr/datoteka/640222....
FloatingPoint genotype: BLX alpha crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: allele value for each gene is either from parent1 or from parent2 with equal ...
FloatingPoint genotype: value on allele i is random value taken from min-max interval from parents.
FloatingPoint genotype: value on allele i smaller gene value + rand value * (greater - smaller value)
FloatingPoint genotype: local crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: one point crossover operator with permissible split points only between dimen...
FloatingPoint genotype: SBX crossover (http://citeseerx.ist.psu.edu/viewdoc/download?...
FloatingPoint genotype: simple mutation where a single vector element is mutated. New value is random...
std::string name_
genotype's name
RealValueGenotype class - abstract genotype class for genotypes that represent a vector of real value...
double minValue_
lower bound
double maxValue_
upper bound
Analytical Programing genotype class - implements genotype as a vector of floating point values that ...
void write(XMLNode &xFloatingPoint)
Write genotype data to XMLNode.
std::vector< MutationOpP > getMutationOp()
return usable mut operators
void read(XMLNode &xFloatingPoint)
Read genotype data from XMLNode.
std::vector< CrossoverOpP > getCrossoverOp()
return usable crx operators
double getUBound()
return upper bound of the defined interval
double getLBound()
return lower bound of the defined interval
bool initialize(StateP state)
Initialize a genotype object (read parameters, perform sanity check, build data)
void registerParameters(StateP)
Register genotype's parameters (called before Genotype::initialize)
APGenotype * copy()
Create an identical copy of the genotype object.
Tree class - implements genotype as a tree.