$$ \text{Bias} = \delta \cdot \sqrt{\frac{\log(N + e)}{N + 10^{-10}}} $$
func_delta(count, params, ...)A NumericVector containing the bias for each option based on
the number of times it has been selected.
How many times this action has been executed
Parameters used by the model’s internal functions, see params
It currently contains the following information; additional information may be added in future package versions.
idinfo:
subid
block
trial
exinfo: contains information whose column names are specified by the user.
Frame
RT
NetWorth
...
behave: includes the following:
action: the behavior performed by the human in the given trial.
latent: the object updated by the agent in the given trial.
simulation: the actual behavior performed by the agent.
func_delta <- function(
count,
params,
...
){ list2env(list(...), envir = environment())
# If you need extra information(...)
# Column names may be lost(C++), indexes are recommended
# e.g.
# Trial <- idinfo[3]
# Frame <- exinfo[1]
# Action <- behave[1]
delta <- params[["delta"]]
bias <- delta * sqrt(log(count + exp(1)) / (count + 1e-10))
return(bias)
}