public class FitProportionateSelection extends SelectionMethod
Note: Fitnesses must be non-negative. 0 is assumed to be the worst fitness.
Typical Number of Individuals Produced Per produce(...) call
Always 1.
Default Base
select.fitness-proportionate
Modifier and Type | Field and Description |
---|---|
double[] |
fitnesses
Normalized, totalized fitnesses for the population
|
static java.lang.String |
P_FITNESSPROPORTIONATE
Default base
|
INDS_PRODUCED, KEY_PARENTS
NO_PROBABILITY, P_PROB, probability
Constructor and Description |
---|
FitProportionateSelection() |
Modifier and Type | Method and Description |
---|---|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
void |
finishProducing(EvolutionState s,
int subpopulation,
int thread)
A default version of finishProducing, which does nothing.
|
void |
prepareToProduce(EvolutionState s,
int subpopulation,
int thread)
A default version of prepareToProduce which does nothing.
|
int |
produce(int subpopulation,
EvolutionState state,
int thread)
An alternative form of "produce" special to Selection Methods;
selects an individual from the given subpopulation and
returns its position in that subpopulation.
|
produce, produces, produceWithoutCloning, typicalIndsProduced
clone, fillStubs, getProbability, pickRandom, preparePipeline, setProbability, setup, setupProbabilities
public static final java.lang.String P_FITNESSPROPORTIONATE
public double[] fitnesses
public Parameter defaultBase()
Prototype
public void prepareToProduce(EvolutionState s, int subpopulation, int thread)
SelectionMethod
prepareToProduce
in class SelectionMethod
public int produce(int subpopulation, EvolutionState state, int thread)
SelectionMethod
produce
in class SelectionMethod
public void finishProducing(EvolutionState s, int subpopulation, int thread)
SelectionMethod
finishProducing
in class SelectionMethod