Notebooks¶
Marimo notebooks are the main user interface for running experiments, play-testing environments, plotting results, and inspecting artifacts.
Training Notebooks¶
Training notebooks usually follow this structure:
- Import project helpers and environment-specific constraints.
- Define a visible
configdictionary. - Build a
TemporalGameExperimentSpecor environment-specific wrapper spec. - Call the experiment suite helper.
- Plot satisfaction curves and comparison summaries.
- Print artifact paths.
Primary examples:
notebooks/matrix/stag_hunt/SustainedStag_2_mo.py
notebooks/gridworlds/territory/RoleClaim_2_mo.py
notebooks/gridworlds/harvest/SafeHarvest_4_mo.py
notebooks/gridworlds/gift_refinements/Consume_6_mo.py
Play And Label Notebooks¶
Play notebooks let you manually inspect environment dynamics and controls before launching expensive training runs.
Examples:
notebooks/matrix/stag_hunt/play_mo.py
notebooks/gridworlds/chemistry/play_labelled_mo.py
notebooks/gridworlds/territory/play_labelled_mo.py
notebooks/gridworlds/gift_refinements/play_labelled_mo.py
Labelled play notebooks are especially useful for checking whether the atoms used in a formula fire when expected.
Generic Utility Notebooks¶
The generic notebooks support analysis and inspection:
notebooks/generic/regraph_mo.py
notebooks/generic/timings_report_mo.py
notebooks/generic/legend_mo.py
notebooks/generic/spaces_mo.py
notebooks/generic/gpu_mo.py
Use them to regenerate plots from saved artifacts, inspect timings, export legends, inspect observation/action spaces, and check GPU availability.
Config Shape¶
Common top-level fields:
num_agentsnum_env_stepsseednum_runsprogress_chunksrun_ipporun_ippo_cerrun_pr2_ipporun_pr2_ippo_cerrun_iqlrun_iql_cerrun_pr2_iqlrun_pr2_iql_cerrun_nashqrun_nashq_cercalculate_convcalculate_alpharankcalculate_satisfactioncalculate_conv_quicksave_dir
Nested blocks hold algorithm hyperparameters:
The suite helper validates keys, so unexpected top-level config names usually fail early.
Running From The CLI¶
Open a notebook:
Run a notebook:
Override supported top-level values:
uv run marimo run notebooks/gridworlds/territory/RoleClaim_2_mo.py -- --num_runs 1 --num_env_steps 50000
For long experiments, keep save_dir stable and use notebooks that enable partial resume so completed seeds can be reused.