2#include "SymbRegEvalOp.h"
6int main(
int argc,
char **argv)
8 StateP state (
new State);
13 state->initialize(argc, argv);
16 XMLNode xInd = XMLNode::parseFile(argv[2],
"Individual");
17 IndividualP ind = (IndividualP)
new Individual(state);
19 ind->fitness = state->getEvalOp()->evaluate(ind);
20 std::cout << ind->toString();
22 showTree(output, (
Tree::Tree*) ind->getGenotype().get());
23 std::cout << output << endl;
30 std::vector<IndividualP> hof = state->getHoF()->getBest();
31 IndividualP ind = hof[0];
32 std::cout << ind->toString();
34 showTree(output, (
Tree::Tree*) ind->getGenotype().get());
35 std::cout << output << endl;
Individual class - inherits a vector of Genotype objects.
void read(XMLNode &)
read individual from XML node
State class - backbone of the framework.
Symbolic regression evaluation operator (using AP genotype).
Tree class - implements genotype as a tree.