You are here

Bandit task

A set of bandit task models that show how a simulated rat responds in a number of different situations. Included are Nengo scripts for a simple 3-arm bandit task (, a 3-arm bandit task in which the environment changes in each block of trials (, and two scripts in which the environment switches faster so that the rat doesn't forget about environments encountered early in the set of trials ( and Data, plots, and Matplotlib scripts to generate the plots are also included.
Peer Reviewed: 

bandit_task_*.py files can be run from the Nengo GUI.

Each .py contains a local variable, directory, which determines if the file will be used to run an experiment, or visualized through the GUI. If directory == None, then the network will be added to the GUI and ready for investigation. If a directory is set (to a string path), then experiments will be run, and the results output to that directory. The directory is relative to the main Nengo directory.

The .py files in the plots directories can be run on any machine with Python, numpy, and Matplotlib installed. From the command line, enter, for example, python Each plot file has a local variable save that determine if the plot will be saved as a pdf file (if save == True) or displayed in a Matplotlib window (if save == False).