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.1.tar.gz (60.3 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.1-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: haxballgym-1.0.1.tar.gz
  • Upload date:
  • Size: 60.3 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.1.tar.gz
Algorithm Hash digest
SHA256 3a7eb7adf03d4d50e7138400d55f3b8be5b6bd2411bceeaa836e0427f86c288f
MD5 e98f2c246d1fbb5dda67ba12d0ecc5b9
BLAKE2b-256 42067f7951a8210c36692f33f906490615c2ae90cd8fe7db499ddb5cae95bf20

See more details on using hashes here.

Provenance

The following attestation bundles were made for haxballgym-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: haxballgym-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 45.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 209fffa159097d1c30e51f27e80f81736ad2d0504f7b9c73c8eb0a2296c9df07
MD5 b6b30e1dab6d687aa45484bcc00293b6
BLAKE2b-256 e5ba3c7cf5bf9c71ed25a4b4e03a1f6f532cd2ff524100f5dba030514e48f788

See more details on using hashes here.

Provenance

The following attestation bundles were made for haxballgym-1.0.1-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