EBD_helpers: McDowell's Evolutionary Behaviour Dynamics

Description Usage Details Fitness functions Response emission functions Get the operant class Stock reinforcement schedule Mutation Fitness weights See Also

Description

A list of functions in the CAB package's implementation of McDowell's Evolutionary Behaviour Dynamics. A list of lower level utility functions, such as for converting integers in base 10 to base 2 can be found in EBD_utilities. See CAB.EBD for more details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
EBD_WSI_fitness(max_phenotype, phenotypes, last_resp)

EBD.response_emission(preallocated_resp_index, tick, phenotypes)

EBD.get_oc(last_resp, oc_lower_bounds)

EBD.geometric_vi(inter_rft_interval, min_irt, time)

EBD.w_gaussian_mutation(tick, preallocated_mutant_change,
  preallocated_mutant_index, max_phenotype, phenotypes)

EBD.geometric_fitness_weights(fitness, parental_selection_p)

Details

Stuff.

Fitness functions

Computes the fitness of parents.

EBD.wrapped_si_fitness

Wrapped specific individual fitness. The fitness value of a behaviour is max( |i-k|, m - |i-k| ), where i is the base 10 value of a behaviour in the population, k is the integer value of the reinforced behaviour, and m is the maximum base 10 value that a behaviour can take. It is wrapped because it is modularised around the domain [0,m].

Usage

EBD.wrapped_si_fitness( domain, phenotypes, last_resp )

Arguments

domain

A vector specifying the minimum and maximum base 10 values that a behaviour can take.

phenotypes

A numeric vector of behaviours in base 10.

Value

Returns a numeric vector of the same length as phenotyes. Indices will match.

############################################################################

Response emission functions

Emits a response.

EBD.response_emission

Emits a behaviour.

Usage

EBD.response_emission( preallocated_resp_index, n_rft, time, rft_ticks, phenotypes )

Arguments

preallocated_resp_index

A numeric value.

n_rft

Number of reinforcement that occurred during a session.

time

Number of time ticks.

rft_ticks

Duration of reinforcment delivery.

phenotypes

A numeric vector of behaviours in base 10

.

Details

The way that EBD is implemented in CAB is that the index of the responses are preallocated at the start of the simulation. This reduces the number of function calls to a random number generator and hence improves the speed of the model. The response index is recovered from the number of time ticks that the simulation has been run, time, accounting for the time ticks that were taken up by reinforcement deliveries.

Value

Returns a value selected from phenotyes.

############################################################################

Get the operant class

From a behaviour in base 10, get the operant class.

EBD.get_oc

Get the operant class

Usage

EBD.get_oc( last_resp, oc_lower_bounds )

Arguments

last_resp

A numeric value.

oc_lower_bounds

Lower bounds of the operant classes.

Value

Returns the operant class that the last response belongs in.

############################################################################

Stock reinforcement schedule

Common reinforcement schedules.

EBD.geometric_vi

A VI schedule with geometrically distributed arranged inter-reinforcement intervals.

Usage

EBD.geometric_vi( inter_rft_interval, min_irt, time )

Arguments

inter_rft_interval

Numeric. In real time.

min_irt

Minimum inter-response time, i.e. time ticks for the algorithm.

time

Numeric

Value

Generates a Geometrically distributed inter-reinforcement interval by doing a continuous to discrete transformation of the inter-rft-interval and adds the time to return the time at which food will be available.

EBD.shifted_geometric_vi

A VI schedule with shifted geometrically distributed arranged inter-reinforcement intervals.

Usage

EBD.geometric_vi( inter_rft_interval, min_irt, time, shift )

Arguments

inter_rft_interval

Numeric. In real time.

min_irt

Minimum inter-response time, i.e. time ticks for the algorithm.

time

Numeric.

shift

Numeric. In real time.

Value

Generates a Geometrically distributed inter-reinforcement interval by doing a continuous to discrete transformation of the inter-rft-interval and adds the time to return the time at which food will be available.

############################################################################

Mutation

Mutate behaviours in the population.

EBD.w_gaussian_mutation

Mutate behaviours my resampling their phenotypes from a wrapped normal distribution.

Usage

EBD.w_gaussian_mutation( tick, preallocated_mutant_change, preallocated_mutant_index, max_phenotype, phenotypes )

Arguments

tick

Numeric. The number of iterations of the algorithm.

preallocated_mutant_change

Matrix giving how much each phenotype changes.

preallocated_mutant_index

Matrix giving the phenotypes that will change.

max_phenotype

Numeric. The maximum phenotype value.

phenotypes

Vector.

Details

preallocated_mutant_change is a matrix that has rows the number of iterations to run the algorithm. Each column is the amount to change each phenotype to be mutated on that iteration. preallocated_mutant_index is a matrix of corresponding dimensions. Each column is the index of the phenotype to change.

Value

Returns a list containing the new phenotype values and the indices to which they belong.

############################################################################

Fitness weights

Sampling weights for sampling fitness values.

EBD.geometric_fitness_weights

Sampling weights from a geometric distribution

Usage

EBD.geometric_fitness_weights( fitness, parental_selection_p )

Arguments

fitness

Numeric vector of fitness values

parental_selection_p

Parameter for the geometric distribution

Value

Returns a vector of fitness weights.

############################################################################

See Also

CAB.EBD


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