Files

hanzo-ml-reinforcement-learning

Reinforcement Learning examples for hanzo.

Warning

uv is not currently compatible with pyo3 as of 2025/3/28.

System wide python

This has been tested with gymnasium version 0.29.1. You can install the Python package with:

pip install "gymnasium[accept-rom-license]"

In order to run the examples, use the following commands. Note the additional --package flag to ensure that there is no conflict with the hanzo-ml-pyo3 crate.

For the Policy Gradient example:

cargo run --example reinforcement-learning --features=pyo3 --package hanzo-ml-examples -- pg

For the Deep Deterministic Policy Gradient example:

cargo run --example reinforcement-learning --features=pyo3 --package hanzo-ml-examples -- ddpg