This provides all simulation and analysis code to produce the results of Constructing future behaviour in the hippocampal formation through composition and replay. All theoretical results were obtained in Python. The analysis of empirical data was done in Matlab. The reanalysed dataset from the paper by Duvelle et al. is openly available; the reanalysed data from the paper by Pfeiffer and Foster was obtained by request from the authors.
You need to install python >= 3.6.0 and pytorch >= 1.6.0. All matlab analyses were run in Matlab 2021a. To replicate the empirical results, you will need to source data (see above).
Clone the repo
git clone https://github.com/jbakermans/state-space-composition.gitEach figure panel is generated by a simulation script that is executed by navigating to its directory, then running
python simX.pyfor python (.py) scripts, or
getFigsin the matlab terminal for matlab (.m) scripts.
The simulation scripts correspond to the preprint figure panels as follows:
- Fig 1i,j: ContinuousPlanning/sim4.py
- Fig 1k: ContinuousPlanning/sim5.py
- Fig 2b: DiscretePlanning/sim1.py
- Fig 2c: ContinuousPlanning/sim1.py
- Fig 2f: DiscretePlanning/sim2.py
- Fig 2f inset: ContinuousPlanning/sim2.py
- Fig 3b: DiscretePlanning/sim2.py
- Fig 3e,f discrete: DiscreteHoming/sim1.py
- Fig 3e,f continuous: ContinuousPlanning/sim3.py
- Fig 4d,b,e, h-k: PfeifferFoster/getFigs.m
- Fig 4f,g: ContinuousPlanning/sim6.py
- Fig 5f-j: PfeifferFoster/getFigs.m
- Fig 5d,e: ContinuousPlanning/sim6.py
- Fig S1a,b: DiscretePlanning/sim3.py
- Fig S1c: DiscretePlanning/sim4.py
- Fig S2: HierarchicalPlanning/sim1.py
- Fig S7: PfeifferFoster/getFigs.m
- Fig S8: DuvelleSpiers/getFigs.m
- Fig S9: DuvelleSpiers/getFigs.m
Jacob Bakermans - jacob.bakermans [at] gmail.com
Project Link: https://github.com/jbakermans/state-space-composition