Skip to main content

ct_engine (Python)

High-performance, deterministic Pokémon TCG Standard engine with zero-copy NumPy observations, deterministic replay, and CT-Bench scoring.

pip install ct-engine
import json
import numpy as np
import ct_engine

decks = ct_engine.builtin_decks()
g = ct_engine.Game(decks["Dragapult"], decks["N's Zoroark"], seed=42)
print(g.turn(), ct_engine.rule_hash(), len(ct_engine.all_card_data()))

# ct-ui/1: legal-perspective snapshot + semantic action descriptors
ui = g.ui_snapshot(viewer=0)
acts = g.action_descriptors(viewer=0)

# Single-seat Gymnasium environment / vectorised BatchEnv are also exported:
# from ct_engine import PTCGEnv, PTCGVectorEnv

case = open("bench/cases/dragapult-midgame.json").read()
actions = json.loads(case)["reference_actions"]
print(json.loads(ct_engine.bench_score(case, actions))["score"])

The wheel bundles the Rust extension (ct_engine._ct_engine); no Rust toolchain is required at install time. See the repository root README, docs/UI_PROTOCOL.md for ct-ui/1, and docs/CT_BENCH.md for the replay/benchmark protocol.

Metadata

Release files for ct-engine 0.2.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 ct-engine 0.2.1
File Actions
ct_engine-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for ct_engine-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ct_engine-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for ct_engine-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ct_engine-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for ct_engine-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
ct_engine-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for ct_engine-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Total release size: 6.0 MB

Release files / ct_engine-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ct_engine-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0f945a21ff6cc762e418b834caeab749c83e23960ec320f11ac99c0d7d3a0ce2
BLAKE2b-256 checksum
How to use checksums
4804815e5676ccd0a75a474e71890ab09c7e01ed8a790389041ec6c935def6e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ct_engine-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ct_engine-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
477c5712c0a2047a282016f9cfc9a0dc0f1e0d203928e6d463b060cf2dffa4ab
BLAKE2b-256 checksum
How to use checksums
8a41de0ea85a5357b60aba344d2ab084202d0172636f51734e1ef39b751cf8f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ct_engine-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ct_engine-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
61a5b7dbd6dcfbc5f3c753b337f40726ecc75fa73622257d8f0fcad9217738ad
BLAKE2b-256 checksum
How to use checksums
ffef82232a10b9d6344cba764f5713ef69703a9c2f67bc410eb7e70654b84e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ct_engine-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL ct_engine-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6832a1dcc41ecc17820ad2f2e49b318b8cf07cf583bc24272af27c0e653870e2
BLAKE2b-256 checksum
How to use checksums
749cdb0be8f84c0c237d1eb1cd37d4bab7f32420a91827d9b0e0d08136634c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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