Skip to main content

pikapro

A fast, deterministic Pokémon battle simulator for Python, with a reinforcement-learning environment and a Showdown client built on it.

pikapro runs pikapro-engine, a Rust port of Pokémon Showdown's battle simulator (Gen 9 singles and doubles, VGC, Pokémon Champions), checked against Showdown down to every random number drawn. Battles run on Rust threads with the GIL released.

  • pikapro.Battle and pikapro.BattlePool are the simulator.
  • pikapro.rl is the environment: n battles per call, each player seeing only what a Showdown client knows. It has adapters for Gymnasium, PettingZoo and Stable-Baselines3.
  • pikapro.showdown plays a policy trained in pikapro.rl on a local Showdown-protocol server or VGC Arena.
  • pikapro.compat.poke_env runs unmodified poke-env players on pikapro battles, in-process.

Install

pip install pikapro                 # needs only numpy
pip install 'pikapro[gym]'          # + Gymnasium; also [pettingzoo], [sb3], [poke-env], [showdown], [all]

Wheels for CPython 3.10+ on Linux (x86_64, aarch64; glibc and musl), macOS (Intel, Apple silicon) and Windows (x86_64).

Elsewhere pip builds from the sdist, which needs Rust 1.88 or later; the install guide covers it and building from a checkout.

Formats

championsvgc and championsbss (Pokémon Champions VGC and Battle Spot Singles), gen9vgc (Scarlet/Violet VGC), gen9ou (Smogon's Gen 9 OverUsed), gen9randombattle and gen9randomdoublesbattle (Showdown's random battles, with its random-battle team generator), and the Gen 9 custom games gen9singles and gen9doubles. See FORMATS.

Quick start

One battle, turn by turn:

import pikapro

team = pikapro.sample_team("championsvgc")          # Showdown export text
battle = pikapro.Battle("championsvgc", [team, team], seed=1)
while not battle.over:
    for side in (0, 1):
        legal = battle.legal_actions(side)
        if legal:
            battle.submit(side, legal[0])            # or a Showdown choice: "move 1 2, switch 3"
print(battle.winner, "\n".join(battle.log("p1")[-5:]))   # player 1's Showdown log

The environment:

import numpy as np
import pikapro.rl as rl

env = rl.VecEnv("championsvgc", n=1024, opponent="simple_heuristics", seed=0)
out = env.reset(seed=0)
rng = np.random.default_rng(0)
for _ in range(100):
    actions = env.sample_actions(rng, players=[0])[:, 0]   # your policy here
    out = env.step(actions)
    # out.obs, out.masks, out.reward, out.terminated, out.truncated, out.winner

On a local server (pip install 'pikapro[showdown]'):

python -m pikapro.showdown ladder --format gen9championsvgc2026regmc \
    --team team.txt --policy simple_heuristics --games 3

VGC Arena pairs the bots itself, so there the command is accept, with ARENA_BOT_NAME and ARENA_BOT_TOKEN set:

python -m pikapro.showdown accept --server arena --team team.txt

Documentation

License

MIT.

Game data and mechanics come from Pokémon Showdown (MIT), and the built-in baseline opponents are ported from poke-env (MIT). Their notices, and the licenses of the Rust crates compiled into the extension module, are in THIRD_PARTY_NOTICES. Pokémon and all related names are trademarks of Nintendo, Creatures Inc., Game Freak and The Pokémon Company. pikapro is not affiliated with or endorsed by them, or by Pokémon Showdown.

Metadata

Release files for pikapro 0.2.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 pikapro 0.2.0
File Size Uploaded Provenance Actions
pikapro-0.2.0.tar.gz 2.6 MB With provenance Details for pikapro-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pikapro 0.2.0
File Actions
pikapro-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for pikapro-0.2.0-cp310-abi3-win_amd64.whl
pikapro-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for pikapro-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
pikapro-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for pikapro-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
pikapro-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for pikapro-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl
pikapro-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for pikapro-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl
pikapro-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for pikapro-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
pikapro-0.2.0-cp310-abi3-macosx_10_13_x86_64.whl CPython 3.10 abi3 macOS 10.13+ x86-64 Details for pikapro-0.2.0-cp310-abi3-macosx_10_13_x86_64.whl

Total release size: 21.2 MB

Release files / pikapro-0.2.0.tar.gz

Download URL pikapro-0.2.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b42dcaf653616f219854055ac43983b31855d42e7141cda72b1412fe396e48dd
BLAKE2b-256 checksum
How to use checksums
df5ff01d88fea577af735fe5ede0de9acbef8a15f0e9029b34cdc2b0e447185e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-win_amd64.whl

Download URL pikapro-0.2.0-cp310-abi3-win_amd64.whl
Size 2.7 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
74ae6918a8935e245bc44a4d15b3796fc5629e8524cf0e13ade038477930363c
BLAKE2b-256 checksum
How to use checksums
cc7453f3eb01bd245a5cbabc5dea8de5b9301a7359063aa675e61c4af5122054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL pikapro-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
73e59885fd392f312df68ae6a6d6be3019b147d581a0db5eab3d9a3aef7097bb
BLAKE2b-256 checksum
How to use checksums
0c905a0eff9307d150faa7e939cf235ce4591b20242b3665cf799cac4679bad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL pikapro-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
f49d70e8edea4a3590f113f88e5db6ff72e2658e43938eb0008638a8f1ef2ca9
BLAKE2b-256 checksum
How to use checksums
2a69e28b0fdd7ae9add3efbf28e2f5a7c00d71583794f29a4d7281b87439d66c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL pikapro-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
11bdcdb31feffc1597deb05b34563dde8c71b3005e94429346f58dd658237a7b
BLAKE2b-256 checksum
How to use checksums
ce2fac5098c77b41fa9581f00071bc9119cccb8434fe126a56d1ed04cc1fce18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL pikapro-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 2.6 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
8ac4ae5bd602248f2d26bdc45352139bc506f34f70ad77c126713d22aea1d6c8
BLAKE2b-256 checksum
How to use checksums
a5f017d1303cf766dad5f689c74d69044e9ceff7e9faba666dd723e001fc8d6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL pikapro-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f08c7253cc6ae6080abf4d92f58646bd427f6c0b78f0171d2b43d39729d820b6
BLAKE2b-256 checksum
How to use checksums
0336f558660a71a354d160566e6abb23a79a1c0071a31f81d809008816d64240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release files / pikapro-0.2.0-cp310-abi3-macosx_10_13_x86_64.whl

Download URL pikapro-0.2.0-cp310-abi3-macosx_10_13_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
7629e9963d3499ea8d09885370898acdc1c37e44d72f58b8728d35d433993fab
BLAKE2b-256 checksum
How to use checksums
f16bf05a43efa4b38e7a752e64f4f457b2d84fe376b67549ad1787a513934fb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Security for pikapro 0.2.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

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for pikapro-0.2.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 19, 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

8 release files Full provenance

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