EBD_sample: Emit a behaviour from an EBD population

Description Usage Arguments Value References See Also

Description

In Evolutionary Behaviour Dynamics (McDowell, 2004), a behaviour is emitted from the algorithm by sampling a behaviour from the population with equal probability. The EBD_sample function is simply a wrapper for the sample function.

Usage

1
EBD_sample(pop, size = 1, replace = T, prob = NULL)

Arguments

pop

A EBD_pop object.

size

An integer specifying the number of behaviours to sample. Defaults to 1.

replace

A logical specifying whether to sample with repalcement. Defaults to TRUE.

prob

A numeric vector specifying the sampling probabilities for each behaviour. Defaults to NULL for equal probabilityies.

Value

Returns a vector of integers sampled from the EBD_pop genotypes.

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

See Also

sample


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