Learn R Programming

binaryRL (version 0.9.0)

Reinforcement Learning Tools for Two-Alternative Forced Choice Tasks

Description

Tools for building reinforcement learning (RL) models specifically tailored for Two-Alternative Forced Choice (TAFC) tasks, commonly employed in psychological research. These models build upon the foundational principles of model-free reinforcement learning detailed in Sutton and Barto (2018) . The package allows for the intuitive definition of RL models using simple if-else statements. Our approach to constructing and evaluating these computational models is informed by the guidelines proposed in Wilson & Collins (2019) . Example datasets included with the package are sourced from the work of Mason et al. (2024) .

Copy Link

Version

Install

install.packages('binaryRL')

Monthly Downloads

315

Version

0.9.0

License

GPL-3

Maintainer

YuKi

Last Published

July 8th, 2025

Functions in binaryRL (0.9.0)

RSTD

Model: RSTD
TD

Model: TD
fit_p

Step 3: Optimizing parameters to fit real data
func_eta

Function: Learning Rate
func_gamma

Function: Utility Function
Utility

Model: Utility
func_pi

Function: Upper-Confidence-Bound
rpl_e

Step 4: Replaying the experiment with optimal parameters
simulate_list

Process: Simulating Fake Data
optimize_para

Process: Optimizing Parameters
rcv_d

Step 2: Generating fake data for parameter and model recovery
func_tau

Function: Soft-Max Function
summary.binaryRL

S3method summary
recovery_data

Process: Recovering Fake Data
run_m

Step 1: Building reinforcement learning model
Mason_2024_Exp1

Experiment 1 from Mason et al. (2024)
Mason_2024_Exp2

Experiment 2 from Mason et al. (2024)
binaryRL-package

binaryRL: Reinforcement Learning Tools for Two-Alternative Forced Choice Tasks
func_epsilon

Function: Exploration Strategy