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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| ct_engine-0.2.0-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.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| ct_engine-0.2.0-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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| ct_engine-0.2.0-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.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| ct_engine-0.2.0-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.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 6.0 MB
Release files / ct_engine-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ct_engine-0.2.0-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 |
3e18bf76cb5dbed37349b150e30f38bd7ffa8506e7d7934125ee5443753e6429
|
|
BLAKE2b-256 checksum How to use checksums |
eaec3f8ce675212cc48dfbafb6dd0935642f0141f10e7cc70ba151903bc19d5c
|
| 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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ct_engine-0.2.0-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 |
9f1bc3f76a5fdf9f0cbee18df5e3404687fadc23b45c3732cb0f822897d467d6
|
|
BLAKE2b-256 checksum How to use checksums |
be31e6d89e5821c74e69b815640a9a827d4f97c875b3a4959ecf044ecaf46446
|
| 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.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ct_engine-0.2.0-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 |
b4f5608e6f28ab610bc90d4fada18f45e0ac14c114f345237d66e386a9ec022c
|
|
BLAKE2b-256 checksum How to use checksums |
d8f2fdbaefec238c793db6dc0edb5a737686eaccaa49176978453822a955ff29
|
| 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.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ct_engine-0.2.0-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 |
3d11974a654a0c611d74bbad52891d56549ff10c251854709297d70cd12d6293
|
|
BLAKE2b-256 checksum How to use checksums |
412ced715af47ebc8a8e417ff8aa7f56830765442521acc28c3bb12fe0f763c7
|
| 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.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.