keisei

done

形成 — “to give form to, to shape.” Deep reinforcement learning for Shogi: PPO agents against a Rust engine.

Three further architectures sit behind the same registry as baselines, so results have something to be measured against.

keiseiRust · PythonMIT
What it is

The engine handles board representation, legal move generation and rule enforcement — drops, promotion, repetition and impasse included — and exposes a vectorised environment to Python through PyO3. The primary target is a multi-head architecture: a spatial policy over Shogi’s move semantics, a win/draw/loss value head, and score prediction as an auxiliary task. The registry also carries the ablations, and the harness is as much the deliverable as the agent. The SE-ResNet trunk, W/D/L value head and score head are adapted from KataGo (David Wu, 2019); the self-play approach originates with AlphaZero.

Use it
bash
uv pip install -e ".[dev]"
uv run keisei-train keisei-katago.toml \
  --epochs 100 --steps-per-epoch 256