ec.cgp
Class ESSelectionCGP

java.lang.Object
  extended by ec.BreedingSource
      extended by ec.SelectionMethod
          extended by ec.es.ESSelection
              extended by ec.cgp.ESSelectionCGP
All Implemented Interfaces:
ec.Prototype, ec.Setup, ec.util.RandomChoiceChooser, java.io.Serializable, java.lang.Cloneable

public class ESSelectionCGP
extends ec.es.ESSelection

CGP benefits greatly from 'neutrality', the idea that genetic drift yields to diverse individuals having equal fitness. This hacked ESSelection ensures equally-fit individuals are uniformly considered during ES selection.

Author:
David Oranchak, doranchak@gmail.com, http://oranchak.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ec.es.ESSelection
P_ESSELECT
 
Fields inherited from class ec.SelectionMethod
INDS_PRODUCED
 
Fields inherited from class ec.BreedingSource
CHECKBOUNDARY, DEFAULT_PRODUCED, NO_PROBABILITY, P_PROB, probability, UNUSED
 
Constructor Summary
ESSelectionCGP()
           
 
Method Summary
 int produce(int min, int max, int start, int subpopulation, ec.Individual[] inds, ec.EvolutionState state, int thread)
          Produces n individuals from the given subpopulation and puts them into inds[start...start+n-1], where n = Min(Max(q,min),max), where q is the "typical" number of individuals the BreedingSource produces in one shot, and returns n.
 
Methods inherited from class ec.es.ESSelection
defaultBase, prepareToProduce, produce
 
Methods inherited from class ec.SelectionMethod
finishProducing, preparePipeline, produces, typicalIndsProduced
 
Methods inherited from class ec.BreedingSource
clone, getProbability, pickRandom, setProbability, setup, setupProbabilities
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESSelectionCGP

public ESSelectionCGP()
Method Detail

produce

public int produce(int min,
                   int max,
                   int start,
                   int subpopulation,
                   ec.Individual[] inds,
                   ec.EvolutionState state,
                   int thread)
Description copied from class: ec.BreedingSource
Produces n individuals from the given subpopulation and puts them into inds[start...start+n-1], where n = Min(Max(q,min),max), where q is the "typical" number of individuals the BreedingSource produces in one shot, and returns n. max must be >= min, and min must be >= 1. For example, crossover might typically produce two individuals, tournament selection might typically produce a single individual, etc.

Overrides:
produce in class ec.es.ESSelection