GenePools class, available in: Global contextManages all genotypes in the experiment, organized in one or more groups.
You can iterate directly over GenePool objects in the GenePools collection using for(...in...) loops:
    for(var pool in GenePools) Simulator.print(pool.name);

Before version 4.0rc4, some operations could only be performed on the "selected" genotype (the one pointed to by group/genotype fields in GenePools). Currently, the more convenient and recommended way is to call Genotype's or GenePool's functions that operate directly on the passed objects.

The old way:
    GenePools.newGenotype("X");
    GenePools.mutateSelected();
    Genotype.info="my favorite genotype";
    GenePools.copySelected(0);

Doing the same the new way:
    var g=Genotype.newFromGeno(GenMan.mutate(Geno.newFromString("X")));
    g.info="my favorite genotype";
    g.moveTo(GenePools[0]);
This class has 27 members:
sdleiF
int genotypeselected genotypeIndex of the currently selected genotype or -1 if no genotype is selected.
int groupselected groupIndex of the currently selected group (GenePool).
object iterator ROiterator
int size RONumber of groups
snoitcnuF
function addGroup(string name)returns GenePoolAdds a new gene pool.
function addPerformanceFromCreature()doesn't return a valueUpdates the current Genotype's performance values merging them with the current Creture's performance. It assumes the Genotype.instances has a reasonable value and performs the proper weighting. Use your own function instead if these conditions are not met in your experiment.
function clear()doesn't return a valueRemoves all gene pools except the first one.
function clearGroup(int index)doesn't return a valueGenePools[group].clear() is more "object oriented" than GenePools.clearGroup(group)
function copySelected(int groupindex)doesn't return a valueCopies the selected genotype to another group.
function crossoverSelected(int other_index)doesn't return a valueCrossovers the selected genotype with another one (from the genotype group). The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected.
function deleteGroup(int index)doesn't return a valueRemoves a gene pool.
function deleteOne(int genotype_index)doesn't return a valueDeletes one individual from the gene pool = decreases 'instances' and deletes the genotype if the 'instances' goes to 0.
function deleteSelected()doesn't return a valueDeletes selected genotype from the gene pool (uses the selected genotype object).
function findGenotype()returns intFinds a genotype identical to the currently selected genotype. It is only useful when the currently selected genotype is not on the list of genotypes (for example it is a result of a genetic operator)
Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.
function findGenotypeForCreature()returns intFinds a genotype identical to the genotype of the selected Creature.
Deprecated. Use the more versatile GenePool.findGenotype() instead of this function.
function get(int index)returns GenePool
function getFromCreature()doesn't return a valueCopies a genotype from the selected creature. The resulting genotype is stored in the static Genotype object detached from the genotype group.
function getFromCreatureObject(Creature)doesn't return a valueCopies a genotype from the creature object passed in argument. The resulting genotype is stored in the static Genotype object detached from the genotype group.
function likeThisRoulette(float minimum_similarity)returns intGets a random genotype similar to the selected one, fitness-proportional. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function mutateSelected()doesn't return a valueMutates the selected genotype. The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected.
function newGenotype(string genotype)doesn't return a valueMakes a new genotype from the supplied string and select the genotype. The resulting genotype is stored in the static Genotype object detached from the genotype group. After calling this function GenePools.genotype is -1 indicating that no genotype from the group is selected. (call "copySelected" if you want to add this gentype to the genotype group).
function random()returns intGets random genotype index.
function randomLikeThis(float minimum_similarity)returns intGets a random genotype index similar to the selected one. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function revroulette()returns intGets a randomly selected, reverse fitness-proportional genotype index. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function roulette()returns intGets a randomly selected, fitness-proportional genotype index. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function tournament(int genotypes_in_tournament)returns intGets tournament winner genotype. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness.
function worst()returns intGets the worst (lowest fitness) genotype index. Unrated genotypes (instances=0) are ranked lower than those having at least one instance.
Global context