sdleiF | ||
int genotype | selected genotypeIndex of the currently selected genotype or -1 if no genotype is selected. | |
int group | selected groupIndex of the currently selected group (GenePool). | |
object iterator RO | iterator | |
int size RO | Number of groups | |
snoitcnuF | ||
function addGroup(string name)returns GenePool | Adds a new gene pool. | |
function addPerformanceFromCreature()doesn't return a value | Updates 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 value | Removes all gene pools except the first one. | |
function clearGroup(int index)doesn't return a value | GenePools[group].clear() is more "object oriented" than GenePools.clearGroup(group) | |
function copySelected(int groupindex)doesn't return a value | Copies the selected genotype to another group. | |
function crossoverSelected(int other_index)doesn't return a value | Crossovers 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 value | Removes a gene pool. | |
function deleteOne(int genotype_index)doesn't return a value | Deletes one individual from the gene pool = decreases 'instances' and deletes the genotype if the 'instances' goes to 0. | |
function deleteSelected()doesn't return a value | Deletes selected genotype from the gene pool (uses the selected genotype object). | |
function findGenotype()returns int | Finds 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 int | Finds 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 value | Copies 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 value | Copies 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 int | Gets 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 value | Mutates 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 value | Makes 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 int | Gets random genotype index. | |
function randomLikeThis(float minimum_similarity)returns int | Gets 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 int | Gets 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 int | Gets 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 int | Gets tournament winner genotype. Unrated genotypes (with instances=0) are treated as if they had instances=1 and average fitness. | |
function worst()returns int | Gets the worst (lowest fitness) genotype index. Unrated genotypes (instances=0) are ranked lower than those having at least one instance. |
Global context |