GenePool class, available in: Global contextGenePool objects are accessed by GenePools[index], or Genotype.genepool and created by GenePools.addGroup(). Usage of the static GenePool object is not recommended.
You can iterate directly over Genotypes in the GenePool using for(...in...) loops:
    for(var genotype in GenePools[0]) Simulator.print(genotype.name);

See also: GenePools
This class has 39 members:
sdleiF
int fitfun0 .. 1 (false/true)
default=0
Scale fitness?Enables fitness scaling.
float fitm0 .. 10
default=2.0
Shift coefficientLower threshold: how many standard deviations below average?
(avg - n * stddev) - used for fitness shifting
float fitma1 .. 10
default=2.0
Scaling coefficientThe best genotype is as many times
better than the average one.
multiline string fitnessFitness formula(For advanced users)
string fitness_allowed_objsFitness formula allowed objectsComma-separated names of object classes allowed in the fitness formula.
int fitness_is_valid RO0 .. 1 (false/true)Fitness formula is valid(valid means can be compiled)
int fitness_step_limit0 .. 1000000000
default=0
Fitness formula step limit(For advanced users)
float fitness_time_limit0 .. 1e+09
default=0.0
Fitness formula time limit(For advanced users)
int genotype_instances ROTotal number of genotype instancesA sum of Genotype.instances values of all Genotypes in this gene pool.
int index ROgene pool index
object iterator ROiterator
string nameGroup name
int size RONumber of genotypesIn standard.expdef, this is equivalent to the number of unique genotypes. Standard experiment definition uses the Genotype.instances field to indicate that some genotypes exist in multiple instances despite having only one item in the group. Other experiment definitions may create multiple copies of the same genotype.
int totalpop ROTotal number of genotype instancesPlease use 'genotype_instances' instead of this field.
snoitcnuF
function add(untyped Geno_object_or_string_genotype)returns GenotypeAdd a genotypeCreates a new Genotype from the supplied Geno or string.
Returns the created Genotype.
function addGeno(Geno)returns GenotypeMake a Genotype from GenoCreates a new Genotype from the supplied Geno object.
Returns the created Genotype.
Deprecated. Use the more versatile GenePool.add() instead of this function.
function best()returns GenotypeReturns the genotype object having the highest fitness. Unrated genotypes (with instances=0) are ranked lower than those having at least one instance.
function clear()doesn't return a valueDelete all genotypes. GenePools[group].clear() is equivalent to GenePools.clearGroup(group)
function createFromGeno(Geno)returns Genotypesame as addGeno (to comply with createFrom... convention)
Deprecated. Use the more versatile GenePool.add() instead of this function.
function createFromString(string genotype)returns GenotypeUses the supplied string argument.
Deprecated. Use the more versatile GenePool.add() instead of this function.
function delete(untyped genotype_object_or_index)doesn't return a valueDeletes a genotype.
function deleteOne(untyped genotype_object_or_index)doesn't return a valueDeletes one individual, i.e. decreases its 'instances' and deletes the genotype if the 'instances' goes to 0.
function findGeno(Geno)returns intFind a Genotype indexFinds the Genotype whose genes are identical to the supplied Geno object.
Returns the Genotype index or -1 if not found.
Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.
function findGenotype(untyped Genotype_object_or_Geno_object_or_string_genotype)returns GenotypeFind a GenotypeFinds the Genotype whose genes are identical to the supplied Genotype object, Geno object, or genotype string.
Returns the Genotype object or null if not found.
function findUID(string uid)returns intFind a Genotype by UID
function get(int index)returns GenotypeGet a Genotype object
function getStatsAvg(string field_name)returns floatget stats averageRetrieves data from stats.* object. Can only be used for fields covered by stats.* (subset of Genotype fields).
function getStatsMax(string field_name)returns floatget stats maximumRetrieves data from stats.* object. Can only be used for fields covered by stats.* (subset of Genotype fields).
function getStatsMin(string field_name)returns floatget stats minimumRetrieves data from stats.* object. Can only be used for fields covered by stats.* (subset of Genotype fields).
function mergeInstances()doesn't return a valueMerge instancesMerges instances of the same genotype.
function random()returns GenotypeReturns a random genotype object disregarding fitness value, but taking into account 'instances'. Unrated genotypes (with instances=0) are treated as if they had instances=1.
function randomLikeGeno(float minimum_similarity, Geno target)returns GenotypeReturns a random genotype index similar to the target genotype. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness. Read about details:
http://www.framsticks.com/bib/Komosinski-et-al-2001
http://www.framsticks.com/bib/Komosinski-and-Kubiak-2011
http://www.framsticks.com/bib/Komosinski-2016
function refreshGUI()doesn't return a valueRefresh GUINotify list content changed
function revroulette()returns GenotypeReturns a randomly selected, reverse fitness-proportional genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function roulette()returns GenotypeReturns a randomly selected, fitness-proportional genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function rouletteLikeGeno(float minimum_similarity, Geno target)returns GenotypeReturns a random genotype similar to the target genotype, fitness-proportional. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness. Read about details:
http://www.framsticks.com/node/795
http://www.framsticks.com/bib/Komosinski-and-Kubiak-2011
http://www.framsticks.com/bib/Komosinski-2016
function splitInstances()doesn't return a valueSplit instancesSplits genotype instances.
function tournament(int genotypes_in_tournament)returns GenotypeReturns a tournament winner genotype object. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function worst()returns GenotypeReturns the genotype object having the lowest fitness. Unrated genotypes (with instances=0) are ranked lower than those having at least one instance.
Global context