Shogi

Welcome
Shogi (将棋), also called the Game of Generals, is the Japanese cousin of the game of chess. Like chess, it is played on a board made up of squares by two players, and the players are given command over an army of pieces (20 each) in an attempt to force the enemy's king into "checkmate", a situation in which the king can be captured and its owner cannot parry this threat.

The game also has a number of innovations that set it apart from chess. The most interesting of these innovations is the "drop rule", which allows the players to place captured pieces back on the board as their own men. This rule seems to have been introduced in the 16th century, possibly connected to the practice of Japanese mercenaries of the time switching loyalties upon capture - no doubt as an alternative to execution. The rule and the tactical opportunities it creates make Shogi a contender for the most complex game in the chess family.

Arranging the Board
A shogi board (shōgi ban in Japanese) is made up of 9 by 9 squares, for 81 squares total. There are four dots on the board which mark the edges of the two promotion zones (which you will learn about later). Unlike the squares on a chess board, the squares on a shogi board are not differentiated by colour, and they are also not perfect squares (they tend to be rectangles that are taller than they are wide).

The pieces (koma in Japanese) are flat, wedge-profiled tokens shaped like an irregular pentagon. Each piece has its Japanese name, stylised in the form either one or two kanji, written on it in black ink. On the reverse side of most pieces there are different characters to mark the piece's promoted status. In amateur sets these promotion characters are written in another colour, usually red. Because the pieces need to be able to change ownership, they are not differentiated by colour, but rather by orientation - one's pieces face toward the opponent. The pieces also differ in size, with more important pieces being larger.

Each player has 20 pieces overall. They are, from largest to smallest (most to least powerful):
 * 1 king
 * 1 rook
 * 1 bishop
 * 2 gold generals
 * 2 silver generals
 * 2 knights
 * 2 lances
 * 9 pawns

At the start of a game, the pieces are set up as follows:


 * The king is placed in the centre of the row of squares closest to the player.
 * The gold generals are placed on both sides of the king.
 * The silver generals are placed on both sides of the gold generals.
 * This pattern repeats twice more with the knights and lances.
 * The bishop is placed in front of the knight on the left, and the rook is placed in front of the knight on the right.
 * The row in front of the bishop and rook is filled with the nine pawns.

If the board is set up correctly, the three rows closest to the player should look like this: In kanji, it looks like this:

Playing the Game
Like in chess, the object of shogi is to place the enemy king in checkmate, a situation in which the enemy king is under threat of being captured and there is nothing the owner of the enemy king can do to parry the threat. Like chess and its cousins, but unlike many other games, there is no element of chance in shogi - the outcome is determined by the skills and decisions the two players make.

The two players are called Black and White, or Sente (先手) and Gote (後手) in Japanese. Unlike in chess, Black makes the first move. Normally, this is decided by a furigoma, Japanese for piece toss. One player takes five of their pawns and throws them in the same manner they would roll dice. When the pawns land, they are sorted according to if they landed promoted side up or not. If the number of pawns which landed promoted side up is greater than unpromoted side up, the tossing player plays White.

After Black has moved, White moves, then Black, then White, and so on until the game ends. Like in chess, there are a number of different move types in shogi:
 * A move consists of moving a single piece, in accordance with its rules of movement, to a square that is unoccupied or occupied by an enemy piece. A player may never move a piece onto a square already occupied by another of his or her own pieces.
 * If a piece is moved onto a square occupied by an enemy piece, the latter piece changes sides and is transferred to its captor's hand. The removed piece is said to have been captured or taken.
 * A drop consists of taking a piece in hand and placing it on an unoccupied square. A dropped piece immediately begins affecting the game (for instance, dropped pieces can give check).
 * Exception: There are a number of rules concerning how pawns may be dropped, and how pieces may be dropped close to the farthest edge of the board from where they start.
 * All pieces move and capture opponent pieces in the same way.
 * Most pieces may only make a move to a non-adjacent square if all the intervening squares are vacant (pieces may not 'jump over' other pieces).
 * Exception: The knight can move to either suitable final square regardless of occupants of other squares.
 * No player may make a move that leaves their king "in check" (see below).
 * The player must always make a move when it is his or her turn. In other words, he or she cannot choose not to make a move. In the very rare circumstance where no legal move is possible, the player who cannot move loses the game.

