scale_attraction: Deterministic Attraction Modifier

View source: R/ForageR.R

scale_attractionR Documentation

Deterministic Attraction Modifier

Description

Modifies a vector of attraction values based on the deterministic nature of the choice. When choice determinism is positive, the best choice becomes relatively more attractive.

Usage

scale_attraction(attractions, choice_determinism)

Arguments

attractions

a vector of numerics representing attractiveness of various options

choice_determinism

numeric. At 0, choice probability is directly proportional to attraction. When negative, the choice becomes more random. When positive, better options become relatively more attractive. Absolute values of 1 approach full randomness/determinism

Examples

## Not run: 
x <- seq(0,10,0.1)

plot(x, scale_attraction(x, 0))
lines(x, scale_attraction(x, 0.2), col = "green")
lines(x, scale_attraction(x, 0.5), col = "yellow")
lines(x, scale_attraction(x, 0.9), col = "red")
lines(x, scale_attraction(x, -0.2), col = "green")
lines(x, scale_attraction(x, -0.5), col = "yellow")
lines(x, scale_attraction(x, -0.9), col = "red")

## End(Not run)

aqvining/Foraging-Simulator documentation built on Nov. 19, 2022, 5:43 p.m.