Skip to main content

arena-sim

Victris Arena's simulator for Python: the ladder's own match code (arena-sim.js, built from packages/sim) run in embedded V8 through mini-racer, with Gymnasium and PettingZoo environments. No Node.js needed.

  • Simulator(num_games): many games stepped in one call, any mix of Random and starter opponents and self-play.
  • ArenaEnv, ArenaVectorEnv: Gymnasium environments, one match an episode against Random or the starter bot, or (vector) against your own policies and scripted bots.
  • ArenaSelfPlayEnv: batched self-play, both fighters of every match yours.
  • FastVectorEnv, FastSelfPlayEnv: the same matches encoded inside the simulator and read in place (no JSON), about 7 times faster a process, and split over worker processes with workers=N. scripts= loads JavaScript that registers your own bots (opponents, teachers) and encoders; ScriptedOpponents (bots written in Python) play and teach there too.
  • ScriptEncoder: an encoder from the simulator in a live Python bot; check_encoder checks one reads the ladder's JSON as it reads the batch.
  • arena_sim.sb3.ArenaVecEnv: the batched environments for Stable-Baselines3 and sb3-contrib's MaskablePPO (the sb3 extra).
  • python -m arena_sim.examples.train_ppo: a complete PPO training run (curriculum against Random, then the starter bot) to start from.
  • python -m arena_sim.examples.train_ppo_gpu: the same curriculum in plain PyTorch, built for a GPU (the fast environments, byte grids, rollouts on the device, CUDA graphs), training against Random, then ts-starter (the torch extra, or a CUDA build of torch).
  • download_replays, replay_trajectories, replay_dataset: ladder games as training data, each fighter's observations and turns rebuilt from the replay, or encoded straight into arrays.
  • python -m arena_sim.examples.imitate and python -m arena_sim.examples.league: imitation of the ladder's strongest bots, and PPO against a pool of bots and copies of yourself.
  • arena_sim.multiagent.ArenaParallelEnv: PettingZoo self-play (the pettingzoo extra).
  • Raw passes the ladder's JSON through; Basic is a reference encoder to start from.

Players install the wheel the ladder serves (GET /api → simulator.python); see docs/SIMULATOR.md (/docs/simulator on a ladder). python -m arena_sim check <ladder URL> says whether an installed copy is the release that ladder runs. Without contacting anyone, it also warns (OutdatedSimulatorWarning) when a live match's hello (Basic, ScriptEncoder, check_hello) or downloaded replays were played on other rules. python -m arena_sim changelog prints the release notes since this release, and python -m arena_sim source <dir> the TypeScript it was built from (the wheel carries arena-sim.js.map and CHANGELOG.md). The package's version is the game's RELEASE, read from arena-sim.js when the wheel is built.

Developing: bun run build:py builds the wheel into dist/, bun run test:py runs the tests (both need uv).

Metadata

Release files for victris-arena-sim 0.90.0

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

Source distribution (sdist)

Source distribution for victris-arena-sim 0.90.0
File Size Uploaded Provenance Actions
victris_arena_sim-0.90.0.tar.gz 422.2 kB With provenance Details for victris_arena_sim-0.90.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for victris-arena-sim 0.90.0
File Interpreter ABI Platform Actions
victris_arena_sim-0.90.0-py3-none-any.whl Python 3 none any Details for victris_arena_sim-0.90.0-py3-none-any.whl

Total release size: 861.4 kB

Release files / victris_arena_sim-0.90.0.tar.gz

Download URL victris_arena_sim-0.90.0.tar.gz
Size 422.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5b4d49249cdfb8fc2a8ffbec986aa331c33c836d3df279fc9ef3170771755689
BLAKE2b-256 checksum
How to use checksums
8533c8530f0509b3a05d5bd05a2d447e0d42c43a9d7ecb478a0208fc185fd90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / victris_arena_sim-0.90.0-py3-none-any.whl

Download URL victris_arena_sim-0.90.0-py3-none-any.whl
Size 439.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b14af81460a6570eb3ed19e901022e32cf2c79fa3456f8072ef71bda28891e2
BLAKE2b-256 checksum
How to use checksums
b395f11ef7bc0e6ee9627f9f3b0c19751b4d3d2ee9e0c0265d6e5c601316c217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for victris-arena-sim 0.90.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for victris_arena_sim-0.90.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

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