ECF - Documentation (v 1.5)


For a headfirst introduction, see the examples in Tutorial examples – by genotype

  1. In short- an overview (below)
  2. Tutorial examples – by genotype (or “I just want to solve my problem, show me how”)
  3. Evolutionary algorithms in ECF (or “What exactly does it do??”)
  4. Using the parameters (or “Hm, it doesn't work that well, can I make it any better”)
  5. Customizing the Tree genotype (or “Where's GP? I want genetic programming”)
  6. Adding components to ECF (or “I know EC, I just want to use my special genotype/algorithm/whatever, how do I do it”)

In short...

To use ECF, you can combine/parametrize the following components:

The above components are fully configurable without compilation via configuration file. The only element you need to program and define programmatically is the evaluation operator which embodies the fitness function. Once you write the evaluation operator, you only need to reference it in main and then run the ECF. So a typical main function might look like this:

int main(int argc, char **argv)
{
        StateP state (new State);
        state->setEvalOp(new MyEvalOperator);

        state->initialize(argc, argv);
        state->run();
        return 0;
}

while the configuration file might look like this:

<ECF>
  <Algorithm>
    <SteadyStateTournament>
      <Entry key="tsize">3</Entry>
    </SteadyStateTournament>
  </Algorithm>

  <Genotype>
    <BitString>
      <Entry key="size">20</Entry>
    </BitString>
    <Tree>
      <Entry key="functionset">sin cos + - / *</Entry>
      <Entry key="terminalset">X Y</Entry>
    </Tree>
  </Genotype>

  <Registry>
    <Entry key="population.size">30</Entry>
    <Entry key="term.maxgen">100</Entry> 
  </Registry>
</ECF>

Implementation note: each Class in ECF has an associated type ClassP which is a boost smart pointer to an object of that class.
See more information on using boost.