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:
BotstadiaEnvandBotstadiaVectorEnv(Gymnasium, N sessions on N threads,.sb3()for Stable-Baselines3);BotstadiaParallelEnvandBotstadiaVectorParallelEnv(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 ininfo. The arena's own end isterminated;truncatedis only yourtime_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) orexport.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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| botstadia_train-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details for botstadia_train-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl |
| botstadia_train-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details for botstadia_train-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl |
| botstadia_train-0.1.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for botstadia_train-0.1.0-cp311-abi3-macosx_11_0_arm64.whl |
Total release size: 55.0 MB
Release files / botstadia_train-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | botstadia_train-0.1.0-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 |
85995fffe763bbf2ec9d52b6b14a6e50edf89736f28c652c5232d7630562dfc7
|
|
BLAKE2b-256 checksum How to use checksums |
b52afd94201dd2896af734337e4f5b7e3b734386a2fd89d17f1c45e303e7d2ff
|
| 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.0-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | botstadia_train-0.1.0-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 |
c80bed0526379b9bae7d1742ae1402ca72a8abc96d9d248fba8e524d73cb3abb
|
|
BLAKE2b-256 checksum How to use checksums |
91da78e220d2c526059e4193ca59ca13dff425ef08f4578731b7c09ba43c27f5
|
| 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.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | botstadia_train-0.1.0-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 |
aaedd3f19d09f259d3edf848957a1c490923c8c0968b66e547e041db390661fd
|
|
BLAKE2b-256 checksum How to use checksums |
1dbd2f607bc873e9bd67abad6e226047d5ef3ded6b19a61f7237abfead6d0795
|
| 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.0
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.