A shogi diagram is always printed form the perspective of Black (Sente):

The pieces
This section describes the individual pieces (in their unpromoted state) and how they move. In the diagrams, the squares to which each piece can move are highlighted with a yellow tint.

The pawn
The pawn's Japanese name is fuhyo (kanji 歩兵), meaning 'foot soldier'. Like its western chess counterpart, the pawn may only move one step forward. Unlike a western pawn, however, a shogi pawn is not given the option of a double-step on its first move, and it captures the same way as it moves.

The lance
The lance's Japanese name is kyosha (kanji 香車), meaning 'incense chariot'. It can move a unlimited number of unobstructed squares forward until it reaches an obstacle, such as another piece or the edge of the board.

The knight
The knight's Japanese name is keima (kanji 桂馬), meaning 'cassia horse'. Like the western knight, the shogi knight moves in an L-shape: two squares forward followed by another square at a 90 degree angle. Like its western counterpart, the shogi knight is allowed to jump over obstructions, the only piece able to do so. The shogi knight, however, is much more restricted in terms of motion; it can only move forward, not sideways or backward, giving it two options.

The silver general
The silver general's Japanese name is ginsho (kanji 銀將). It may move one step diagonally or one step straight forward, giving it five directions of motion.

The gold general
The gold general's Japanese name is kinsho (kanji 金將). It may move one step forward, backward, sideways or diagonally forward, giving it six directions of motion.

The king
The king is the only piece whose kanji differ between the two sides. Black's king has the Japanese name gyokusho (kanji 玉將), meaning 'jeweled general', and white's king has the Japanese name osho (kanji 王將), meaning 'king general'. Whatever the name, the king moves like his western counterpart: one square in any direction. Like in western chess, the king may not move onto a square where he would be under attack.

The rook
The rook's Japanese name is hisha (kanji 飛車), meaning 'flying chariot'. Like its western counterpart, it can move a unlimited number of unobstructed squares forward, backward or sideways until it reaches an obstacle, such as another piece or the edge of the board.

The bishop
The bishop's Japanese name is kakugyo (kanji 角行), meaning 'angle mover'. Like its western counterpart, it can move a unlimited number of unobstructed squares diagonally until it reaches an obstacle, such as another piece or the edge of the board. Due to being unable to move forward, backward or sideways, an unpromoted bishop can only reach half of the squares on the board.

Promotion
In western chess, pawns may promote into a more powerful piece if they reach the end of the board without capture or mishap. In shogi, on the other hand, any piece save for the king and gold generals may promote. The area of the board in which pieces may promote is called the promotion zone, and it consists of the three ranks furthest from the player. The edges of the promotion zones are typically marked with a pair of dots at the edge. In this diagram, Black's promotion zone is marked in yellow and White's promotion zone is marked in grey.

If a promotion-capable piece makes a move which has it pass into, through or out of the promotion zone, the player is given the option of promoting that piece. Promotion is optional - the player can choose to leave the piece unpromoted if they want. If they do decide to promote that piece, the piece is flipped over to reveal its promoted character on the back. The promoted pieces move as follows:

The promoted pawn, lance, knight and silver
The promoted pawn's Japanese name is tokin (kanji と金), meaning 'reaches gold', the promoted lance's Japanese name is narikyo, (kanji 成香), meaning 'promoted incense', the promoted knight's Japanese name is narikei, (kanji 成桂), meaning 'promoted cassia', and the promoted silver's Japanese name is narigin (kanji 成銀), meaning 'promoted silver'.

All four of these pieces swap out their move for the move of a gold general. Because the unpromoted lance, knight and silver can move in ways that a gold general cannot, it is often tactically advantageous to leave these pieces unpromoted.

In a real set, the tokin is represented using the hiragana character と, which represents the syllable "to". The other pieces use cursive forms of the character 金, which means 'gold'. These cursive characters have the approximations of 全, 今 and 仝 for promoted silvers, knights and lances respectively. This article uses a different convention, which uses abbreviated version of the unpromoted characters for the promoted pieces, which you can see in the diagram above. below is a table comparing the two conventions:

The promoted bishop
The promoted bishop's Japanese name is ryuma (kanji 龍馬), meaning "dragon horse". It retains its diagonal movement powers, but is also given the ability to move one step forward, backward or sideways.

