Class PBILSpecies
- All Implemented Interfaces:
Prototype,Setup,Serializable,Cloneable
PBILSpecies must be used in combination with PBILBreeder, which will call it at appropriate times to revise the distribution and to generate a new subpopulation of individuals. Since the initial population is built based on the marginal distributions, SimpleInitializer is used to generate the initial population.
PBILSpecies needs the population size and also truncation size. The truncation size which is the 'b' parameter, denotes how many fittest individuals to pick out from the generated population of individuals. It also needs the genome size and the minimum and maximum values of the genes. The size of the range of min and max gene values should be specified for each gene in the parameters file.
PBILSpecies also uses the learning rate 'alpha' based on which it decides the amount of old distribution to be retained and how much of the new distribution to be added. 'alpha' and 'b' values are printed out when running so the user may see what values it used for that given run.
Parameters
| base.alpha Floating-point value ranging from 0 to 1.0 |
(the learning rate parameter) If not provided, this defaults to 0.05. |
| base.popsize Integer > 0 |
(pop.subpop.0.size population size) This parameter must be provided. |
| base.b Integer ranging from 1 to popsize |
(b truncated population size) This parameter must be provided. |
| base.n Integer > 1 |
(n genome size) This parameter must be provided. |
Default Base
eda.pbil.species
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleintstatic final Stringstatic final Stringstatic final StringFields inherited from class ec.vector.IntegerVectorSpecies
C_RANDOM_WALK_MUTATION, C_RESET_MUTATION, maxGene, minGene, mutationIsBounded, mutationType, P_MAXGENE, P_MINGENE, P_MUTATION_BOUNDED, P_MUTATIONTYPE, P_NUM_SEGMENTS, P_RANDOM_WALK_PROBABILITY, P_SEGMENT, P_SEGMENT_END, P_SEGMENT_START, P_SEGMENT_TYPE, randomWalkProbability, V_RANDOM_WALK_MUTATION, V_RESET_MUTATIONFields inherited from class ec.vector.VectorSpecies
C_ANY_POINT, C_GEOMETRIC, C_INTERMED_RECOMB, C_LINE_RECOMB, C_NONE, C_ONE_POINT, C_ONE_POINT_NO_NOP, C_SIMULATED_BINARY, C_TWO_POINT, C_TWO_POINT_NO_NOP, C_UNIFORM, chunksize, crossoverDistributionIndex, crossoverProbability, crossoverType, duplicateRetries, dynamicInitialSize, genomeIncreaseProbability, genomeResizeAlgorithm, genomeSize, lineDistance, maxInitialSize, minInitialSize, mutationProbability, P_CHUNKSIZE, P_CROSSOVER_DISTRIBUTION_INDEX, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_DUPLICATE_RETRIES, P_GENOMESIZE, P_GEOMETRIC_PROBABILITY, P_LINEDISTANCE, P_MUTATIONPROB, P_UNIFORM_MAX, P_UNIFORM_MIN, P_VECTORSPECIES, V_ANY_POINT, V_GEOMETRIC, V_INTERMED_RECOMB, V_LINE_RECOMB, V_ONE_POINT, V_ONE_POINT_NO_NOP, V_SIMULATED_BINARY, V_TWO_POINT, V_TWO_POINT_NO_NOP, V_UNIFORMFields inherited from class ec.Species
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new individual cloned from a prototype, and suitable to begin use in its own evolutionary context.double[]getMarginalDistribution(int gene) newIndividual(EvolutionState state, int thread) Provides a brand-new individual to fill in a population.voidsetup(EvolutionState state, Parameter base) The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities.voidupdateDistribution(EvolutionState state, Subpopulation subpop) Revises the PBIL distribution to reflect the current fitness results in the provided subpopulation.Methods inherited from class ec.vector.IntegerVectorSpecies
inNumericalTypeRange, inNumericalTypeRange, loadParametersForGene, maxGene, minGene, mutationIsBounded, mutationType, randomWalkProbabilityMethods inherited from class ec.vector.VectorSpecies
contains, contains, contains, contains, defaultBase, duplicateRetries, fill, fill, fill, fill, initializeGenomeSegmentsByEndIndices, initializeGenomeSegmentsByStartIndices, mutationProbability, setupGenomeMethods inherited from class ec.Species
buildMisc, newIndividual, newIndividual, updateIndividual, updateSubpopulation
-
Field Details
-
P_PBIL_SPECIES
- See Also:
-
P_ALPHA
- See Also:
-
P_B
- See Also:
-
alpha
public double alpha -
b
public int b
-
-
Constructor Details
-
PBILSpecies
public PBILSpecies()
-
-
Method Details
-
getMarginalDistribution
public double[] getMarginalDistribution(int gene) -
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. -
clone
Description copied from interface:PrototypeCreates a new individual cloned from a prototype, and suitable to begin use in its own evolutionary context.Typically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:
- If you hold objects which are shared with other instances, don't clone them.
- If you hold objects which must be unique, clone them.
- If you hold objects which were given to you as a gesture of kindness, and aren't owned by you, you probably shouldn't clone them.
- DON'T attempt to clone: Singletons, Cliques, or Populations, or Subpopulation.
- Arrays are not cloned automatically; you may need to clone an array if you're not sharing it with other instances. Arrays have the nice feature of being copyable by calling clone() on them.
Implementations.
- If no ancestor of yours implements clone(), and you have no need to do clone deeply, and you are abstract, then you should not declare clone().
- If no ancestor of yours implements clone(),
and you have no need to do clone deeply,
and you are not abstract, then you should implement
it as follows:
public Object clone() { try { return super.clone(); } catch ((CloneNotSupportedException e) { throw new InternalError(); } // never happens } - If no ancestor of yours implements clone(), but you
need to deep-clone some things, then you should implement it
as follows:
public Object clone() { try { MyObject myobj = (MyObject) (super.clone()); // put your deep-cloning code here... } catch ((CloneNotSupportedException e) { throw new InternalError(); } // never happens return myobj; } - If an ancestor has implemented clone(), and you also need
to deep clone some things, then you should implement it as follows:
public Object clone() { MyObject myobj = (MyObject) (super.clone()); // put your deep-cloning code here... return myobj; }
-
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 classVectorSpecies
-
updateDistribution
Revises the PBIL distribution to reflect the current fitness results in the provided subpopulation.
-