Description Usage Details Slots Change the genotype or phenotype in a population References
In Evolutionary Behaviour Dynamics, the organism is represented as a population of behaviours. This represents the domain of behaviours that the organism can emit at a given time. Each behaviour has dual representation as an integer and as a binary string. The integer represents a "phenotype" and the binary string represents a "genotype". The EBD_pop class is for these populations. See McDowell (2004).
1 | pop.set(pop, phenotypes, index, genotypes)
|
Objects of the EBD_pop class have two slots. A vector of integers for the phenotypes and a matrix of binaries for the genotypes. The indices are such that the same index for the genotype vector corresponds to the column of the genotype matrix. In addition, there is a class of info to contain two attributes: the size of the population and a vector containing the domain of integers that can be behaviours.
The underlying implementaiton is that the phenotype and genotype slots contain an environment that contains their respective values. This means that the phenotypes and genotypes can be modified in place.
When the binary strings are specified for vectors in the phenotype matrix, the binary string is reversed. For example, a binary string of length 10 representing the integer "1" would be "100000000" instead of "000000001". This is just because of the way R formats raw objects.
phenotypeA vector of integers.
genotypeA matrix of Booleans. Each column corresponds to a place on the binary string. Each row corresponds to a different behaviour.
infoA list with two elements: size and domain.
nameA name for the population. Inherited from class.elemental.
typeContains the string "elemental". Inherited from class.elemental.
genotype or phenotype in a populationThe pop.set method is available for changing the behaviours in a population.
pop.set(pop, phenotypes, index, genotypes)
popA EBD_pop object
phenotypesA vector of integers
indexA vector of indices for each behaviour to be inserted
genotypesA matrix of binary strings with each binary string as a column
To use the pop.set method, either the genotypes or phenotypes argument must be specified. If the genotypes argument is specified and the phenotypes argument is missing, then the integers contained in the genotypes argument are inserted into the population at the indices specified by index. The associated phenotypes are obtained by converting the integers into binary strings and are inserted into the column that corresponds to the indices. If the phenotypes argument is provided and the genotypes argument is missing, the phenotypes are obtained by converting the genotypes provided and inserting them in the appropriate indices.
McDowell, J. J. (2004). A computational model of selection by consequences. Journal of the Experimental Analysis of Behavior, 81(3), 297–317. https://doi.org/10.1901/jeab.2004.81-297
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.