ec.gp
Class GPSpecies
java.lang.Object
|
+--ec.Species
|
+--ec.gp.GPSpecies
- All Implemented Interfaces:
- java.lang.Cloneable, GPSpeciesForm, Prototype, java.io.Serializable, Setup
- Direct Known Subclasses:
- GPSteadyStateSpecies
- public class GPSpecies
- extends Species
- implements GPSpeciesForm
GPSpecies is a simple individual which is suitable as a species
for GP subpopulations. GPSpecies' individuals must be GPIndividuals,
and often their pipelines are GPBreedingPipelines (at any rate,
the pipelines will have to return members of GPSpecies!).
Default Base
gp.species
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
P_GPSPECIES
public static final java.lang.String P_GPSPECIES
GPSpecies
public GPSpecies()
defaultBase
public Parameter defaultBase()
- Description copied from interface:
Prototype
- Returns the default base for this prototype.
This should generally be implemented by building off of the static base()
method on the DefaultsForm object for the prototype's package. This should
be callable during setup(...).
setup
public void setup(EvolutionState state,
Parameter base)
- Description copied from class:
Species
- The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.
If your individual prototype might need to know special things about the species (like parameters stored in it),
then when you override this setup method, you'll need to set those parameters BEFORE you call super.setup(...),
because the setup(...) code in Species sets up the prototype.
- Overrides:
setup
in class Species
- Following copied from class:
ec.Species
- See Also:
Prototype.setup(EvolutionState,Parameter)
newIndividual
public Individual newIndividual(EvolutionState state,
Subpopulation _population,
Fitness _fitness)
throws java.lang.CloneNotSupportedException
- Description copied from class:
Species
- override this to provide a brand-new individual to fill in a population. The CloneNotSupportedException permits you to use protoClone() rather than protoCloneSimple(), for efficiency gains. It's assumed that the thread is thread 0.
- Overrides:
newIndividual
in class Species
newIndividual
public Individual newIndividual(EvolutionState state,
Subpopulation _population,
Fitness _fitness,
java.io.LineNumberReader reader)
throws java.io.IOException,
java.lang.CloneNotSupportedException
- Description copied from class:
Species
- Override this to provide an individual read from a file; the individual will
appear as it was written by printIndividual(...). You should read and
set up the fitness as well. Don't close the file.
- Overrides:
newIndividual
in class Species