Skip to content

Repository files navigation

Cognitive & Computational Dynamics in an N-Armed Bandit Task

Project Overview

This repository contains the complete pipeline for a computational neuroscience study investigating human decision-making, exploration strategies, and metacognition in a volatile environment.

Drawing upon frameworks established by Daw et al. (2006), Wilson et al. (2014), and Salem-Garcia et al. (2023), this project utilizes a 4-armed restless bandit task to extract the latent mathematical variables (Learning Rate $\alpha$, Exploration Temperature $\beta$, and Prediction Error $\delta$) that govern human behavior and subjective confidence.

Repository Structure

  • Task_Design/: PsychoPy implementation of the dynamic 4-armed bandit paradigm.
  • Data/: Raw empirical data ($N=40$) containing trial-by-trial choices, reaction times, and confidence ratings.
  • Behavioral_Analysis/: Exploratory data analysis isolating reversal-learning dynamics, cognitive load (Reaction Time), and heuristic baselines (Win-Stay/Lose-Shift).
  • Computational_Modeling/: Maximum Likelihood Estimation (MLE) of Rescorla-Wagner Q-learning models, AIC model comparison, and latent parameter extraction.
  • Docs/: The final LaTeX manuscript detailing the theoretical background, methodology, and scientific conclusions.

Key Findings

  1. Bimodal Learning Phenotypes: The population exhibited a polarized distribution of learning rates ($\alpha$), fracturing into "stubborn" (noise-assuming) and "reactionary" (volatility-assuming) phenotypes.
  2. High Baseline Exploration: Formal model comparison (AIC) definitively proved the necessity of a Softmax choice rule. The population exhibited high decision noise (low $\beta$), mathematically validating the exceptionally low Win-Stay rate observed in the behavioral data.
  3. Metacognitive Readout: Trial-by-trial internal Reward Prediction Errors ($\delta$) generated by the Softmax model systematically predicted the subjects' conscious 1-5 confidence ratings, supporting the hypothesis that metacognition is a direct readout of latent reinforcement learning variables.

Build Automation

The final scientific report is written in LaTeX. A GitHub Actions workflow (.github/workflows/latex.yml) is configured to automatically compile main.tex via latexmk and publish the latest PDF to the Repository Releases upon every push to the Docs/ directory.

About

A computational neuroscience project implementing an N-armed bandit behavioral task in PsychoPy, featuring experimental data collection, descriptive behavioral analysis, and Q-learning computational modeling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages