Skip to content

xiaxu0613/cais

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infants and Mobiles: Developing an Understanding of Cause and Effect

This repository contains the official code and simulation models for the research paper "Infants and Mobiles: Developing an Understanding of Cause and Effect" accepted at Developmental Science.


Prerequisites

To run this simulation, you will need the following installed on your system:

  • Python 3.8 or higher
  • Git (for cloning the repository)

Environment Setup

We recommend using a virtual environment to manage dependencies and avoid conflicts. Follow these steps to set up your local environment:

1. Clone the repository

git clone https://github.com/trieschlab/cais.git

2. Create a virtual environment:

# On macOS/Linux
python3 -m venv cais

# On Windows
python -m venv cais

3. Activate the virtual environment:

# On macOS/Linux
source cais/bin/activate

# On Windows
cais\Scripts\activate

4. Install the required dependencies:

pip install -r requirements.txt

Running the Simulation

The main algorithm is contained within simulation.py. Once your environment is set up and activated, you can execute the simulation using the command line.

Basic Run:

python simulation.py

Simulation Parameters

You can customize the simulation behavior by passing various command-line arguments. The script supports different modeling approaches, environmental modes, and tuning parameters.

  • Methods (--method): Choose the core learning method.
    • "cais"
    • "controllability"
  • Modes (--mode): Define the environmental interaction mode.
    • "normal"
    • "inverted"
    • "bimodal"
  • Hyper-parameters to explore:
    • --lr: Learning rate
    • --n_taus: Number of quantiles
    • --surprise_weight: Weight of the surprise term
    • --smoothing: Exponential average smoothing factor

Note: Refer to the paper for explanations of these hyper-parameters.


Citation

If you use this code or our findings in your research, please cite our paper:

@article{xu2026infant,
author = {Xu, Xia and Triesch, Jochen},
title = {Infants and Mobiles: Developing an Understanding of Cause and Effect},
journal = {Developmental Science},
volume = {29},
number = {4},
pages = {e70211},
doi = {https://doi.org/10.1111/desc.70211},
year = {2026}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages