PlayRulesResearchPuzzlesPrint & play日本語

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):

RulesGames1st wins2nd winsDraws1st win %
excl. draws
Intro2,4001,1141,153133 (5.5%)49.1%
±2.1%
Beginner5,8502,7132,865272 (4.6%)48.6%
±1.3%
Intermediate3,4001,2781,500622 (18.3%)46.0%
±1.9%
Advanced3,9001,8551,819226 (5.8%)50.5%
±1.6%
For every level the first-player win rate is close to 50% — no clear first-move advantage. Intermediate (46.0%) and Beginner (48.6%) even lean slightly toward the second player. Because players can drop pieces from hand, moving first matters less, and the second player can react by stacking on or pinning the opponent's pieces. However, when the trained AIs played each other, Intermediate went back to about 50%, so stronger engines are needed before calling it a second-player game.
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:

General 大632
Lt. General 中538
Major General 小313
Lancer 槍258
Rider 馬240
Ninja 忍232
Samurai 侍231
Fortress 砦219
Soldier 兵100
PieceOn boardIn handPinned under an enemy
General 大632575353
Lt. General 中538489300
Major General 小313288174
Lancer 槍258241143
Rider 馬240229129
Ninja 忍232219128
Samurai 侍231219125
Fortress 砦219207121
Soldier 兵1009357
The General (like a promoted rook) is worth about 6 Soldiers and the Lt. General about 5 — an order close to shogi's rook and bishop. The striking column is the last one: a piece pinned under an enemy loses roughly half of its value. Pieces in hand are valued about 10% lower than the same piece on the board — a working piece beats a piece waiting to be dropped.

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:

ChangeGamesModified AI score
Bonus for advancing the Marshal (weak)12042.5%
Bonus for advancing the Marshal (strong)20048.8%
Penalty for advancing (= prefers staying home)6050.8%
Pushing the Marshal forward never beat the original (within the margin of error or slightly worse). For this engine at least, keeping the Marshal at home is not a mistake. Since nothing can stack on a Marshal, staying deep in your camp surrounded by your own pieces seems to be safe enough.

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.

RulesTraining positionsTrained vs. untrained AIScore
Intro~890k (3 rounds)81W 27L 12D72.5%
2.6 s/move, ≈ +170 Elo
Beginner~420k (2 rounds)61W 41L 18D58.3%
0.3 s/move, ≈ +60 Elo
Intermediate~420k (2 rounds)57W 32L 31D60.4%
0.3 s/move, ≈ +70 Elo
Advanced~220k (2 rounds)65W 34L 21D62.9%
0.3 s/move, ≈ +90 Elo

Score = trained NN engine vs. the same search without the NN, with colours swapped.

How it works (Intro rules)

What's next

Play Kasane Shogi ▶ Rules / Daily puzzle