Build a curious rocket
A two-hour hands-on workshop on cpomdp, continuous active inference in Python, for the 6th Applied Active Inference Symposium. You build three rockets. The first is the 1960 controller, a Kalman filter with a goal, and the library reports that no move can teach it more than another. The second reads its position through a sensor that depends on where it is, and bends its path toward a beacon. In the third, three rockets fly past a rock none of them was told about.
Open it
The live session runs on Colab. There is nothing to install. A browser and a Google account are enough. Edits vanish when the tab closes unless you save a copy to Drive.
Please write the lines yourself rather than asking a generative AI tool for them. The point of the session is the two lines you work out. The hints and the reference cells are there for when you are stuck. Using them is fine.
Run it locally
With uv:
git clone https://github.com/inferogenesis/cpomdp-workshop
cd cpomdp-workshop
uv sync --extra nb
uv run jupyter lab notebooks/build_a_curious_rocket.ipynb
Python 3.11 or newer. The workshop pins the cpomdp release it was measured on, and the first cell stops if a different one is installed.
Do not name a file in the folder you run from after a standard-library module, such as
types.py, dis.py or random.py. Python imports yours instead. The error that
follows points nowhere near the cause.
What is in the repo
| Path | What it holds |
|---|---|
src/cpomdp_workshop/ |
The package the notebook imports: the world, the two rockets, the flight loop, the checks, the figures |
notebooks/ |
The notebook, generated and run by scripts/build_notebook.py. Never edited by hand |
scripts/lesson.py |
What the notebook says, cell by cell |
delivery/hints_chat.txt |
The hint lines pasted into chat. The notebook's hint and reference cells are built from it |
assets/ |
Figures, regenerated from the package by scripts/render_assets.py |
tests/test_measured_claims.py |
One test per number the notebook or the deck shows |
tests/test_api_contract.py |
The cpomdp forms the workshop is written against |
Working on it
Every command runs from the repo root.
uv sync --extra dev --extra nb
uv run --no-sync pytest -q -m "not slow" # fast tests
uv run --no-sync pytest -q # everything, the notebook run included
uv run --no-sync pre-commit run --all-files # the gate CI runs
uv run --no-sync python scripts/build_notebook.py
uv run --no-sync python scripts/render_assets.py
A change to the lesson, the hints or the package means rebuilding the notebook. A stale notebook fails a test.
Releasing
The notebook's first cell installs the exact version it was built from, so bump
version in pyproject.toml, rebuild the notebook and merge. Then publish a GitHub
release tagged v plus that version. .github/workflows/publish.yml runs the tests,
installs the wheel into a clean environment and uploads to PyPI through Trusted
Publishing.
Licence
MIT. See LICENSE.
Metadata
Release files for cpomdp-workshop 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cpomdp_workshop-0.1.0.tar.gz | 484.1 kB | With provenance | Details for cpomdp_workshop-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cpomdp_workshop-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cpomdp_workshop-0.1.0-py3-none-any.whl |
Total release size: 511.7 kB
Release files / cpomdp_workshop-0.1.0.tar.gz
| Download URL | cpomdp_workshop-0.1.0.tar.gz |
|---|---|
| Size | 484.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67a0311b9264e2aca2e5c14613ca82b6864c90a1398a44859e9d65a7a8cfce0f
|
|
BLAKE2b-256 checksum How to use checksums |
4d57f90e885e7c86af02f06a0163d93b72cb1ce608c809f26c33456a44ee959d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / cpomdp_workshop-0.1.0-py3-none-any.whl
| Download URL | cpomdp_workshop-0.1.0-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3bb8bd6d51dbfd5dbad97003f2f6a3d23d6e8d1bc4d125423f14e705ba4acbdf
|
|
BLAKE2b-256 checksum How to use checksums |
36ae3ad7a0501013ebbb646a3a912d3222dabf3f2a1250b55af7bb1149fdc1ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for cpomdp-workshop 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cpomdp_workshop-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.