Skip to content
/ bandit Public

Matlab code to simulate performace & estimate RL parameters for a k-armed bandit task.

Notifications You must be signed in to change notification settings

wem3/bandit

Repository files navigation

bandit: matlab

Functions and scripts for simulating choices in a k-armed bandit and estimating reinforcement learning parameters with a variety of methods.

runBanditScript.m: script that sets parameters for and executes simulation of data and subsequent extraction of learning rate and inverse temperature parameters. Start here!

simulateBandit.m: function that simulates performance on the task via call to generativeTD.m

generativeTD.m: function that chooses an arm, determines reward outcome, & updates value of chosen arm on each trial

makeDrifts.m: function to create drifting probabilities of reward outcome for each arm

LLE_TD.m: likelihood function using MLE

LLE_Prior.m: likelihood function using MAP

Structured in the style [Bradley Doll's 2-armed bandit code] (https://github.com/dollbb/estRLParam/tree/master/matlab "Bradley Doll's estRLParam"), with thanks to Ben Seymour and Amy Krosch.

About

Matlab code to simulate performace & estimate RL parameters for a k-armed bandit task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages