JGAP

examples.gp.monalisa.core
Class InitStrategy

java.lang.Object
  extended by examples.gp.monalisa.core.InitStrategy
All Implemented Interfaces:
java.io.Serializable, IGPInitStrategy

public class InitStrategy
extends java.lang.Object
implements IGPInitStrategy

Initializes GP programs properly when they are created.

Since:
3.4
See Also:
Serialized Form

Constructor Summary
InitStrategy()
           
 
Method Summary
 CommandGene init(IGPChromosome a_chrom, int a_chromNum)
          Initializes a chromosome within a GP program before a random creation of the (rest of the) program is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitStrategy

public InitStrategy()
Method Detail

init

public CommandGene init(IGPChromosome a_chrom,
                        int a_chromNum)
                 throws java.lang.Exception
Initializes a chromosome within a GP program before a random creation of the (rest of the) program is executed.

Specified by:
init in interface IGPInitStrategy
Parameters:
a_chrom - the chromosome within the GP program to create randomly
a_chromNum - index of the chromosome with the GP program
Returns:
the CommandGene to use as first node, or null if random selection
Throws:
java.lang.Exception
Since:
3.4

JGAP