Skip to content

Marimo Notebooks

The runnable notebooks in this repository are marimo notebooks stored as Python files.

They can be opened interactively or executed as scripts.

Interactive Use

Open a notebook with:

uv run marimo edit notebooks/matrix/chicken/experiments_mo.py

Marimo tracks dependencies between cells. When a cell is skipped with mo.stop(...), downstream cells that depend on it are also skipped.

Script Use

Run a notebook as a script with:

uv run python notebooks/matrix/chicken/experiments_mo.py --timesteps=64

The notebooks use CLI-backed configuration through apply_cli_overrides(...). Command-line keys use kebab case, and notebook config keys use snake case.

For example:

uv run python notebooks/matrix/chicken/experiments_mo.py \
  --run-ippo=true \
  --run-ippo-shielded=false \
  --num-runs=1 \
  --timesteps=64

Working Directory

Notebooks normalize their working directory to the project root during setup. This keeps relative paths such as exports/... stable whether the notebook is launched from the repo root, an editor, or a script runner.

Common Notebook Families

World-model notebooks:

train_wm_mo.py

Opponent-model notebooks:

train_om_mo.py

Experiment notebooks:

experiments_mo.py

Play and inspection notebooks:

play_mo.py
true_dynamics_mo.py

Diagram notebooks live under notebooks/diagrams/.