What is Shogi?
Shogi (将棋), also called Japanese chess, is a board game on a 9 by 9 grid where Sente and Gote each move 20 pieces in turn and win by checkmating the enemy king. What sets it apart from every other chess is that a captured piece becomes yours and can be dropped back onto any empty square, so the board never empties and the attack never stops.
All pieces are the same colour: wedge shaped tiles that point toward the opponent, so you tell sides apart by direction. A piece that enters the three ranks nearest the opponent may flip over and promote to a stronger piece, and a captured piece returns to its captor's stand (komadai) unpromoted. This version plays with the full standard rules, offers easy, normal and hard computer opponents, and lets two people share one screen.
How do the Shogi pieces move?
Each side has 1 king, 1 rook, 1 bishop, 2 golds, 2 silvers, 2 knights, 2 lances and 9 pawns, 20 pieces in all. The rook and bishop are the strongest, the gold is the model for every promoted piece, the knight only jumps forward, and the pawn moves one square forward.
| Piece | Character | Movement | Promoted |
|---|---|---|---|
| King | 王 · 玉 | One square in any of the eight directions | none |
| Rook | 飛 | Any distance orthogonally | 龍 (dragon): rook plus one square diagonally |
| Bishop | 角 | Any distance diagonally | 馬 (horse): bishop plus one square orthogonally |
| Gold | 金 | One square forward, forward diagonal, sideways or backward (not backward diagonal) | none |
| Silver | 銀 | One square forward, forward diagonal or backward diagonal (not sideways or straight back) | 全: moves like a gold |
| Knight | 桂 | Two squares forward then one sideways, jumping over pieces. Never backward | 圭: moves like a gold |
| Lance | 香 | Any distance straight forward | 杏: moves like a gold |
| Pawn | 歩 | One square forward | と (tokin): moves like a gold |
The computer values pieces roughly as pawn 1, lance 3.5, knight 4.5, silver 5.5, gold 6, bishop 9.5 and rook 11, and a promoted pawn counts the same as a gold. Turning a single pawn into a gold is why pushing pawns into the enemy camp is the basic attack in shogi.
When and how do pieces promote?
A piece may promote at the end of any move that starts or ends inside the three ranks nearest the opponent. The king and gold never promote, and a promoted piece reverts to its original form when captured.
- Your choice: A silver, knight or lance loses its backward or jumping power when promoted, so you may decline. Whenever both options are legal this game shows the promoted and unpromoted tiles side by side and lets you pick.
- Automatic: Promoting a rook, bishop or pawn is never a disadvantage, so they become 龍, 馬 and と the moment they reach the zone.
- Forced: A pawn or lance on the last rank, or a knight on the last two ranks, could never move again, so it must promote.
- Colour: Promoted pieces are written in red (龍 馬 全 圭 杏 と) so they stand out at a glance.
How do captured pieces come back?
A captured piece goes to your stand, and on your turn you may drop one piece from the stand onto any empty square instead of moving a piece. It enters unpromoted and a drop can never promote. Three restrictions apply.
| Restriction | Meaning |
|---|---|
| Nifu (二歩) | No pawn may be dropped on a file that already has one of your unpromoted pawns. The most common illegal move |
| Uchifuzume (打ち歩詰め) | A pawn drop may not deliver immediate checkmate. Checkmate by moving a pawn is fine |
| Dead squares | A pawn or lance may not be dropped on the last rank, nor a knight on the last two ranks |
When you tap a piece on the stand, this game only marks the squares where the drop is legal, so nifu and dead squares never happen and squares that would be uchifuzume are left out automatically. On the keyboard, keys 1 to 7 pick the rook, bishop, gold, silver, knight, lance and pawn from your stand in that order.
How does a game of Shogi end?
If you are in check and no move can escape it, you lose by checkmate (tsumi). A side with no legal move loses even without check, and a position that repeats four times is a draw by sennichite.
- No self check: A move that leaves your king under attack is illegal and never appears among the highlighted squares.
- Sennichite: When the board, both stands and the side to move repeat for the fourth time, the game is a draw. If every move one side made in between was a check, that side loses for perpetual check.
- Entering kings: When both kings reach the enemy camp and checkmate becomes unlikely, the formal rules count points. This game keeps it simple and declares a draw once 300 plies have been played.
How is Shogi different from Janggi and Xiangqi?
The three games share an ancestor, but only shogi reuses captured pieces and has promotion, and it has no river or palace and places pieces inside squares rather than on points. Keeping the differences in mind makes it easy to switch. You can also play Janggi and Xiangqi against the computer here.
| Item | Shogi (Japan) | Janggi (Korea) | Xiangqi (China) |
|---|---|---|---|
| Board | 9 by 9 squares, pieces inside squares | 9 by 10 points, palace | 9 by 10 points, river and palace |
| Pieces | 20 per side, 8 kinds | 16 per side, 7 kinds | 16 per side, 7 kinds |
| Shape | Same colour wedges, told apart by direction | Octagons, red and green sides | Round discs, red and black sides |
| Captured pieces | Dropped back as your own | Removed from play | Removed from play |
| Promotion | Flip in the far three ranks | None | None |
| King | May go anywhere | Confined to the palace | Confined to the palace, may not face the other king |
| Cannon | None | Moves and captures by jumping one piece | Jumps one piece only to capture |
| No legal move | That side loses | That side passes | That side loses |
How strong are the computer levels?
Easy looks one ply ahead and deliberately mixes in shaky moves, normal looks three plies ahead, and hard reads as far as it can within one second, usually five to seven plies. All three avoid moves that would lose by sennichite.
The engine uses alpha beta pruning with iterative deepening and keeps examining captures until the position is quiet. Because drops are counted as well, a typical position offers more than 80 candidate moves, but the engine thinks on a separate worker thread so the screen never freezes. On the first screen you can choose to play Sente (first) or Gote (second); choosing Gote flips the board so your pieces are at the bottom. Wins, losses and draws are kept per level in this browser.
Tips for Shogi beginners
- Open the bishop's diagonal first. Pushing the pawn in front of the bishop (7六歩) is the classic first move. Pushing the rook's pawn (2六歩) is the other common choice.
- Move the king away from the rook. The rook's side of the board becomes the battlefield. Walking the king to the other side and surrounding it with golds and silvers is called a castle (kakoi), and without one a single drop can bring the king down.
- Check the file before dropping a pawn. Nifu is an instant loss in formal play. This game prevents it, but get used to noticing which files already hold one of your unpromoted pawns.
- Drop pieces next to the enemy king. Most checkmates come from dropping a gold or silver right beside the king. When you have a gold in hand, look at the empty squares around the enemy king first.
- Silvers attack, golds defend. A silver can retreat diagonally, which makes it a good piece to push forward, while a gold moves sideways and straight back, which makes it a good guard.
- Do not delay promotion. A pawn that enters the enemy camp becomes a tokin worth a gold at once. A rook or bishop only has to pass through the zone to become a dragon or horse.
Controls
- Phone and mouse: Tap a piece to lift it and show its reachable squares, then tap a square to place it. You can also drag and drop. Tap or drag a piece from your stand onto an empty square to drop it.
- Choosing promotion: When both options are legal, two tiles pop up. The red one promotes, the plain one keeps the piece as it is. Enter promotes, N declines and Esc cancels.
- Keyboard: Arrow keys or WASD pick a square, Enter or Space picks up or places a piece. Keys 1 to 7 pick a piece from your stand (rook, bishop, gold, silver, knight, lance, pawn). Esc cancels and Ctrl+Z undoes.
- Undo: Against the computer it takes back your move and the computer's reply together; in two player mode it takes back the last move. A dropped piece returns to the stand.
- Sound: The speaker button at the top right toggles the sharp snap of a piece landing on the board. The setting is saved in your browser.
The pieces use the Japanese characters (王 玉 飛 角 金 銀 桂 香 歩, promoted 龍 馬 全 圭 杏 と). The board and pieces are drawn entirely in code; only your records and settings are stored in this browser and nothing is sent to a server.