Kasane Shogi research
What AI self-play tells us about a Gungi-inspired stacking game
We let our own engine play itself thousands of times in Kasane Shogi, an unofficial Gungi-inspired board game, to study the game. All numbers come from this site's engine; human games may behave differently. New to the game? Read the rules first. Last updated: 2026-12-05
Is moving first an advantage?
In shogi and chess the first player is thought to have a small edge. We ran large numbers of computer-vs-computer games for each rule level (a few plies of search, random first moves for variety):
| Rules | Games | 1st wins | 2nd wins | Draws | 1st win % excl. draws |
|---|---|---|---|---|---|
| Intro | 2,400 | 1,114 | 1,153 | 133 (5.5%) | 49.1% ±2.1% |
| Beginner | 5,850 | 2,713 | 2,865 | 272 (4.6%) | 48.6% ±1.3% |
| Intermediate | 3,400 | 1,278 | 1,500 | 622 (18.3%) | 46.0% ±1.9% |
| Advanced | 3,900 | 1,855 | 1,819 | 226 (5.8%) | 50.5% ±1.6% |
Draws stand out in Intermediate (18%): from that level the Marshal (king) may stack, and a Marshal on tier 2 cannot be captured by tier-1 pieces, so mating gets harder. In Advanced (3-high towers) attackers can build tall pieces too, and draws drop to 6%.
± is a rough 95% confidence interval. Results change with engine strength and search depth.
Piece values learned by the AI
The engine's evaluation function was fitted to self-play results. Here is the learned value of one piece, scaled so that a Soldier = 100:
| Piece | On board | In hand | Pinned under an enemy |
|---|---|---|---|
| General 大 | 632 | 575 | 353 |
| Lt. General 中 | 538 | 489 | 300 |
| Major General 小 | 313 | 288 | 174 |
| Lancer 槍 | 258 | 241 | 143 |
| Rider 馬 | 240 | 229 | 129 |
| Ninja 忍 | 232 | 219 | 128 |
| Samurai 侍 | 231 | 219 | 125 |
| Fortress 砦 | 219 | 207 | 121 |
| Soldier 兵 | 100 | 93 | 57 |
Should the Marshal stay home?
Our AI almost never moves its Marshal (king) from the starting square. In shogi an unmoved king is considered bad shape. To test it, we changed the evaluation to reward (or penalise) advancing the Marshal and played the modified AI against the original:
| Change | Games | Modified AI score |
|---|---|---|
| Bonus for advancing the Marshal (weak) | 120 | 42.5% |
| Bonus for advancing the Marshal (strong) | 200 | 48.8% |
| Penalty for advancing (= prefers staying home) | 60 | 50.8% |
Making the AI stronger with a neural network
The "strong" computer adds a small neural network (NN) correction to a hand-made evaluation function. The NN learns from positions collected in self-play; then the trained AI plays itself again and the NN is retrained.
| Rules | Training positions | Trained vs. untrained AI | Score |
|---|---|---|---|
| Intro | ~890k (3 rounds) | 81W 27L 12D | 72.5% 2.6 s/move, ≈ +170 Elo |
| Beginner | ~420k (2 rounds) | 61W 41L 18D | 58.3% 0.3 s/move, ≈ +60 Elo |
| Intermediate | ~420k (2 rounds) | 57W 32L 31D | 60.4% 0.3 s/move, ≈ +70 Elo |
| Advanced | ~220k (2 rounds) | 65W 34L 21D | 62.9% 0.3 s/move, ≈ +90 Elo |
Score = trained NN engine vs. the same search without the NN, with colours swapped.
- Input: pieces on the board (81 squares × 3 tiers × own/enemy × piece type) and pieces in hand
- Output: a correction to the hand-made evaluation (residual learning)
- Size: about 390k parameters (~390 KB download), running inside your browser
- Training target: the value of a shallow (3-ply) search. Mixing in game results made it weaker.
What's next
- Opening patterns and their win rates
- New ways to fight in Advanced (3-high towers)
- Better automatic puzzle generation