|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.op.crossover.KozaCrossover<TYPE>
public class KozaCrossover<TYPE>
This class implements a Koza style crossover operation on two
CandidatePrograms.
Koza crossover performs a one point exchange with the choice of a swap point being either a function or terminal node with assigned probabilities. This class provides a constructor for specifying a probability of selecting a function swap point. The default constructor uses the typical rates of 90% function node swap point and 10% terminal node swap points.
| Constructor Summary | |
|---|---|
KozaCrossover(GPModel<TYPE> model)
Default constructor for Koza standard crossover. |
|
KozaCrossover(GPModel<TYPE> model,
double functionSwapProbability)
Construct an instance of Koza crossover. |
|
| Method Summary | |
|---|---|
CandidateProgram<TYPE>[] |
crossover(CandidateProgram<TYPE> program1,
CandidateProgram<TYPE> program2)
Crossover the two CandidatePrograms provided as arguments
using Koza crossover. |
void |
onGenerationStart()
Called at the start of each generation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KozaCrossover(GPModel<TYPE> model,
double functionSwapProbability)
functionSwapProbability - The probability of crossover operations
choosing a function node as the swap point.public KozaCrossover(GPModel<TYPE> model)
| Method Detail |
|---|
public CandidateProgram<TYPE>[] crossover(CandidateProgram<TYPE> program1,
CandidateProgram<TYPE> program2)
CandidatePrograms provided as arguments
using Koza crossover. The crossover points will be chosen from the
function or terminal sets with the probability assigned at construction
or the default value of 90% function node.
crossover in interface Crossover<TYPE>program1 - The first CandidateProgram selected to undergo Koza
crossover.program2 - The second CandidateProgram selected to undergo Koza
crossover.
public void onGenerationStart()
GenerationListener
onGenerationStart in interface GenerationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||