Skip to main content

botstadia-train

Train bots for BotStadia: every arena as a Gymnasium or PettingZoo environment, run on the same session host as real sessions, with self-play and the ONNX export the policy shell runs.

pip install "botstadia-train[sb3]"          # Stable-Baselines3, PyTorch and the export
pip install "botstadia-train[pettingzoo]"   # multi-agent environments
from stable_baselines3 import PPO
from botstadia_train import BotstadiaVectorEnv, export, opponents

env = BotstadiaVectorEnv("dance-off", num_envs=8, opponents=opponents.published("dance-off"))
model = PPO("MultiInputPolicy", env.sb3(), verbose=1)
model.learn(2_000_000)
export.sb3(model, env, "policy.onnx")   # then `botstadia build`, `botstadia check`, `botstadia bench`
  • Environments: BotstadiaEnv and BotstadiaVectorEnv (Gymnasium, N sessions on N threads, .sb3() for Stable-Baselines3); BotstadiaParallelEnv and BotstadiaVectorParallelEnv (PettingZoo, every seat at once). Arenas download from BotStadia's CDN by name; nothing is per arena.
  • Spaces: observations are a dict of the arena's declared inputs, by name. Continuous actions are in [-1, 1], mapped onto the declared bounds by the same function the policy shell uses.
  • Rewards: the arena's training-only shaping reward each turn, plus terminal_reward × the outcome (1 for a win, −1 for last) at the end. The finishing order is in info. The arena's own end is terminated; truncated is only your time_limit_turns. Your seat is drawn per episode.
  • Opponents: published baselines (opponents.published), any bundle (opponents.Bundle), Python policies (opponents.Policy), and self-play against frozen snapshots (selfplay.SelfPlay).
  • Export: export.sb3 (PPO, A2C, SAC, TD3, RecurrentPPO) or export.torch_module, with two parity checks: PyTorch against ONNX Runtime, and against the real policy shell.

BOTSTADIA_CDN_URL and BOTSTADIA_CACHE move the CDN and the cache, shared with the botstadia CLI.

Metadata

Release files for botstadia-train 0.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for botstadia-train 0.1.1
File Interpreter ABI Platform Actions
botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl
botstadia_train-0.1.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for botstadia_train-0.1.1-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 55.0 MB

Release files / botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
Size 19.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
1098f2cd0302f9a649b0389555ac53fdff649ab3824121bb8791df7281649ba6
BLAKE2b-256 checksum
How to use checksums
509f765649a105cdb753e41a26b2859ee90a72a158e94cff30ea1e011cc5fbbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL botstadia_train-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 18.6 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
81bc541abed04a42a98f4ecdfa6cfde7b9de295225ebcaaaf5b3bdf557be7671
BLAKE2b-256 checksum
How to use checksums
b8d1f1a24f9c2e7a2e2a76955fa2de9f8af3ad3a43b236c529fc088c2d6ef779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / botstadia_train-0.1.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL botstadia_train-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
Size 17.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
81b2c432f5df617d0d04c093e7d0fc81cac5e59d9f3f0ea5778f6fb9f81ea474
BLAKE2b-256 checksum
How to use checksums
57ad2b36e68ac7d88bb4e6b7dba0bfb135853c665c93af8649601dabaa007a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Security for botstadia-train 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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