From: Pieter Stouten EMBL BITNET> Date: 8 may 1990 Subject: General Shogi Information Dear Shogi fans, Below is given the text extracted from the Shogi Stack written by Chris Sterritt and the board used in E-mail correspondence Shogi. The text is in the process of being updated, corrected and expanded, but I felt everybody subscribing to SHOGI-L should get it now. Also something like this posting MUST be in the SHOGI-L archive for future subscribers. Apart from that I'd like to mention that in order to get the Shogi Discussion List to work, we should at least produce a flow of Shogi information. I'll try to post some (maybe) interesting things, but can do it better when I get specific questions. So, please feel free ... All the best, Pieter Stouten bitnet: stouten@embl --------------------------------------------------------------------------- Introduction Shogi is a Japanese board game. It is played on a nine-by-nine board. [This needs expansion!! Any ideas?] Why aren't there two colors? In the game of Shogi, the pieces are differentiated only in direction, rather than by color (although the player moving 'up' is referred to as black, and his opponent white). That is, there is the player moving down from the top of the screen (his piece's icons are upside down), and the player moving up from the bottom (whose icons are right side up). This is because when a piece is captured, it may later be dropped onto the board as a piece for the side that captured it! And so in Shogi sets, the pieces are the same color. See the section on Capturing for more information. The Pieces The eight pieces are as follows: (click on any to find out more about it) The King -- one step in any direction per move The Gold General -- one step per move any way except diagnoally down The Silver General -- one step per move up or diagonally The Bishop -- moves diagonally any distance The Rook -- moves vertically or horizontally any distance The Knight -- one step to left or right, and two steps up; may jump others The Lance -- moves up any distance The Pawn -- one step forward The King The King is very similar to the King in western chess. He can move one square in any direction, and he must be protected at all costs! When the King is put under attack (that is, when a player puts a piece in such a position that on that piece's next move it would take the King) the King must either be moved out of attack, take the attacking piece, or have another piece from his side take the piece or move in between him and the attacker. Attacking the King is called putting the King 'in Check'. Also, if a piece is between the King and an attacker, that piece cannot move so that the King becomes attacked! This is called 'pinning' a piece, and is a very useful tactic. The only way to win the game is by what is called 'Checkmating' the king, which means to attack him, leaving him no means of escape, capture or hiding. See the section on Winning & Losing. The Gold General The Gold General stands next to the King, and is one of his most agile guards. The Gold General only can move one step at a time, and only in the directions shown on his piece. When the Pawn, Lance, Knight, and Silver General are Promoted (see the Promotion section), they move like Gold Generals, until they are captured. The Silver General The Silver General is like the Gold General in that it moves only one square at a time. It stands next to the Gold Generals on each side of the King, and it may Promote to move like a Gold General (see the Promotion section). The Bishop The Bishop moves diagonally. It may move any number of squares in either diagonal direction. When it Promotes, it is allowed to move one square in either the horizontal or vertical direction as well (see the Promotion section). The promoted Bishop looks like this: (icon) The Rook The Rook moves vertically or horizontally. It may move as many squares in either the horizontal or vertical directions that it wants. When it is promoted, it is allowed to move one square in either of the diagonal directions as well (see the Promotion section). The promoted Rook looks like this: (icon) The Knight The Knight (identified by an 'N' so he isn't confused with the King) may move to only two spots from where he is. He may move two squares forward and one to either the right or the left. He is also the only piece that can jump over another piece (of either side). When he is promoted, he moves like a Gold General (see the Promotion section). The Lance The lance is something like a Rook which can only move forward. The Lance can move forward as many steps as he wants. When he is promoted, he moves like a Gold General (see the Promotion section). The Pawn The pawn is the least mobile piece, but there are very many of them! The Pawn can only move one step forward at any time. When it is promoted, it moves like a Gold General (see the section on Promotion). The Pawn is also limited in drops (see the section on Capturing & Dropping Pieces). Promotion Any piece that reaches any of the three rows furthest from where it starts can be promoted to a more powerful piece. Whether to promote or not is up to the owner of the piece, except in the case of the Pawn, Lance and Knight. If a Pawn or a Lance moves to the last row, or a Knight moves to either of the last two rows, it must be promoted. At all other times, promotion is optional. The promotion happens at the end of a move that starts and/or ends in the three furthest rows. Pawns, Knights, Lances and Silver Generals promote to move like Gold Generals. Rooks promote to the advanced Rook that can move one square diagonally. Bishops promote to the advanced Bishop that can move one square horizontally or vertically. Kings and Gold Generals don't promote. Captureing & Dropping Pieces When one piece moves into the same square as an opponent's piece, the opponent's piece is captured. Unlike western chess, in which a captured piece is gone forever, in Shogi the captured pieces become part of the capturer's force! In a later move, instead of moving a piece, a player may 'Drop' a piece that he has captured from his opponent onto the board anywhere (with a few restrictions). This makes for a very interesting game! It is also the main reason why the pieces aren't colored. There are only three restrictions on Dropping a piece. First, you may not drop a Pawn, Knight or Lance onto a square from which it will never be able to move. Second, a dropped Pawn cannot cause checkmate by being dropped. Finally, there may be no more than one Pawn per vertical row for each player. Also, if a piece has been promoted, when it is captured it reverts to its unpromoted rank. Winning & Losing The game of Shogi tends to have very few draws, mainly because of the Drop rule. The only way to win is by putting the opposing King in what is called 'Checkmate', a state in which the King is attacked and the opponent cannot either: Move the King out of attack; Move another piece in between the attacking piece and the King; Take the attacking piece with another piece (or with the King). When one player has no other move than to place his King into check (so that it would be captured on the next move), he has also lost. Playing against the Mac [obviously this section needs updating!] The program I plan to implement as an XCMD (a program written outside of HyperCard) to play Shogi probably won't play a very good game! My main excuses for this horrible state of affairs are that (1) I've only ever played one game of Shogi in my life, therefore, (2) I don't know very much about how to play! However, I am an incurable optimist, and have written programs to play other games, and I have a pretty good knowledge of Artificial Intelligence techniques for making strong programs. I am limited in this task in that I do have a 'real' job, and am only doing this in my spare time. Pretty thin excuses all around, eh? More Information on Shogi I found out everything I know about Shogi from the very interesting book titled "Computer Gamesmanship: Elements of Intelligent Game Design" by David Levy. It is a very interesting book that gives ideas on how to write programs that play good games of Checkers, (western) Chess, Bridge, Poker, Othello, Dominoes, Backgammon, Go-Moku, Rummy and Shogi. It contains excellent information on how to program the main AI techniques of intelligent game design, such as Alpha-Beta search, evaluation functions, Killer Heuristics, etc. It is published by Simon & Schuster of New York. It's fun to read even if you never want to write a program. Levy warns his readers strongly AGAINST all Shogi books (not printed in Japanese) printed before 1983. He recommends the book "How to Play Shogi" written by John Fairbairn, and The Shogi Association, P.O. Box 77, Bromley, Kent, England for literature on Shogi. --------------------------------------------------------------------------- The standard intial setup used in E-mail correspondence games looks like this 9 8 7 6 5 4 3 2 1 +--------------------------------------------+ White in hand: | wL | wN | wS | wG | wK | wG | wS | wN | wL | a +------------------+ +--------------------------------------------+ | | | | wR | | | | | | wB | | b | | +--------------------------------------------+ +------------------+ | wP | wP | wP | wP | wP | wP | wP | wP | wP | c +-------------------------------------------- | | | | | | | | | | d w = white, b = black +--------------------------------------------+ L = lance, N = knight | | | | | | | | | | e S = silver, G = gold +--------------------------------------------+ K = king, R = rook | | | | | | | | | | f B = bishop, P = pawn +--------------------------------------------+ | bP | bP | bP | bP | bP | bP | bP | bP | bP | g +--------------------------------------------+ Black in hand: | | bB | | | | | | bR | | h +------------------+ +--------------------------------------------+ | | | bL | bN | bS | bG | bK | bG | bS | bN | bL | i | | +--------------------------------------------+ +------------------+