Package ec.gp
Class GPSpecies
java.lang.Object
ec.Species
ec.gp.GPSpecies
- All Implemented Interfaces:
Prototype,Setup,Serializable,Cloneable
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:
-
Field Summary
FieldsFields inherited from class ec.Species
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default base for this prototype.newIndividual(EvolutionState state, int thread) Provides a brand-new individual to fill in a population.newIndividual(EvolutionState state, DataInput dataInput) Provides an individual read from a DataInput source, including the fitness.newIndividual(EvolutionState state, LineNumberReader reader) Provides an individual read from a stream, including the fitness; the individual will appear as it was written by printIndividual(...).voidsetup(EvolutionState state, Parameter base) The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.Methods inherited from class ec.Species
buildMisc, clone, updateIndividual, updateSubpopulation
-
Field Details
-
P_GPSPECIES
- See Also:
-
-
Constructor Details
-
GPSpecies
public GPSpecies()
-
-
Method Details
-
defaultBase
Description copied from interface:PrototypeReturns 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
Description copied from class:SpeciesThe 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. -
newIndividual
Description copied from class:SpeciesProvides a brand-new individual to fill in a population. The default form simply calls clone(), creates a fitness, sets evaluated to false, and sets the species. If you need to make a more custom genotype (as is the case for GPSpecies, which requires a light rather than deep clone), you will need to override this method as you see fit.- Overrides:
newIndividualin classSpecies
-
newIndividual
Description copied from class:SpeciesProvides an individual read from a stream, including the fitness; the individual will appear as it was written by printIndividual(...). Doesn't close the stream. Sets evaluated to false and sets the species. If you need to make a more custom mechanism (as is the case for GPSpecies, which requires a light rather than deep clone), you will need to override this method as you see fit.- Overrides:
newIndividualin classSpecies- Throws:
IOException
-
newIndividual
Description copied from class:SpeciesProvides an individual read from a DataInput source, including the fitness. Doesn't close the DataInput. Sets evaluated to false and sets the species. If you need to make a more custom mechanism (as is the case for GPSpecies, which requires a light rather than deep clone), you will need to override this method as you see fit.- Overrides:
newIndividualin classSpecies- Throws:
IOException
-