![]() integer |
selected genotype index of the currently selected genotype or -1 if no genotype is selected |
![]() integer |
selected group index of the currently selected group (gene pool) |
![]() integer |
Number of groups |
![]() doesn't return a value |
function addGroup(string name) add genotype group |
![]() doesn't return a value |
function addPerformanceFromCreature() Updates the current Genotype's performance values merging them with the current Creture's performance. It assumes the Genotype.popsiz has a reasonable value and performs the proper weighting. Use your own function instead if these conditions are not met in your experiment. |
![]() doesn't return a value |
function clear() remove all groups except the first one |
![]() doesn't return a value |
function clearGroup(integer index) |
![]() doesn't return a value |
function copySelected(integer groupindex) copy selected genotype to another group |
![]() doesn't return a value |
function crossoverSelected(integer other_index) Crossover 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. |
![]() doesn't return a value |
function deleteGroup(integer index) remove genotype group |
![]() doesn't return a value |
function deleteOne(integer genotype_index) delete one individual from the gene pool = decrease popsiz and delete the genotype if the popsiz goes to 0 |
![]() doesn't return a value |
function deleteSelected() delete selected genotype from the gene pool (uses the selected genotype object) |
![]() returns integer |
function findGenotype() find a genotype matching the current genotype. It only makes sense when the current genotype is a result of the genetic operator. |
![]() returns integer |
function findGenotypeForCreature() find a genotype matching the selected creature |
![]() returns GenePool |
function get(integer index) |
![]() doesn't return a value |
function getFromCreature() Copy a genotype from the selected creature. The resulting genotype is stored in the static Genotype object detached from the genotype group. |
![]() doesn't return a value |
function getFromCreatureObject(Creature) Copy a genotype from the creature object passed in argument. The resulting genotype is stored in the static Genotype object detached from the genotype group. |
![]() returns integer |
function likeThisRoulette(float minimum_similarity) get random genotype similar to the selected one, fitness proportional |
![]() doesn't return a value |
function mutateSelected() Mutate 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. |
![]() doesn't return a value |
function newGenotype(string genotype) Make the 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) |
![]() returns integer |
function random() get random genotype |
![]() returns integer |
function randomLikeThis(float minimum_similarity) get random genotype similar to the selected one |
![]() returns integer |
function revroulette() get reverse fitness proportional genotype |
![]() returns integer |
function roulette() get fitness proportional genotype |
![]() returns integer |
function tournament(integer genotypes_in_tournament) get tournament winner genotype |
![]() returns integer |
function worst() get worst genotype |
Global context |