Description Usage Details Fitness functions Response emission functions Get the operant class Stock reinforcement schedule Mutation Fitness weights See Also
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.
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)
|
Stuff.
Computes the fitness of parents.
EBD.wrapped_si_fitnessWrapped 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].
EBD.wrapped_si_fitness( domain, phenotypes, last_resp )
domainA vector specifying the minimum and maximum base 10 values that a behaviour can take.
phenotypesA numeric vector of behaviours in base 10.
Returns a numeric vector of the same length as phenotyes. Indices will match.
############################################################################
Emits a response.
EBD.response_emissionEmits a behaviour.
EBD.response_emission( preallocated_resp_index, n_rft, time, rft_ticks, phenotypes )
preallocated_resp_indexA numeric value.
n_rftNumber of reinforcement that occurred during a session.
timeNumber of time ticks.
rft_ticksDuration of reinforcment delivery.
phenotypesA numeric vector of behaviours in base 10
.
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.
Returns a value selected from phenotyes.
############################################################################
From a behaviour in base 10, get the operant class.
EBD.get_ocGet the operant class
EBD.get_oc( last_resp, oc_lower_bounds )
last_respA numeric value.
oc_lower_boundsLower bounds of the operant classes.
Returns the operant class that the last response belongs in.
############################################################################
Common reinforcement schedules.
EBD.geometric_viA VI schedule with geometrically distributed arranged inter-reinforcement intervals.
EBD.geometric_vi( inter_rft_interval, min_irt, time )
inter_rft_intervalNumeric. In real time.
min_irtMinimum inter-response time, i.e. time ticks for the algorithm.
timeNumeric
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_viA VI schedule with shifted geometrically distributed arranged inter-reinforcement intervals.
EBD.geometric_vi( inter_rft_interval, min_irt, time, shift )
inter_rft_intervalNumeric. In real time.
min_irtMinimum inter-response time, i.e. time ticks for the algorithm.
timeNumeric.
shiftNumeric. In real time.
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.
############################################################################
Mutate behaviours in the population.
EBD.w_gaussian_mutationMutate behaviours my resampling their phenotypes from a wrapped normal distribution.
EBD.w_gaussian_mutation( tick, preallocated_mutant_change, preallocated_mutant_index, max_phenotype, phenotypes )
tickNumeric. The number of iterations of the algorithm.
preallocated_mutant_changeMatrix giving how much each phenotype changes.
preallocated_mutant_indexMatrix giving the phenotypes that will change.
max_phenotypeNumeric. The maximum phenotype value.
phenotypesVector.
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.
Returns a list containing the new phenotype values and the indices to which they belong.
############################################################################
Sampling weights for sampling fitness values.
EBD.geometric_fitness_weightsSampling weights from a geometric distribution
EBD.geometric_fitness_weights( fitness, parental_selection_p )
fitnessNumeric vector of fitness values
parental_selection_pParameter for the geometric distribution
Returns a vector of fitness weights.
############################################################################
CAB.EBD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.