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

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.3
File Interpreter ABI Platform Actions
botstadia_train-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for botstadia_train-0.1.3-cp311-abi3-manylinux_2_28_x86_64.whl
botstadia_train-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for botstadia_train-0.1.3-cp311-abi3-manylinux_2_28_aarch64.whl
botstadia_train-0.1.3-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for botstadia_train-0.1.3-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 55.0 MB

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

Download URL botstadia_train-0.1.3-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
21ed4569c2e165b158dc39fc5a2335ca3564655534ecf2b0773b3d6e3211ef01
BLAKE2b-256 checksum
How to use checksums
b2110fa7c71f4889b57f7138812063689effe80b49d7c96d7e37e21804611b47
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.3-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL botstadia_train-0.1.3-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
5ff6ffa5c92765c25ed4fae5a1a50c047fc19be737135eeca12abb61b55c22f2
BLAKE2b-256 checksum
How to use checksums
8c0c7a94241df19440b953a6b581a644d66129a04e8e0c9f570df8f11a578d18
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.3-cp311-abi3-macosx_11_0_arm64.whl

Download URL botstadia_train-0.1.3-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
a2398be8e7dae3714fbd5d7d9c0937e251d4658c08cdd40285d13a2d56765456
BLAKE2b-256 checksum
How to use checksums
7b1756ecf2d57dbc23e60fb8994c831d5c69722b78a774d7a9510b9b77affabc
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.3

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