The promoted rook
The promoted rook's Japanese name is ryuo (kanji 龍王), meaning "dragon king". It retains its orthogonal movement powers, but is also given the ability to move one step diagonally. This makes the promoted rook the most powerful pieces on the shogi board.

Mandatory promotions
There is one key exception to the optional nature of promotions. If a pawn, lance or knight is moved to a space where said piece would have no further legal moves, then promoting that piece is mandatory. So a pawn or lance moving to the furthest rank must promote, and a knight moving to one of the furthest two ranks must promote.

Drops
In chess, if a piece is captured, it is moved off-board and is out of play for the rest of the game. However, as already stated, shogi allow players to reuse captured pieces. If a piece is captured in shogi, it is truly captured - the piece is turned around to show its new ownership and is placed just off-board from the player who captured it. The piece is now said to be "in hand". If the captured piece is promoted, it loses its promoted status.

On subsequent turns, if a player wants to, then instead of moving a piece they may take a single piece in hand and place it, in its unpromoted state, on any unoccupied square on the board, subject to certain restrictions. As soon as the piece is on the board, the drop is complete and the player's turn is over. The dropped piece immediately begins affecting the game - for instance, dropped pieces can give check.

Drop restrictions
There are three key restrictions to how pieces may be dropped:


 * A pawn, lance or knight may not be dropped on a square where it would have no legal move. So a pawn or lance may not be dropped on the last rank, and a knight may not be dropped on the last or penultimate rank.
 * A pawn may not be dropped in any square on a file that already contains an unpromoted pawn of that player.
 * A pawn may not be dropped to give an immediate checkmate.

Check and checkmate
Like in western chess, if a player makes a move that threatens to capture their opponent's king on the next move, the king is said to be in check. The player who is in check must use their very next move to escape the check. There are four ways to do so:


 * Move the king out of danger.
 * Move a piece in between the king and the attacker.
 * Capture the attacker.
 * Drop a piece in between the king and the attacker.

If the situation arises where the king is in check and there is no legal move, the king is said to be in checkmate, and that player has lost the game.

Other ways for a game to end
There are three other ways for a game of shogi to end: illegal move, repetition and impasse.

Illegal move
If a player makes an illegal move, such as moving a piece in the wrong manner or dropping a pawn on a file already occupied by another of their unpromoted pawns, that player automatically loses the game.

Repetition
If the same board position with the same player to move and the same pieces in hand has arisen for the fourth consecutive time, the game ends in a draw.

Impasse
If the rare situation arises where both kings have advanced into each others' promotion zones, and neither player can hope to checkmate the other or gain further material, they may agree to an impasse. If this happens, the players stop making moves, and count up their pieces (including pieces in hand), scoring points for each:


 * The king is not worth any points.
 * Rooks and bishops are worth five points each.
 * All other pieces are worth one point.

A piece's promotion status is irrelevant when counting points.

If one of the players has fewer than 24 points. they lose the game, and their opponent wins. However, if both players have at least 24 points, the game ends in a draw.

Handicaps
Shogi has a handicap system similar to go, which allows for games to be played between players of disparate strengths. In a handicap game, the stronger player plays White and is allowed to move first, rather than black as in a standard game. However, to compensate for this one or more of White's pieces are removed from the game. They are not put in hand - they are removed from the game altogether. Also, on the last two rows, a Knight must promote, but a Pawn or Lance on the last row must promote as well.

The most common handicaps are, in increasing order of severity:


 * White moves first
 * White moves first and forfeits his left lance
 * White moves first and forfeits his bishop
 * White moves first and forfeits his rook
 * White moves first and forfeits his rook and left lance
 * White moves first and forfeits two pieces: his rook and bishop
 * White moves first and forfeits four pieces: his rook, bishop and both lances
 * White moves first and forfeits six pieces: his rook, bishop, both lances and both knights
 * White moves first and forfeits eight pieces: his rook, bishop, both lances, both knights and both silvers
 * White moves first and forfeits ten pieces: all of his pieces aside from his king and pawns
 * Three pawns: White moves first and forfeits all of his pieces except for his king, and he also starts with three pawns in hand
 * Naked king: White moves first and forfeits all of his pieces except for his king