Code and data for "An Active Inference Model of Trust Game Behavior"
Description
This is a zipped version of the github reposiory and behavioral data for an Active Inference model of trust game behavior.
It contains the software for simulation, model inversion, model comparison, classification and parameter/ prediction recovery.
To use this code and reproduce any results or figures, follow the steps detailed in our readme file below.
Please bear in mind that use is permitted under a CC BY-NC 4.0 license (see repo and below for details).
# Code Repository for **Active Inference in Interpersonal Decision-Making**
## π¦ Installation
This repository uses an **editable installation**. To reproduce all results and run the code, follow these steps:
### 1. Clone the repository
```bash
git clone git@gitlab.uni-marburg.de:fb04/ag-endres/pymdp_depression.git
```
### 2. Install in editable mode
Navigate to the `src/` directory and run:
```bash
pip install -e .
```
---
## ποΈ Repository Structure
```
pymdp_depression/
βββ pyproject.toml
βββ README.txt
βββ .gitignore
βββ data/
βββ notebooks/
β βββ # Contains all plotting notebooks in order of appearance in the manuscript
βββ src/
β βββ pymdp_depression/
β βββ model/
β βββ classification/
β βββ model_comparison/
β βββ simulations/
β βββ optimization/
β βββ recovery/
βββ archive/
```
---
## π Naming conventions
The model variants have slightly different names in the paper vs. in the optimization algo for readability reasons:
Paper name --> repo name
---
1) ABC --> fits_alpha16
2) ABCE --> with_E
3) ABCDE --> with_EandD
4) ABCDEΞ± --> with_E_and_alpha
5) ABCDE_lrAlrB --> hyperparam_opt
6) ABCD_policy2 --> incr_policy_horizon
---
## π Reproducibility
All figures in the manuscript can be reproduced using the notebooks found in the `notebooks/` directory.
* The notebooks are **numbered in the order they appear in the paper**.
* Each notebook imports the necessary functions from the `model`, `simulations`, `optimization`, and `recovery` submodules.
* All figures are generated directly from data stored under:
```
data/results/...
```
---
## π Citation
Please cite our manuscript - once published, you will find the full citation on Google Scholar or here: https://eckertal.github.io/personal-website/publications/
License
Except where otherwised noted, this item's license is described as Attribution 4.0 International
