4#include "../ECF_base.h"
6#include "../tree/Tree.h"
7#include "../tree/PrimitiveSet.h"
8#include "../tree/Primitive.h"
10#include "../RealValueGenotype.h"
11#include "../floatingpoint/FloatingPointMutSimple.h"
12#include "../floatingpoint/FloatingPointCrsOnePoint.h"
13#include "../floatingpoint/FloatingPointCrsArithmetic.h"
14#include "../floatingpoint/FloatingPointCrsDiscrete.h"
15#include "../floatingpoint/FloatingPointCrsArithmeticSimple.h"
16#include "../floatingpoint/FloatingPointCrsArithmeticSingle.h"
17#include "../floatingpoint/FloatingPointCrsAverage.h"
18#include "../floatingpoint/FloatingPointCrsFlat.h"
19#include "../floatingpoint/FloatingPointCrsBlx.h"
20#include "../floatingpoint/FloatingPointCrsHeuristic.h"
21#include "../floatingpoint/FloatingPointCrsRandom.h"
22#include "../floatingpoint/FloatingPointCrsSbx.h"
23#include "../floatingpoint/FloatingPointCrsBga.h"
24#include "../floatingpoint/FloatingPointCrsLocal.h"
25#include "../floatingpoint/FloatingPointCrsBlxAlpha.h"
26#include "../floatingpoint/FloatingPointCrsBlxAlphaBeta.h"
28#include "PrimitiveSetAP.h"
54 PrimitiveSetAPP primitiveSet;
55 std::vector<PrimitiveP> userFunctions_;
56 std::vector<PrimitiveP> userTerminals_;
60 std::vector<NodeP> nodes;
72 virtual void initializeFirst(
APGenotype* persistent);
74 bool addFunction(PrimitiveP);
75 bool addTerminal(PrimitiveP);
77 void buildTree(std::vector<uint> indices, uint current, uint depth);
79 std::vector<uint> getDiscreteIndices();
80 Tree* convertToPhenotype();
103 std::vector<CrossoverOpP> crx;
125 std::vector<MutationOpP> mut;
130 void setTerminalValue(
Tree* tree, std::string name,
void* value);
132 void write(XMLNode& xFloatingPoint);
133 void read(XMLNode& xFloatingPoint);
138typedef 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.