Metadata-Version: 2.4
Name: ct-engine
Version: 0.1.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: numpy>=1.24
Requires-Dist: gymnasium>=0.29
Requires-Dist: pytest>=8 ; extra == 'dev'
Requires-Dist: maturin>=1.7,<2.0 ; extra == 'dev'
Provides-Extra: dev
Summary: High-performance deterministic Pokémon TCG rules, replay & CT-Bench research engine (Rust + PyO3)
Keywords: pokemon,tcg,reinforcement-learning,game-engine,replay,benchmark
Author: ct-engine contributors
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/chenxiao-guan/ct-engine/blob/main/docs/CT_BENCH.md
Project-URL: Homepage, https://github.com/chenxiao-guan/ct-engine
Project-URL: Issues, https://github.com/chenxiao-guan/ct-engine/issues
Project-URL: Repository, https://github.com/chenxiao-guan/ct-engine

# ct_engine (Python)

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

```bash
pip install ct-engine
```

```python
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`](../docs/UI_PROTOCOL.md) for `ct-ui/1`, and
[`docs/CT_BENCH.md`](../docs/CT_BENCH.md) for the replay/benchmark protocol.

