A heavily modified version of japlace, using a patched poke-engine backend with a learned policy network and additional search improvements for Pokémon Showdown.
The project combines Laplace's existing battle AI with:
- Learned policy priors for MCTS
- Item, Ability, and Tera prediction
- Hidden-information posterior sampling
- Battle history features
- PUCT / regret-matching root search
- Optional opponent-action heuristics
- Policy training and self-play data generation
- Built-in A/B benchmarking
cd poke-engine-main/poke-engine/poke-engine-py
maturin develop --release --features poke-engine/gen9,poke-engine/terastallizationcd ../../Laplace-Pokemon-Showdown-AIActivate your virtual environment:
.venv\Scripts\activatepython -m laplace.cli.gen_policy_data --battles 500 --workers 10 --det 4 --time-ms 60Training data is written to:
data_policy/
python -m laplace.cli.train_policy --epochs 30The trained model is saved as:
models/policy_net.pt
Compare the trained policy against the baseline:
python -m laplace.cli.bench_ab --battles 100 --workers 10 --challenger-kwargs "{\"policy_model_path\":\"models/policy_net.pt\"}"Once models/policy_net.pt exists:
python -m laplace.cli.ladder --format gen9randombattleThe ladder client automatically loads the trained policy model.
japlace/
├── poke-engine-main/
│ └── poke-engine/
├── Laplace-Pokemon-Showdown-AI/
│ ├── laplace/
│ ├── models/
│ └── data_policy/
├── poke-engine-root-prior.patch
└── laplace-phase1-policy-net.patch
This repository is a custom japlace modification, combining the original Laplace battle system with new neural-policy, search, and hidden-information features.