Skip to main content

netris-rl

Training utilities for the netris Game Boy Tetris environment: behavior cloning from a heuristic teacher, DAgger rounds and PPO fine-tuning with a KL anchor.

Install

pip install netris-rl

CLIs

# collect teacher demonstrations (optionally DAgger with --policy-model)
netris-collect --rom /path/to/tetris.gb --steps 30000 --workers 2

# behavior cloning (optionally warm-started with --init-model)
netris-bc --demos "logs/demos/demos_*.npz" --epochs 30 --output logs/bc/model

# PPO fine-tuning, optionally anchored to a frozen reference policy
netris-train --rom /path/to/tetris.gb --resume --no-obs-norm \
    --anchor-model logs/bc/model.zip --total-steps 500000

# evaluation
netris-eval --model logs/best_model/best_model.zip --episodes 20

Pipeline used to reach a line-clearing agent

  1. netris-collect with the analytic Dellacherie teacher.
  2. netris-bc (behavior cloning).
  3. netris-collect --policy-model (DAgger), then netris-bc --init-model.
  4. netris-train --resume --anchor-model <bc model> (anchored PPO).

License

MIT.

Metadata

Release files for netris-rl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netris-rl 0.1.0
File Size Uploaded
netris_rl-0.1.0.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netris-rl 0.1.0
File Interpreter ABI Platform
netris_rl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / netris_rl-0.1.0.tar.gz

Download URL netris_rl-0.1.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1dcaee6898b0f07117d469c34563dc738af149f35921b1ce3d46d3dc0e9ea3bd
BLAKE2b-256 checksum
How to use checksums
fd982d2e2e36126b780f579a1902787836636f6779d2f8ebaeb9820ac3eeb3f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / netris_rl-0.1.0-py3-none-any.whl

Download URL netris_rl-0.1.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0e49fe3b9eb2e766055008135cc6da93a18086faf9bace61e20b8bbed2ebbd1
BLAKE2b-256 checksum
How to use checksums
0c8d01c9bd4b6e478efbbde3ff5ad4dfdf7da6fa4b1fad1be4eec6fa63ec39c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page