ACTRModels.ACTR — TypeACTR <: AbstractACTRAn object representing an ACTR model.
Fields
name="model1": model namedeclarative: declarative memory moduleimaginal: imaginal memory modulevisual: visual modulegoal: goal modulevisual_location: visual location modulevisicon: a vector of VisualObjects available in the taskparms: model parametersscheduler: event scheduler- `rng': random number generator
ACTRModels.ACTR — Methodfunction ACTR(;
name="model1",
declarative=Declarative(),
imaginal=Imaginal(),
goal = Goal(),
scheduler=Scheduler(),
visual=nothing,
visual_location=nothing,
procedural=nothing,
motor=nothing,
visicon=init_visicon(),
parm_type = Parms,
rng = Random.default_rng(),
parms...)A constructor for creating an ACTR model object.
Keywords
name: model namedeclarative: declarative memory moduleimaginal: imaginal memory modulevisual: visual modulegoal: goal modulevisual_location: visual location modulevisicon: a vector of VisualObjects available in the taskparms: model parametersscheduler: event scheduler- `rng': random number generator
Example
using ACTRModels
parms = (noise=true, τ=-1.0)
chunks = [Chunk(;animal=:dog,name=:Sigma), Chunk(;animal=:rat,name=:Bonkers)]
declarative = Declarative(;memory=chunks)
actr = ACTR(;declarative, parms...)ACTRModels.BufferState — TypeBufferState(;busy, error, empty)An object representing the state of the buffer.
Fields
busy=false: busy if trueerror=false: error if trueempty=true: empty if true
ACTRModels.Chunk — TypeChunkAn object representing a declarative memory chunk.
Fields
N=1.0: number of usesL=1.0: lifetime of chunktime_created=0.0: time at which the chunk was createdk=1: number of chunks in recent set (k=1 is sufficient)act=0.0: total activationact_blc=0.0: base level constant component of activationact_bll=0.0: base level learning component of activationact_pm=0.0: partial matching component of activationact_sa=0.0: spreading activation component of activationact_noise=0.0: noise component of activationslots: chunk slot-value pairsreps=0: number of identical chunks. This can be used in simple cases to speed up the code.recent=[0.0]: time stamps for k recent retrievalslags=Float64[]: lags for recent retrievals (L - recent)bl=0.0: baselevel constant added to chunks activation
ACTRModels.Chunk — MethodChunk(dynamic::Bool;
N = 1,
L = 1.0,
time_created = 0.0,
k = 1,
act = 0.0,
recent = [0.0],
reps = 0,
lags = Float64[],
bl = zero(typeof(act)),
slots...)A declarative memory chunk with dynamic slot-value pairs.
Fields
dynamic::Bool: slot-value pairs are mutable if trueN=1.0: number of usesL=1.0: lifetime of chunktime_created=0.0: time at which the chunk was createdk=1: number of chunks in recent set (k=1 is sufficient)act_mean: mean activation computed asact-act_noiseact=0.0: total activation computed asact_mean+act_noiseact_blc=0.0: base level constant component of activationact_bll=0.0: base level learning component of activationact_pm=0.0: partial matching component of activationact_sa=0.0: spreading activation component of activationact_noise=0.0: noise component of activationslots: chunk slot-value pairsreps=0: number of identical chunks. This can be used in simple cases to speed up the code.recent=[0.0]: time stamps for k recent retrievalslags=Float64[]: lags for recent retrievals (L - recent)bl=0.0: baselevel constant added to chunks activation
ACTRModels.Chunk — MethodChunk(;
N = 1,
L = 1.0,
time_created = 0.0,
k = 1,
act = 0.0,
recent = [0.0],
reps = 0,
lags = Float64[],
bl = zero(typeof(act)),
slots...)An object representing a declarative memory chunk.
Keywords
N=1.0: number of usesL=1.0: lifetime of chunktime_created=0.0: time at which the chunk was createdk=1: number of chunks in recent set (k=1 is sufficient)act=0.0: total activationact_blc=0.0: base level constant component of activationact_bll=0.0: base level learning component of activationact_pm=0.0: partial matching component of activationact_sa=0.0: spreading activation component of activationact_noise=0.0: noise component of activationslots: chunk slot-value pairsreps=0: number of identical chunks. This can be used in simple cases to speed up the code.recent=[0.0]: time stamps for k recent retrievalslags=Float64[]: lags for recent retrievals (L - recent)bl=0.0: baselevel constant added to chunks activation
Example
using ACTRModels
chunk = Chunk(; name = :Bonkers, animal = :rat)ACTRModels.Declarative — TypeDeclarative(;memory=, filtered=(:isa,:retrieved))Declarative memory module
Fields
memory=Chunk[]: array of chunksfiltered: slots that must match exactly even when partial matching is on. By default,filtered=(:isa,:retrieved)buffer: an array containing one chunkstate: buffer state
ACTRModels.Goal — TypeGoal(;chunk=Chunk())Goal Module.
Fields
buffer: an array holding up to one chunkstate: buffer state
ACTRModels.Imaginal — TypeImaginal(;buffer=Chunk[], ω=1.0, denoms=Int64[])Imaginal Module.
Fields
buffer: an array holding up to one chunkstate: buffer stateω=1.0: fan weight. Default is 1.denoms=Int64[]: cached value for the denominator of the fan calculation
ACTRModels.Motor — TypeMotor(;chunk=Chunk())Motor Module.
Fields
buffer: an array holding up to one chunkstate: buffer statemouse_position: x,y coordinates of mouse position on screen
ACTRModels.Parms — TypeParms(; kwargs...) -> ParmsACT-R parameters with default values. Default values are overwritten with keyword arguments.
Fields
d=0.5: activation decayτ=0.0: retrieval thresholds=0.2: logistic scalar for activation noise.γ=1.6: maximum associative strengthδ=0.0: mismatch penaltyω=1.0: weight for source of spreading activationblc=0.0: base level constantter=0.0: a constant for encoding and responding timedissim_func: computes dissimilarity between two slot values. Output ranges from 0 (maximally similar) to 1 (maximially dissimilar)sa_fun: a function for spreading activation which requires arguments for actr and chunkutil_mmp_fun: utility mismatch penalty function applied to each conditionlf=1.0:latency factor parameteru0=0.0: initial utility valueσu=.2: standard deviation of utility noiseδu=1.0: mismatch penalty parameter for utilityτu0 = -100: initial value of utility thresholdτu = τu0: utility thresholdu0Δ = 1.0: utility decrementτuΔ = 1.0: utility threshold decrementutility_decrement=1.0: the utility decrement scalar. After each microlapse,utility_decrementis multiplied by u0Δthreshold_decrement=1.0: the threshold decrement scalar. After each microlapse,threshold_decrementis multiplied by τuΔbll=false: base level learning onmmp=false: mismatch penalty onsa=false: spreading activatin onnoise=false: noise onmmp_utility=false: mismatch penalty for procedural memoryutility_noise=false: utility noise for procedural memorytmp=s * √(2): temperature for blendingmisc:NamedTupleof extra parametersfiltered:a list of slots that must absolutely match with mismatch penalty.isaandretrievalare included by default
ACTRModels.Procedural — TypeProceduralProcedural Memory Module object.
Arguments
buffer: an array holding up to one chunkstate: buffer state
ACTRModels.Rule — TypeRule(;utlity=0.0, conditions, action)A production rule object.
Fields
utility=0.0: utility of the production ruleinitial_utility=0.0: initial utilityutility_mean=0.0: mean utilityutility_penalty=0.0: mismatch penalty term for utilityutlity_noise=0.0: utility noiseconditions: a function for checking conditionsaction: a function for performing an actionname: name of production
ACTRModels.Visual — TypeVisual(;chunk=Chunk())Visual Module.
Fields
buffer: an array holding up to one chunkstate: buffer statefocus: coordinates of visual attention
ACTRModels.VisualLocation — TypeVisualLocationVisual Location Module.
Fields
buffer::Array{T1,1}: an array holding up to one chunkstate::B: buffer stateiconic_memory::Array{T1,1}: a temporary memory store for visible objects
ACTRModels.VisualObject — TypeVisualObject(;x=300.0, y=300.0, color=:black, text="", shape=:_, width=30.0, height=30.0)A visible object in a task.
Fields
x: x coordinate of visual object. Default 0.y: y coordinate of visual object. Default 0.color: object colorshape: object shapetext: object textwidth: object widthheight: object height
ACTRModels.add_chunk! — Methodadd_chunk!(actr::AbstractACTR, cur_time=0.0; slots...)Adds new chunk to declarative memory or updates existing chunk with new use
Arguments
actr::AbstractACTR: an ACT-R model objectcur_time=0.0: current simulated time in seconds
Keywords
slots...: optional keyword arguments corresponding to slot-value pairs, e.g. name=:Bob
ACTRModels.add_chunk! — Methodadd_chunk!(actr::AbstractACTR; slots...)Adds new chunk to declarative memory or updates existing chunk with new use. The default time is computed from get_time.
Arguments
actr::AbstractACTR: an ACT-R model object
Keywords
slots...: optional keyword arguments corresponding to slot-value pairs, e.g. name=:Bob
ACTRModels.add_chunk! — Methodadd_chunk!(memory::Declarative, cur_time=0.0; act=0.0, slots...)Adds new chunk to declarative memory or updates existing chunk with new use
Arguments
memory::Declarative: declarative memory objectcur_time=0.0: current simulated time in secondsbl=0.0: baselevel constant for new/updated chunk
Keywords
slots...: optional keyword arguments corresponding to slot-value pairs, e.g. name=:Bob
ACTRModels.add_time! — Methodadd_time!(actr::AbstractACTR, t)Add time to simulation.
Arguments
actr::AbstractACTR: an ACTR model objectt: time in seconds
ACTRModels.add_time! — Methodadd_time!(actr::AbstractACTR, t)Add time to simulation.
Arguments
scheduler: an event schedulert: time in seconds
ACTRModels.blend_chunks — Methodblend_chunks(actr, blended_slots, cur_time; request...)Computes blended value over chunks given a retrieval request. Values are blended over the slots specified in blended_slots. Currently, blended is only supported for numeric slot-values.
Arguments
actr: anACTRmodel objectblended_slots: a set of slots over which slot-values are blendedcur_time: current simulated time
Keywords
request...: optional keywords for the retrieval request
ACTRModels.blend_chunks — Methodblend_chunks(actr::AbstractACTR, blended_slots; request...)Computes blended value over chunks given a retrieval request. By default, values are blended over the set of slots formed by the set difference between all slots of a chunk and the slots specified in the retrieval request. The default time used in activation calculations is taken from get_time(actr). Currently, blended is only supported for numeric slot-values.
Arguments
actr::AbstractACTR: anACTRmodel objectblended_slots: a set of slots over which slot-values are blended
Keywords
request...: optional keywords for the retrieval request
ACTRModels.blended_activation — Methodblended_activation(chunks)Computes a blended activation value by exponentiating, summing and taking the log of activations across a set of chunks.
Arguments
chunks: a set of chunks over which slot-values are blended
ACTRModels.compute_RT — Methodcompute_RT(actr::AbstractACTR, chunk::AbstractChunk)Generates a reaction time for retrieving a chunk based on the current activation levels of a chunk.
Arguments
actr::AbstractACTR: ACTR objectchunk::AbstractChunk: a chunk
ACTRModels.compute_RT — Methodcompute_RT(actr, chunk)Generates a reaction time for retrieving a chunk based on the current activation levels of a chunk. If the vector is empty, time for a retrieval failure is returned.
Arguments
actr: ACTR objectchunk: a vector that is empty or contains one chunk
ACTRModels.compute_RT — Methodcompute_RT(blended_act)Computes retrieval time for a given blended activation value.
Arguments
blended_act: a blended activation value
ACTRModels.compute_activation! — Methodcompute_activation!(actr, chunk::AbstractChunk, cur_time; request...)Computes the activation of a chunk
Arguments
actr: actr objectchunk::AbstractChunk: a chunk.cur_time: current simulated time in seconds
Keywords
request...: optional keywords for the retrieval request
ACTRModels.compute_activation! — Methodcompute_activation!(actr, chunk::AbstractChunk; request...)Computes the activation of a chunk. By default, current time is computed with get_time.
Arguments
actr: actr objectchunk::AbstractChunk: a chunk.
Keywords
request...: optional keywords for the retrieval request
ACTRModels.compute_activation! — Methodcompute_activation!(actr::AbstractACTR, cur_time::Float64; request...)Computes the activation of all chunks in declarative memory
Arguments
actr::AbstractACTR: anACTRobjectcur_time: current simulated time in seconds
Keywords
request...: optional keywords for the retrieval request
ACTRModels.compute_activation! — Methodcompute_activation!(actr::AbstractACTR, chunks::Vector{<:Chunk}, cur_time::Float64; request...)Computes the activation of a vector of chunks
Arguments
actr::AbstractACTR: anACTRobjectchunks::Vector{<:Chunk}: a vector of chunks.cur_time::Float64: current simulated time in seconds
Keywords
request...: optional keywords for the retrieval request
ACTRModels.compute_activation! — Methodcompute_activation!(actr::AbstractACTR, chunks::Vector{<:Chunk}; request...)Computes the activation of a vector of chunks. By default, current time is computed with get_time.
Arguments
actr::AbstractACTR: anACTRobjectchunks::Vector{<:Chunk}: a vector of chunks.
Keywords
request...: optional keywords for the retrieval request
ACTRModels.compute_activation! — Methodcompute_activation!(actr::AbstractACTR; request...)Computes the activation of all chunks in declarative memory. By default, current time is computed with get_time.
Arguments
actr::AbstractACTR: anACTRobject
Keywords
request...: optional keywords for the retrieval request
ACTRModels.find_index — Methodfind_index(actr::ACTR, funs...; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
actr: ACTR objectfuns: a set of functions
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=cat)]
find_index(chunks; animal=:dog)ACTRModels.find_index — Methodfind_index(chunks::Array{<:Chunk,1}, funs...; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
chunks: an array of chunksfuns: a set of functionscriteria: a set of keyword arguments for slot-value pairs
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
chunks = [Chunk(animal=:dog), Chunk(animal=cat)]
find_index(chunks; animal=:dog)ACTRModels.find_index — Methodfind_index(chunks::Array{<:Chunk,1}; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
chunks: an array of chunks
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=cat)]
find_index(chunks; animal=:dog)ACTRModels.find_indices — Methodfind_indices(actr::ACTR, funs...; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
actr: an ACTR objectfuns: a set of functions
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=:dog), Chunk(animal=cat)]
find_indices(chunks; animal=:dog)ACTRModels.find_indices — Methodfind_indices(actr::ACTR; check_value = true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
actr: an ACTR objectcriteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=:dog), Chunk(animal=cat)]
find_indices(chunks; animal=:dog)ACTRModels.find_indices — Methodfind_indices(chunks::Array{<:Chunk,1}, funs...; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria.
Arguments
chunks: an array of chunksfuns: a set of functions
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=:dog), Chunk(animal=cat)]
find_indices(chunks; animal=:dog)ACTRModels.find_indices — Methodfind_indices(chunks::Array{<:Chunk,1}; check_value=true, criteria...)Returns the index of first chunk that matches a set of criteria
Arguments
chunks: an array of chunks
Keywords
check_value=true:criteria: a set of keyword arguments for slot-value pairs
Example
chunks = [Chunk(animal=:dog), Chunk(animal=:dog), Chunk(animal=cat)]
find_indices(chunks; animal=:dog)ACTRModels.first_chunk — Methodfirst_chunk(actr::AbstractACTR; check_value=true, criteria...)Returns the first chunk in memory that matches a set of criteria
Arguments
actr::AbstractACTR: an ACT-R model object
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.first_chunk — Methodfirst_chunk(d::Declarative; criteria...)Returns the first chunk in memory that matches a set of criteria
Arguments
d::Declarative: a declarative memory object
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.first_chunk — Methodfirst_chunk(memory::Vector{<:Chunk}; check_value=true, criteria...)Returns the first chunk in memory that matches a set of criteria
Arguments
memory::Vector{<:Chunk}: a vector of chunks
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_buffer — Methodget_buffer(actr, m)Returns posterior predictive distribution and optionally applies function to samples on each replication
Arguments
actr: an ACTR objectm: name of module as a symbol
Example
get_buffer(actr, :imaginal)ACTRModels.get_chunks — Methodget_chunks(actr::AbstractACTR, funs...; check_value=true, criteria...)Returns all chunks that matches a set criteria using funs... as matching functions.
Arguments
actr::AbstractACTR: an ACT-R model objectfuns...: a list of functions
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_chunks — Methodget_chunks(actr::AbstractACTR; check_value=true, criteria...)Returns all chunks that matches a set criteria
Arguments
actr::AbstractACTR: an ACTR Object
#Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_chunks — Methodget_chunks(d::Declarative, funs...; check_value=true, criteria...)Returns all chunks that matches a set criteria using funs... as matching functions
Arguments
d::Declarative: declarative memory objectfuns...: a list of functions
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_chunks — Methodget_chunks(d::Declarative; check_value=true, criteria...)Returns all chunks that matches a set criteria.
Arguments
d::Declarative: declarative memory object
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_chunks — Methodget_chunks(memory::Vector{<:AbstractChunk}, funs...; check_value=true, criteria...)Returns all chunks that matches a set criteria which are evaluted according to the list of functions in funs.
Arguments
memory::Vector{<:AbstractChunk}: vector of chunk objectsfuns...: a list of functions
Keywords
check_value=true: check slot valuecriteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_chunks — Methodget_chunks(memory::Vector{<:AbstractChunk}; check_value=true, criteria...)Returns all chunks that matches a set criteria.
Arguments
memory::Vector{<:AbstractChunk}: vector of chunk objects
Keywords
check_value=true: check slot value
-criteria...: optional keyword arguments corresponding to critiria for matching chunk
ACTRModels.get_iconic_memory — Methodget_iconic_memory(actr)Returns array of chunks or visual objects representing iconic memory
Arguments
actr: an ACTR object
ACTRModels.get_mean_activations — Methodget_mean_activations(actr::AbstractACTR)Returns a vector of mean activations i.e. activation without noise
Arguments
actr::AbstractACTR: an ACTR object
ACTRModels.get_mean_activations — Methodget_mean_activations(declarative::Declarative)Returns a vector of mean activations i.e. activation without noise
Arguments
declarative::Declarative: an Declarative memory object
ACTRModels.get_mean_activations — Methodget_mean_activations(chunks::Vector{<:Chunk})Returns a vector of mean activations i.e. activation without noise
Arguments
chunks::Vector{<:Chunk}: an array of chunks
ACTRModels.get_name — Methodget_name(actr::AbstractACTR)Returns the name of an ACT-R model object.
Arguments
actr::AbstractACTR: an ACTR model object
ACTRModels.get_parm — Methodget_parm(actr::AbstractACTR, p)Returns the value of a parameter
Arguments
actr::AbstractACTR: ACTR objectp: parameter name
ACTRModels.get_time — Methodget_time(actr::AbstractACTR)Get the current time of the simulation.
Arguments
actr::AbstractACTR: an ACTR model object
ACTRModels.get_time — Methodget_time(scheduler)Get the current time of the simulation.
Arguments
scheduler: an event scheduler
ACTRModels.get_visicon — Methodget_iconic_memory(actr)Returns array of chunks or visual objects representing all visual objects within the simulation
Arguments
actr: an ACTR object
ACTRModels.modify! — Methodmodify!(c; args...)Modifies fields of an object
Arguments
c: an object
Keywords
args...: optional keywords for field and values
ACTRModels.modify! — Methodmodify!(c::NamedTuple; args...)Modifies fields of NamedTuple
Arguments
c: a NamedTuple
Keywords
args...: optional keywords for field and values
ACTRModels.posterior_predictive — Functionposterior_predictive(model, chain, n_samples::Int, f=x -> x)Returns posterior predictive distribution and optionally applies function to samples on each replication
model: the data generating function of a modelchain: an MCMCChains chain objectn_samples: the number of samplesf: a function that is applied to each sample from posterior predictive distribution
ACTRModels.retrieval_prob — Methodretrieval_prob(actr::AbstractACTR, chunk::AbstractChunk, cur_time=0.0; request...)Uses the softmax approximation to compute the retrieval probability of retrieving a chunk.
Arguments
actr::AbstractACTR: an ACT-R objectchunk::AbstractChunk: a chunkcur_time: current simulated time in seconds
Keywords
request...: optional keyword pairs representing a retrieval request
ACTRModels.retrieval_prob — Methodretrieval_prob(actr::AbstractACTR, chunk::AbstractChunk; request...)Uses the softmax approximation to compute the retrieval probability of retrieving a chunk. By default, current time is computed from get_time.
Arguments
actr::AbstractACTR: an ACT-R objectchunk::AbstractChunk: a chunk
Keywords
request...: optional keyword pairs representing a retrieval request
ACTRModels.retrieval_prob — Methodretrieval_prob(actr::AbstractACTR, target::Array{<:Chunk,1}, cur_time; request...)Computes the retrieval probability of one chunk from a set of chunks defined in target. Retrieval probability is computed with the softmax approximation.
Arguments
actr::AbstractACTR: an actr objecttarget::Array{<:Chunk,1}: a vector chunks in the numerator of the softmax functioncur_time: current time in seconds
Keywords
request...: optional keywords for the retrieval request
ACTRModels.retrieval_prob — Methodretrieval_prob(actr::AbstractACTR, target::Array{<:Chunk,1}; request...)Uses the softmax approximation to compute the retrieval probability of retrieving a chunk. By default, current time is computed from get_time.
Arguments
actr::AbstractACTR: an ACT-R objecttarget::Array{<:Chunk,1}: a vector chunks in the numerator of the softmax function
Keywords
request...: optional keyword pairs representing a retrieval request
ACTRModels.retrieval_probs — Methodretrieval_probs(actr::AbstractACTR, cur_time; request...)Computes the retrieval probability for each chunk matching the retrieval request.
Arguments
actr::AbstractACTR: an actr objectcur_time: current simulated time in seconds
Keywords
request...: optional keyword pairs representing a retrieval request
ACTRModels.retrieval_request — Methodretrieval_request(actr::AbstractACTR; request...)Returns chunks matching a retrieval request.
Arguments
actr::AbstractACTR: an ACT-R Object
Keywords
request...: optional keyword arguments corresponding to retrieval request e.g. dog = :fiddo
ACTRModels.retrieve — Methodretrieve(actr::AbstractACTR, cur_time; request...)Retrieves a chunk given a retrieval request
Arguments
actr::AbstractACTR: an ACT-R objectcur_time: current simulated time in seconds
Keywords
request...: optional keyword arguments representing a retrieval request, e.g. person=:bob
ACTRModels.retrieve — Methodretrieve(actr::AbstractACTR; request...)Retrieves a chunk given a retrieval request. By default, current time is computed with get_time.
Arguments
actr::AbstractACTR: an ACT-R object
Keywords
request...: optional keyword arguments representing a retrieval request, e.g. person=:bob
Example
using ACTRModels
chunks = [Chunk(country=:Germany, capitol=:Berlin),
Chunk(country=:Australia, capitol=:Canberra)]
declarative = Declarative(memory=chunks)
parms = (noise=true, s=0.20)
actr = ACTR(;declarative, parms...)
retrieve(actr; country=:Germany)ACTRModels.set_buffer! — Methodget_buffer(actr, m)Returns posterior predictive distribution and optionally applies function to samples on each replication
Arguments
actr: an ACTR objectm: name of module as a symbolv: new value
Example
set_buffer!(actr, :imaginal, [chunk])ACTRModels.update_chunk! — Methodupdate_chunk!(chunk, cur_time)Increments number of uses and adds cur_time as the most recent time of use.
Arguments
chunk: a chunk object- `cur_time': current simulated time in seconds
ACTRModels.update_lags! — Methodupdate_lags!(chunk::AbstractChunk, cur_time)Compute lags for each use of a chunk.
Arguments
chunk::AbstractChunks: a chunkcur_time: current simulated time in seconds.
ACTRModels.update_lags! — Methodupdate_lags!(actr::AbstractACTR, cur_time)Compute lags for each use of a chunk. Applies to all chunks in declarative memory.
Arguments
actr::AbstractACTR: an ACTR objectcur_time: current simulated time in seconds
ACTRModels.update_lags! — Methodupdate_lags!(memory::Declarative, cur_time)Compute lags for each use of a chunk. Applies to all chunks in declarative memory.
Arguments
memory::Declarative: a declarative memory object objectcur_time: current simulated time in seconds
ACTRModels.update_recent! — Methodupdate_recent!(chunk, cur_time)Adds a new timestamp to chunk and removes oldest timestamp if length equals k.
Arguments
chunk: memory chunk objectcur_time: current simulated time in seconds
ACTRModels.update_recent! — Methodupdate_recent!(actr, chunk)Adds a new timestamp to chunk and removes oldest timestamp if length equals k. By default, current time is computed with get_time.
Arguments
actr: an ACT-R model objectchunk: memory chunk object
Base.match — Methodmatch(chunk::AbstractChunk, funs...; request...)Returns a boolean indicating whether a request matches a chunk. False is returned if the slot does not exist in the chunk or the value of the slot does not match the request value.
chunk::AbstractChunk: chunk objectfuns...: a list of functions such as!=, ==request...: a NamedTuple of slot value pairs
Base.match — Methodmatch(chunk::AbstractChunk; request...)Returns a boolean indicating whether a request matches a chunk. False is returned if the slot does not exist in the chunk or the value of the slot does not match the request value.
Arguments
chunk::AbstractChunk: a chunk object
Keywords
request...: optional keyword arguments corresponding to critiria for matching chunk