Computational model of cognition (source code)

= Computational model of cognition

A <computational model of cognition> is an explicit set of mathematical or algorithmic rules connecting inputs and previous experience to predictions about behaviour. Its variables can represent internal quantities, while its predictions concern observable choices, <reaction times> or other measurements. This makes a proposed cognitive mechanism precise enough to simulate and test.<Ten simple rules for the computational modeling of behavioral data by Robert C. Wilson and Anne G. E. Collins>[What is computational modeling of behavioral data?]{ref}

A simple <reinforcement learning> example updates a predicted value $Q_t$ after a reward $r_t$:
$$
Q_{t+1}=Q_t+\alpha(r_t-Q_t).
$$
The <learning rate> $\alpha$ controls the contribution of the <reward prediction error> $r_t-Q_t$. With $Q_0=0$, constant reward $r_t=1$ and $\alpha=1/2$, successive values are $1/2$, $3/4$ and $7/8$. Equivalently, $Q_t=1-2^{-t}$. These are model predictions for constructed inputs, not measured human responses.<Ten simple rules for the computational modeling of behavioral data by Robert C. Wilson and Anne G. E. Collins>[Model 3, Equation 3]{ref}

Predicting choices additionally requires a rule linking values to actions. <Parameter estimation> can fit such a model, but a good fit alone does not establish that its internal variables are uniquely recoverable. <Parameter recovery> tests this by simulating data from known parameters and checking whether the fitting procedure retrieves them.<Ten simple rules for the computational modeling of behavioral data by Robert C. Wilson and Anne G. E. Collins>[Check that you can recover your parameters; Box 4]{ref} This distinguishes a useful formal account from a merely suggestive verbal description.