Panmictic Population
PanmicticPopulation - specific Population of PanmicticGA based on Array of Chromosome.
V - value of Chromosome
F - fitness value of Chromosome
This population supports:
elitism, see PanmicticConfig.elitism
dynamic change size, see PanmicticEvolveScope.resize. Changing size usually used if the evolutionary strategy involves increasing the population size, see buffer.
Structure of population with PanmicticGA.elitism = 2, size = 9 and buffer = 7:
| EC | EC | C | C | C | C | C | C | C | size ? | ? | ? | ? | ? | ? | ? | maxSize
EC - elite active chromosome
C - active chromosome
? - free space with generated not active chromosome (Be accurate these chromosome can be not evaluated, that's why they '?').
Creates with population functions.
See also
Properties
The best Chromosome in Population by fitness.
The amount of reserved space in a population. Can be immutable for PanmicticPopulation see PanmicticEvolveScope.resize. Usually used if the evolutionary strategy involves increasing the population size.
PopulationFactory for this population. Creates new Chromosome.
Return indices range for Population
True if population is initialized and ready to evolve.
Name of population, default value = DEFAULT_POPULATION_NAME
Current size of population. Can be immutable for PanmicticPopulation see PanmicticEvolveScope.resize.
The worst Chromosome in Population by fitness.
Functions
Override clone method to return PanmicticPopulation
Return clone of Chromosome with index in Population
Creates array with chromosomes copied from Population.
Creates copy of Population as an array by range
Get Chromosome by index
Get population as an array.
Returns true
if the population is empty (contains no chromosomes), false
otherwise.
Creates Array with randomly selected chromosomes from source array
Set Chromosome with index
Set new population.
Sort population (Chromosome is Comparable) in descending order by default.