Skip to main content

Composable, batched RLGym-v2-style env over the headless haxball_core engine.

Project description

haxballgym

A composable, batched, RLGym-v2-style reinforcement-learning environment for Haxball, built on top of the headless haxball_core physics engine.

The physics is a faithful Rust port of Haxball's, verified to agree with the original engine to within 1e-9, and stepped in batches of thousands of matches in parallel — fast enough for serious self-play on a single machine.

Install

pip install haxballgym

This pulls in haxball_core (the Rust engine) automatically.

Quick start

from haxballgym import make_default_env

env = make_default_env(n_envs=512)
obs = env.reset()
obs, rewards, terminated, truncated = env.step(actions)

Or compose your own environment from the pieces — engine plus obs / action / reward / done / state-mutator builders:

from haxballgym import (
    TransitionEngine, DefaultObs, DiscreteAction,
    CombinedReward, GoalReward, TouchReward,
    GoalCondition, TimeoutCondition, KickoffMutator, Env,
)

See the project repository for the full docs, runnable training examples, and tools to play your trained policy back in the real browser game.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haxballgym-1.0.0.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haxballgym-1.0.0-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file haxballgym-1.0.0.tar.gz.

File metadata

  • Download URL: haxballgym-1.0.0.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for haxballgym-1.0.0.tar.gz
Algorithm Hash digest
SHA256 42458fe2084e48dcc00f4343f18975e7958198303c7b12da3f22a36717fd5389
MD5 9e8b49da0742f5f5110fede85b402c2c
BLAKE2b-256 22165d18b6ff4a15fd827ec145663c6c940378a4271a835aeb98ab70361ecf77

See more details on using hashes here.

Provenance

The following attestation bundles were made for haxballgym-1.0.0.tar.gz:

Publisher: release.yml on HaxballGym/HaxballGym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file haxballgym-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: haxballgym-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for haxballgym-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29ff6eabb3db5ee8b78ed8f1a60df5d7ab3bef8234f0acd3d7312c65cbaa8ba0
MD5 9757677fcc4a9011afad7ebaf07ff43d
BLAKE2b-256 694a48726bfb5522be5158d275f549554851a5d5273ed1b6cd2a4405ee7ab16d

See more details on using hashes here.

Provenance

The following attestation bundles were made for haxballgym-1.0.0-py3-none-any.whl:

Publisher: release.yml on HaxballGym/HaxballGym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page