Manages all genotypes in the experiment, organized in one or more groups. Some functions refer to the "selected genotype" i.e. the genotype number "GenotypeLibrary.genotype" in the group number "GenotypeLibrary.group". For example to access the first genoype in the first group you could do:
GenotypeLibrary.group=0; GenotypeLibrary.genotype=0; var name=Genotype.name;
The new preferred way doesn't refer to the static Genotype object:
var name=GenotypeLibrary.getGroup(0).getGenotype(0).name;
| type and name | description | comments |
groupinteger |
selected group | |
groupcountinteger |
Number of groups | |
genotypeinteger |
selected genotype | |
newGenotypefunction |
| make new genotype from the supplied string and select the genotype |
delGenotypefunction |
| remove selected genotype |
del1Genotypefunction |
| remove 1 genotype |
copyGenotypefunction |
| copy selected genotype to another group |
getFromCreaturefunction |
| copy a genotype from current creature |
getFromCreatureObjectfunction |
| copy a genotype from creature object passed in argument |
addPerformanceFromCreaturefunction |
| add performance figures from current creature |
mutatefunction |
| mutate selected genotype |
crossoverfunction |
| crossover selected genotype with other |
worstfunction |
| get worst genotype |
randomfunction |
| get random genotype |
roulettefunction |
| get fitness proportional genotype |
revroulettefunction |
| get reverse fitness proportional genotype |
tournamentfunction |
| get tournament winner genotype |
randomLikeThisfunction |
| get random genotype similar to current one |
likeThisRoulettefunction |
| get random genotype similar to current one, fitness proportional |
findGenotypefunction |
| find a genotype |
findGenotypeForCreaturefunction |
| find a genotype of the current creature |
addGroupfunction |
| add genotype group |
remGroupfunction |
| remove genotype group |
clearfunction |
| |
clearGroupfunction |
| |
getGroupfunction |
| |