class.EBD_pop: Evolutionary Behaviour Dynamics population class

Description Usage Details Slots Change the genotype or phenotype in a population References

Description

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).

Usage

1
pop.set(pop, phenotypes, index, genotypes)

Details

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.

Slots

phenotype

A vector of integers.

genotype

A matrix of Booleans. Each column corresponds to a place on the binary string. Each row corresponds to a different behaviour.

info

A list with two elements: size and domain.

name

A name for the population. Inherited from class.elemental.

type

Contains the string "elemental". Inherited from class.elemental.

Change the genotype or phenotype in a population

The pop.set method is available for changing the behaviours in a population.

Usage

pop.set(pop, phenotypes, index, genotypes)

Arguments

pop

A EBD_pop object

phenotypes

A vector of integers

index

A vector of indices for each behaviour to be inserted

genotypes

A matrix of binary strings with each binary string as a column

Notes

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.

References

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


Don-Li/CAB_original documentation built on May 6, 2019, 2:53 p.m.