1 This is gnushogi.info, produced by makeinfo version 4.3 from
4 This file describes how to use GNU shogi, a program which plays
5 Shogi (Japanese chess).
7 Copyright (C) 1999 Michael C. Vanier and the Free Software
10 Permission is granted to make and distribute verbatim copies of this
11 manual provided the copyright notice and this permission notice are
12 preserved on all copies.
14 Permission is granted to copy and distribute modified versions of
15 this manual under the conditions for verbatim copying, provided that
16 the entire resulting derived work is distributed under the terms of a
17 permission notice identical to this one.
19 Permission is granted to copy and distribute translations of this
20 manual into another language, under the above conditions for modified
21 versions, except that this permission notice may be stated in a
22 translation approved by the Free Software Foundation.
25 File: gnushogi.info, Node: Mating problems, Next: Shogi variants, Prev: Sample game, Up: About shogi
30 One good way to improve at shogi is to solve mating problems. There
31 are several types of these problems, but the most common is called a
32 "tsume-shogi" problem, or "tsume" problem for short. In a tsume
33 problem, all pieces that are not on the board are assumed to be in the
34 opponent's hand (except for your King, which is usually not shown).
35 Every move you make must be check until the final checkmate. Your
36 opponent may play any piece on the board or drop any of his pieces in
37 hand in order to prevent the mate. In a properly constructed tsume
38 problem, all of your pieces on the board and in hand must be essential
39 to the solution. One consequence of this is that all of your pieces in
40 hand must be played during the solution. There should only be one
41 correct solution for the given number of moves. Tsume problems use
42 Japanese-style move numbering; thus, a problem where you move (and give
43 check), your opponent moves, and you move to give checkmate is called a
44 three-mover. Here is a really trivial three-mover:
65 Here, Black plays G*2b, White plays K1c, and Black plays G*1d mate.
66 More typical tsume problems range from 5 moves to arbitrarily high
67 numbers of moves, and they can be quite brain-busting. Tsume problems
68 may seem artificial, but in the closing stages of the game where both
69 players have a lot of pieces in hand, it is often necessary to give
70 check at every move, or else your opponent will start a counterattack
71 and will mate you before you mate him. A tsume problem is a worst-case
72 scenario for the attacker: you have to mate your opponent even though he
73 has every piece not on the board in hand, which means you have to
74 develop sharp attacking skills. Many more tsume problems can be found
75 on the internet; I particularly recommend Patrick Davin's "Shogi Nexus"
76 (*note References and links::).
79 File: gnushogi.info, Node: Shogi variants, Next: Differences between shogi and chess, Prev: Mating problems, Up: About shogi
84 Several historical variants of shogi exist. Most of these were
85 invented before modern shogi (in some cases hundreds of years before),
86 are much larger than modern shogi and are not played with drops. Thus,
87 in many ways they are really more like giant chess games than like
88 modern shogi. The only one of these games to have survived in Japan is
89 Chu (middle) shogi, which is still played a little bit. Thanks to the
90 efforts of George Hodges and John Fairbairn of the Shogi Association
91 (two British shogi enthusiasts), these games were resurrected and rules
92 and sets for them can still be purchased from George Hodges (*note
93 References and links::). I hope to eventually extend GNU shogi so that
94 it can play at least some of these games. There are also several
95 non-historical variants of shogi; I don't know much about them but you
96 can find information about them on the internet (*note References and
99 The historical variants include:
102 1. Tori (bird) shogi, played on a 7x7 board with 32 pieces in all;
103 this is the only variant that is known to have been played with
106 2. Wa shogi, played on an 11x11 board with 54 pieces. This game can
107 be played with or without drops but the historical evidence favors
108 the view that it was played without drops. However, most people
109 who have tried it claim it is a much better game with drops, being
110 even more intricate than standard shogi.
112 3. Chu (middle) shogi, played on a 12x12 board with 92 pieces. This
113 was (and is) by far the most popular of the variants, and has 21
114 different kinds of pieces in the starting line-up alone (along
115 with several others that appear upon promotion). Unlike modern
116 shogi, there are a tremendous number of ranging pieces and the
117 game is definitely not played with drops. There is also an
118 amazing piece called the Lion which has a double king move and can
119 capture two pieces at once! Chu shogi has a small but fanatical
120 following, some of whom consider it better than modern shogi.
122 4. Dai (great) shogi, played on a 15x15 board with 130 pieces. Other
123 than the larger board, this game is very similar to Chu shogi.
125 5. Tenjiku (exotic) shogi, played on a 16x16 board with 176 pieces.
126 This game is possibly the most complex tactical game in existence.
127 There are many astoundingly powerful pieces, including one (the
128 Fire Demon) that can capture up to eight opposing pieces in a
129 single move! Despite the size of the game, checkmates can occur
130 very suddenly (and often very early on) if one player makes a
131 wrong move. Tenjiku also has a small but fanatical following, one
132 of whom (Colin Adams) has written a book on the game which is
133 available for download at
134 `http://www.colina.demon.co.uk/tenjiku.html'.
136 6. Dai-dai (great-great) shogi, played on a 17x17 board with 192
137 pieces. The opening setup alone has 64 different kinds of pieces!
138 This game and the larger ones that follow sound pretty
139 outlandish, but they have actually been played; a game of Dai-dai
140 can supposedly be played in about 12 hours.
142 7. Maka-dai-dai (great-great-great) shogi, played on a 19x19 board
143 with 192 pieces. For those for whom Dai-dai shogi is just too
146 8. Tai (grand) shogi, played on a 25x25 board with 354 pieces! Until
147 recently, this was thought to be the biggest chess game ever
148 devised, but now there is...
150 9. Kyoku tai (extremely grand?) shogi, played on a 36x36 board with
151 402 pieces. The rules for this have just been unearthed in an old
152 Japanese book. Hopefully someone will soon organize a postal
153 Kyoku tai shogi championship; maybe their distant ancestors could
156 It is thought that the really huge games (Dai-dai and up) were
157 never really played to any significant extent (gee, wonder why?)
158 and were devised merely so that the creators could have the fun of
159 inventing enormous games, amazing their friends and confounding
160 their enemies. However, the games up to Tenjiku shogi at least
161 appear to be quite playable, assuming one has the time.
166 File: gnushogi.info, Node: Differences between shogi and chess, Prev: Shogi variants, Up: About shogi
168 Differences between shogi and chess
169 ===================================
171 Some differences between shogi and international chess have been
172 mentioned elsewhere in this document; I summarize them here for people
173 who are interested in game comparisons. I won't try to deal with the
174 thorny question of which game is "better" although my bias may have
175 already come through :-) In fact, the drop rule makes the two games so
176 different in character that arguing over which game is better is like
177 comparing apples to oranges (you'd be better off comparing chess to Chu
178 shogi (*note Shogi variants::). However, I believe that if you are a
179 chess fan you'll really like shogi as well, and shogi is also popular
180 with many people who don't particularly like chess.
182 Here are the significant differences between chess and shogi:
185 1. In shogi, captured pieces become the property of the capturer and
186 can re-enter play by being dropped onto almost any vacant square.
187 In chess, captured pieces are out of the game. Thus, in shogi,
188 piece exchanges complicate the play significantly while in chess
191 2. The shogi board is 9x9; the chess board is 8x8.
193 3. Shogi has five pieces with no counterpart in chess: the gold and
194 silver generals, the lance, the promoted rook and the promoted
195 bishop. Chess has one piece with no counterpart in shogi: the
196 queen. The knight's move in shogi is much more restrictive than
197 in chess. Pieces in shogi generally have a much smaller range of
198 movement than in chess (unless they are in hand).
200 4. In shogi, all pieces except the gold general and the king can
201 promote, but only to one kind of piece. Promotion is easier in
202 shogi because the promotion zone is closer to the starting
203 position of the pieces (especially pawns). In chess, only the
204 pawn can promote, but it can promote to any other piece except the
207 5. In shogi, pawns capture the same way they move. There is no
208 initial two-space pawn move and hence no _en-passant_ captures.
209 In chess, pawns capture diagonally which means that opposing pawns
210 can block each other.
212 6. In shogi, you only have one rook and one bishop. Note that the
213 bishop is not restricted to only one "color" square (squares in
214 shogi aren't colored, but never mind) because promoted bishops can
215 also move one square orthogonally.
217 7. There is no special castling move in shogi. The term "castle" is
218 used in shogi to denote a defensive formation consisting of
219 (usually) three generals which protect the king. There are many
220 such castles (about 40 or so have names). *Note Sample game::.
222 8. Draws are much rarer in shogi than in chess. Perpetual check is
223 not allowed. Stalemate is a virtual impossibility, and is a loss
226 9. Since pieces are never out of play in shogi, chess-type endgames
227 involving only a few pieces do not occur.
229 10. Shogi games are generally longer than chess games (about 60-70
232 11. Shogi has a well-developed handicap system which is in general use;
237 The effects of all these differences on play include (in my opinion):
240 1. Piece/pawn structures in chess are more rigid than in shogi. Pawns
241 block each other and pawns, once advanced, cannot ever retreat. In
242 shogi, you can repair the hole caused by a pawn advance by
243 exchanging the pawn and dropping it back where you want it. Thus
244 shogi is more fluid than chess and less "structural".
246 2. Counterattack is MUCH more common in shogi than in chess. Games
247 typically end in mutual mating attacks, where each player is
248 trying to checkmate the other player before being checkmated
249 himself. This makes tempo incredibly important and also makes
250 sacrificial play quite common.
252 3. Attacks involving only ranging pieces are more a feature of chess
253 than of shogi. A shogi attack typically uses a ranging piece or
254 pieces to support an attack by short-range pieces (especially
255 generals). It is very rare to mate a king with a non-adjacent
256 ranging piece in shogi since the player whose king is threatened
257 can almost always interpose by dropping a piece.
262 File: gnushogi.info, Node: gnushogi, Next: xshogi, Prev: About shogi, Up: Top
267 This section describes how to run the "gnushogi" program.
273 gnushogi [ [[-]a] [-b bookfile] [-B binbookfile] [-C] [-h langfile]
274 [-L langfile] [-r length] [-R] [-s pathname] [-l pathname] [-S
275 binbooksize] [-t] [-c size] [-T size] [-v] [-x] [-X] arg1 arg2 ]
281 GNU shogi (gnushogi) plays a game of japanese chess (shogi) against
282 the user or it plays against itself.
284 At startup gnushogi reads the binbook file if it is present. It then
285 looks for a book file. If it is present it adds its contents to the
286 binbook data. If the binbook file is writable a new combined binbook
289 Gnushogi is a modified version of the gnuchess program. It has a
290 simple alphanumeric board display, or it can be used with the xshogi
291 program under X windows. The program gets its opening moves from the
292 file gnushogi.bbk which is located in a directory specified in the
293 Makefile. To invoke the program type:
297 simple curses based version
299 `gnushogi -X (or just gnushogi)'
300 xshogi compatible version
303 raw test display version
309 If one argument is given, it is the search time per move in
310 [minutes:]seconds. So gnushogi 30 will generate one move every 30
311 seconds, while gnushogi 5:00 will generate one move every 5 minutes.
313 If two or more arguments are given, they will be used to set
314 tournament time controls with the first argument of each pair being the
315 number of moves and the second being the total clock time in
316 minutes[:seconds]. Thus, entering gnushogi 60 5 will set the clocks
317 for 5 minutes (300 seconds) for the first 60 moves, and gnushogi 30
318 3:30 will allow 3 minutes and 30 seconds for 30 moves.
320 gnushogi 30 5 1 :30 will allow 5 minutes for the first 30 moves and
321 30 seconds for each move after that. Up to 4 pairs of controls may be
324 If no argument is given the program will prompt the user for level of
327 For use with xshogi see the documentation on that program. *Note
334 The book gnushogi.tbk consists of a sequence of openings. An opening
335 begins with a line starting with a # (the rest of the line is a
336 comment). Following this is a series of moves in algebraic notation
337 alternating between black and white separated by whitespace. A move
338 may have a ? after it indicating this move should never be made in
339 this position. Moves are stored as position:move so transpositions
340 between openings can take place.
346 The hashfile if created should be on the order of 4 megabytes; you
347 can create such a hashfile by typing "gnushogi -c 22" (see below). This
348 file contains positions and moves learned from previous games. If a
349 hashfile is used the computer makes use of the experience it gained in
350 past games. Tests run so far show that it plays no worse with the
351 hashfile than without, but it is not clear yet whether it provides a
358 Note: Piece letters are determined by the language file. What is
359 specified here is the default (English).
361 Once gnushogi is invoked, the program will display the board and
362 prompt the user for a move. To enter a move, use the notation 7g7f
363 where the first letter-number pair indicates the origin square and the
364 second letter-number pair indicates the destination square. An
365 alternative is to use the notation P7f where the first letter indicates
366 the piece type (P,L,N,S,G,B,R,K). To promote append a + the type of
367 the new piece to the move, as in 2d2c+ or P2c+. Note that you must use
368 capital letters for the pieces by default.
375 Do not search on opponent's time.
378 Do search on opponent's time.
381 Use bookfile for opening book.
384 Use binbookfile for binary opening book.
387 Create a new HASHFILE. File size is 2^size entries of
388 approximately 65+? bytes.
391 Use curses-based display mode.
400 Pathname of the loadfile used with get or xget.
403 Use language lang from the file gnushogi.lang. If -L is not
404 specified it uses the first language in the file.
407 Number of plys to include in the binbookfile. For generating a
411 Rehash _length_ times in searching entries for position in
415 Use raw text display mode. This can be used for dumb terminals or
416 for systems that don't have curses.
419 Pathname of the save file to use with the save command.
422 Size of binbookfile for memory based books. For creating a
426 Show statistics for HASHFILE.
429 Set the transposition table size to 2^size entries.
432 Show version and patchlevel.
435 Use value as the evaluation window xwndw.
438 Use xshogi display mode (the default).
444 In addition to legal moves, the following commands can be entered at
445 the gnushogi prompt. Note: command names are determined by the language
446 file and may vary with the implementation. The default language is
450 allow algebraic input (not implemented).
453 change Alpha window (default score + 90).
456 change Beta window (default score - 90).
459 toggles beeping after each move (default: on).
462 updates the current board position on the display.
465 turns off use of the opening library.
468 causes the computer to play both sides of a shogi game.
471 causes the computer to play as White, if the computer was to move
475 saves a game to disk as a book textfile. The program will prompt
476 the user for a file name.
479 toggles game mode time control. Assumes the time specified for
480 time control is the time for a complete game. Input with the
481 level command should be the game time and the expected number of
482 moves in a game. go command must be given.
485 show coordinates on the display (visual only).
488 allows the value of _contempt_ to be modified.
491 asks for a piece as color piece, as wb or bn, and shows its
492 calculated value on each square.
495 sets level of debugging output if compiled with debug options.
498 allows the user to change the search depth of the program. The
499 maximum depth is 29 ply. Normally the depth is set to 29 and the
500 computer terminates its search based on elapsed time rather than
501 depth. If depth is set to (say) 4 ply, the program will search
502 until all moves have been examined to a depth of 4 ply (with
503 extensions up to 11 additional ply for sequences of checks and
504 captures). If you set a maximum time per move and also use the
505 depth command, the search will stop at the specified time or the
506 specified depth, whichever comes first.
509 toggles easy mode (thinking on opponents time) on and off. The
510 default is easy mode ON. If easy mode is disabled, the keyboard
511 is polled for input every so often and when input is seen the
512 search is terminated. It may also be terminated with a sigint.
515 allows the user to set up a board position.
518 - c toggle piece color.
520 - . command will exit setup mode.
522 - p3b place a pawn on 3b
524 - p3b+ place a promoted pawn on 3b
526 - p* place a pawn in hand (among the captured pieces)
529 Pieces are entered by typing a letter (p,l,n,s,g,b,r,k) for the
530 piece followed by the coordinate. Here, letter case is ignored.
532 The usual warning about the language file applies.
538 tells the computer to move first. Computer begins searching for a
539 move. (same as "go").
542 allows the user to enter moves for both sides. To get the program
543 to play after a sequence of moves has been entered use the "black"
547 retrieves a game from disk. The program will prompt the user for
551 tells the computer to move first. Computer begins searching for a
552 move. (same as "first").
555 use/don't use hashfile.
558 allows the user to change the minimum depth for using the hashfile
559 and the number of moves from the beginning of the game to use it.
562 displays a short description of the commands and the current
566 causes the program to supply the user with its predicted move.
569 allows the user to set time controls such as 60 moves in 5 minutes
570 etc. In tournament mode, the program will vary the time it takes
571 for each move depending on the situation. If easy mode is
572 disabled (using the "easy" command), the program will often
573 respond with its move immediately, saving time on its clock for
577 writes the game moves and some statistics on search depth, nodes,
578 and time to the file "shogi.lst".
581 toggle material flag - draws on no pawns and both sides < rook.
587 evaluates the board and shows the point score for each piece. The
588 total score for a position is the sum of these individual piece
592 causes the program to display the principal variation and the score
593 during the search. A score of 100 is equivalent to a 1 pawn
594 advantage for the computer.
600 causes the program to randomize its move selection slightly.
606 backout the last level for both sides. Equal to 2 undo's.
609 causes the board display to be reversed. That is, the Black's
610 pieces will now appear at the top of the board.
613 reverse board display.
616 saves a game to disk. The program will prompt the user for a file
620 causes the program to switch places with the opponent and begin
624 performs some speed tests for MoveList and CaptureList generation,
625 and ScorePosition position scoring for the current board.
628 set computer's time remaining, intended for synchronizing clocks
629 among multiple players.
632 toggle tsume mode. In tsume mode, not all possible moves will be
633 generated. If a king is in check, only moves that get the king out
634 of check are generated. If the king is not in check, only moves
635 that give check to the opponent's king are generated.
638 undoes the last move whether it was the computer's or the human's.
639 You may also type "remove". This is equivalent to two "undo"'s
640 (e.g. retract one move for each side).
643 causes the computer to play as Black; if the computer is to move
644 first the go command must be given.
647 read an xshogi position file.
650 save as an xshogi position file.
653 change X window. The window around alpha/beta used to determine
654 whether the position should be scored or just estimated. Note:
655 this has _nothing_ to do with xshogi or X windows; the terms are
660 File: gnushogi.info, Node: xshogi, Next: References and links, Prev: gnushogi, Up: Top
665 This section describes how to run the "xshogi" program.
677 xshogi provides an X11/Xt/Athena Widgets user interface for gnushogi.
678 With xshogi you can play gnushogi, set up arbitrary positions, force
679 variations, or watch xshogi manage a game between two shogi programs.
680 Furthermore, it can be used as an interface between two players on
683 xshogi can also be used as a shogi board to play out games. It will
684 read through a game file or allow a player to play through a variation
685 manually (force mode). This is useful for keeping track of email postal
686 games or browsing games off the net.
688 After starting xshogi, you can make moves by pressing mouse button 1
689 while the cursor is over a square with your piece on it and dragging the
690 mouse to another square. If the move is illegal, gnushogi will not
691 allow it. xshogi will then retract the move.
697 The following command line options also correspond to X resources
698 that you can set in your .Xdefaults file.
701 `[standard Xt options]'
702 xshogi accepts standard Xt options like -display, -geometry, and
705 `-tc or -timeControl minutes[:seconds]'
706 Amount of time for a set of moves determined by movesPerSession.
707 If this number of moves is played within the time control period,
708 xshogi resets the time clocks. Default: 5 minutes.
710 `-mps or -movesPerSession moves'
711 Number of moves in a time control period. Default: 40 moves.
713 `-st or -searchTime minutes[:seconds]'
714 Tell gnushogi to spend at most the given amount of time searching
715 for each of its moves. Without this option, gnushogi chooses its
716 search time based on the number of moves and amount of time
717 remaining until the next time control. Setting this option also
718 sets -clockMode to False.
720 `-sd or -searchDepth number'
721 Tell gnushogi to look ahead at most the given number of moves when
722 searching for a move to make. Without this option, gnushogi
723 chooses its search depth based on the number of moves and amount
724 of time remaining until the next time control. Setting this
725 option also sets -clockMode to False.
727 `-clock or -clockMode (True | False)'
728 Determines whether or not to use the clock. If clockMode is
729 False, the clock does not run, but the side that is to play next
730 is still highlighted.
732 `-td or -timeDelay seconds'
733 Time delay between moves during "Load Game". This doesn't have to
734 be a round number. Try -td 0.4. Default: 1 second.
736 `-nsp or -noShogiProgram (True | False)'
737 If this option is True, xshogi acts as a passive shogi board; it
738 does not try to start a shogi program, not even to check whether
739 moves made in Force mode are legal. It also sets -clockMode to
740 False. Default: False.
742 `-fsp or -firstShogiProgram program'
743 Name of first shogi program. In matches between two machines, this
744 program plays white. Default: "gnushogi".
746 `-ssp or -secondShogiProgram program'
747 Name of second shogi program, if needed. In matches between two
748 machines, this program plays black; otherwise it is not started.
751 `-fh or -firstHost host'
752 Name of host the first shogi program plays on. Default:
755 `-sh or -secondHost host'
756 Name of host the second shogi program plays on. Default:
759 `-rsh or -remoteShell shell_name'
760 Some systems do not use rsh as the remote shell. This option
761 allows a user to name the remote shell command. This should be
762 done in the resource file.
764 `-mm or -matchMode (False | Init | Position | Opening)'
765 Automatically run a game between firstShogiProgram and
766 secondShogiProgram. If matchMode is set to Init, xshogi will
767 start the game with the initial shogi position. If matchMode is
768 set to Position, xshogi will start the game with the position
769 specified by the loadPositionFile resource. If matchMode is set
770 to Opening, xshogi will play out the opening moves specified by
771 the -loadGameFile resource. If the -saveGameFile resource is set,
772 a move record for the match will be saved in the specified file.
775 `-lgf or -loadGameFile file'
776 Name of file to read a game record from. Game files are found in
777 the directory named by the SHOGIDIR environment variable. If this
778 variable is not set, the current directory is used unless the file
779 name starts with a /.
781 `-lpf or -loadPositionFile file'
782 Name of file to read a game position from. Position files are
783 found in the directory named by the SHOGIDIR environment variable.
784 If this variable is not set, the current directory is used unless
785 the file name starts with a /.
787 `-sgf or -saveGameFile file'
788 Name of file to save a game record to. Game files are saved in the
789 directory named by the SHOGIDIR environment variable. If this
790 variable is not set, the current directory is used unless the file
791 name starts with a /.
793 `-spf or -savePositionFile file'
794 Name of file to save a game position to. Position files are saved
795 in the directory named by the SHOGIDIR environment variable. If
796 this variable is not set, the current directory is used unless the
797 file name starts with a /.
799 `-coords or -showCoords (True | False)'
800 If this option is True, xshogi displays algebraic coordinates
801 along the board's left and bottom edges. The default is False.
802 The coordFont resource specifies what font to use.
804 `-mono or -monoMode (True | False)'
805 Determines whether xshogi displays its pieces and squares with two
806 colors or four. You shouldn't have to specify monochrome. xshogi
807 will determine if this is necessary.
809 `-pc or -pieceColor color'
810 Color specification for pieces suitable for XParseColor().
813 `-sc or -squareColor color'
814 Same for squares. Default: #EBDFB0.
816 `-wps or -westernPieceSet (True | False)'
817 Choose the Western style piece set.
819 `-npb or -normalPawnBitmap file'
821 `-nnb or -normalKnightBitmap file'
823 `-nbb or -normalBishopBitmap file'
825 `-nrb or -normalRookBitmap file'
827 `-nkb or -normalKingBitmap file'
828 Names of the bitmap files for the bitmap piece icons.
830 `-rpb or -reversePawnBitmap file'
832 `-rnb or -reverseKnightBitmap file'
834 `-rbb or -reverseBishopBitmap file'
836 `-rrb or -reverseRookBitmap file'
838 `-rkb or -reverseKingBitmap file'
839 Names of the bitmap files for the outline piece icons.
841 `-debug or -debugMode (True | False)'
842 Turns on debugging printout.
849 The actual string that is sent to initialize the shogi program can
850 be set from .Xdefaults. It can't be set from the command line
851 because of syntax problems. The default value is
852 "new\nbeep\nrandom\neasy\n". The "new" and "beep" commands are
853 required. You can remove the "random" command if you like;
854 including it causes gnushogi to randomize its move selection
855 slightly so that it doesn't play the same moves in every game.
856 Even without "random", gnushogi randomizes its choice of moves
857 from its opening book. You can also remove "easy" if you like;
858 including it toggles easy mode off, causing gnushogi to think on
859 your time. That is, if "easy" is included in the initString, GNU
860 Shogi thinks on your time; if not, it does not. (Yes, this does
861 seem backwards, doesn't it.) You can also try adding other
862 commands to the initString; see the gnushogi documentation (*note
863 gnushogi::) for details.
865 `blackString and whiteString'
866 These resources control what is sent when the Machine Black and
867 Machine White buttons are selected. This is mostly for
868 compatibility with obsolete versions of gnushogi.
870 Alternate bitmaps for piece icons can be specified either by
871 choosing one of the built-in sets or with the file name resources
872 described above. There are three built-in sets of piece bitmaps
873 available, large (the default), medium, or small. It is easiest
874 to select the set you prefer in the .Xdefaults file:
876 XShogi*boardSize: Medium
878 The font used for button labels and comments can be changed in the
879 .Xdefaults file. You may want to choose a smaller font if you are
880 using the small pieces:
882 XShogi*font: helvetica_oblique12
884 The font used for coordinates (when the showCoords option is True)
885 can be set similarly:
887 XShogi*coordFont: helvetica_10
889 If you are using a grayscale monitor, try setting the colors to:
891 XShogi*pieceColor: gray100
892 XShogi*squareColor: gray60
894 COMMAND BUTTONS AND KEYS
898 Quits xshogi. Q or q is a keyboard equivalent.
901 Resets xshogi to the beginning of a shogi game. It also deselects
902 any game or position files.
905 inverts the view of the shogi board.
908 displays a move hint from gnushogi.
911 plays a game from a record file. If no file is specified a popup
912 dialog asks for a filename. Game files are found in the directory
913 named by the SHOGIDIR environment variable. If this variable is
914 not declared then the current directory is used unless the file
915 name starts with a /. G or g is a keyboard equivalent. The game
916 file parser will accept almost any file that contains moves in
917 algebraic notation. If the first line begins with `#', it is
918 assumed to be a title and is displayed. Text enclosed in
919 parentheses or square brackets is assumed to be commentary and is
920 displayed in a pop-up window. Any other text in the file is
924 sets up a position from a position file. If no file is specified a
925 popup dialog asks for a filename. Position files are found in the
926 directory named by the SHOGIDIR environment variable. If this
927 variable is not declared then the current directory is used unless
928 the file name starts with a /. Position files must be in the
929 format that the Save Position command writes.
932 saves a game to a record file. If no file is specified a popup
933 dialog asks for a filename. If the filename exists, the user is
934 asked whether the current game record is be appended to this file
935 or if the file should be replaced. Game files are saved in the
936 directory named by the SHOGIDIR environment variable. If this
937 variable is not declared then the current directory is used unless
938 the file name starts with a /. Game files are human-readable, and
939 can also be read back by the Load Game command. Furthermore, they
940 are accepted as gnushogi text bookfiles.
943 saves a position to a position file. If no file is specified a
944 popup dialog asks for a filename. Position files are saved in the
945 directory named by the SHOGIDIR environment variable. If this
946 variable is not declared then the current directory is used unless
947 the file name starts with a /. Position files are human-readable,
948 and can also be read back by the Load Position command.
951 forces gnushogi to play white.
954 forces gnushogi to play black.
957 forces a series of moves. That is, gnushogi stops playing and
958 xshogi allows you to make moves for both white and black.
961 plays a game between two computer programs.
964 moves forward through a series of remembered moves. F or f is a
968 moves backward through a series of remembered moves. As a side
969 effect, puts xshogi into Force Moves mode. B or b is a keyboard
973 pauses the clocks or (in Load Game mode) pauses the game being
974 loaded. Press Pause again to continue. P or p is a keyboard
978 lets you set up an arbitrary board position. Use mouse button 1
979 to drag pieces to new squares, or to delete a piece by dragging it
980 off the board or dragging an empty square on top of it. To drop a
981 new piece on a square, press mouse button 2 or 3 over the square.
982 This brings up a menu of black pieces (button 2) or white pieces
983 (button 3). Additional menu choices let you empty the square or
984 clear the board. You can set the side to play next by clicking on
985 the Black or White indicator at the top of the screen.
988 allows you to make a two display game between two human players.
989 Enter the display you want to connect to. If you are allowed to
990 connect, a new board is displayed at the remote display.
991 Challenge mode can only be stopped by pressing "quit".
994 allows you to reset the clocks for both players. Enter the number
995 of moves and the number of minutes in which the moves should be
999 force computer to stop thinking and to make the current best move.
1001 `Iconify I, i, C or c'
1008 If you press the Pause button during GNU Shogi's turn, xshogi
1009 will stop the clocks, but gnushogi will still make a move.
1011 After a mate or draw when playing against gnushogi, if you back up
1012 with the Backward button, the clocks are reset (because gnushogi
1013 has exited and must be restarted).
1015 The game parser recognizes only algebraic notation.
1021 Original authors of XBoard: Chris Sears and Dan Sears.
1023 Enhancements for XBoard (Version 2.0): Tim Mann.
1025 Conversion to XShogi (Version 1.1): Matthias Mutz.
1027 Current maintainer: Mike Vanier.
1030 COPYRIGHT INFORMATION
1033 XShogi borrows its piece bitmaps from CRANES Shogi.
1035 Copyright 1991 by Digital Equipment Corporation, Maynard,
1036 Massachusetts. Enhancements Copyright 1992 Free Software Foundation,
1037 Inc. Enhancements Copyright 1993 Matthias Mutz. Further enhancements
1038 copyright 1999 by Michael Vanier and the Free Software Foundation, Inc.
1040 The following terms apply to Digital Equipment Corporation's
1041 copyright interest in XBoard:
1045 Permission to use, copy, modify, and distribute this software and its
1046 documentation for any purpose and without fee is hereby granted,
1047 provided that the above copyright notice appear in all copies and that
1048 both that copyright notice and this permission notice appear in
1049 supporting documentation, and that the name of Digital not be used in
1050 advertising or publicity pertaining to distribution of the software
1051 without specific, written prior permission.
1053 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1054 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
1055 EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
1056 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
1057 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1058 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1059 PERFORMANCE OF THIS SOFTWARE.
1061 The following terms apply to the enhanced version of XShogi
1062 distributed by the Free Software Foundation:
1064 This file is part of XSHOGI.
1066 XSHOGI is distributed in the hope that it will be useful, but WITHOUT
1067 ANY WARRANTY. No author or distributor accepts responsibility to anyone
1068 for the consequences of using it or for whether it serves any particular
1069 purpose or works at all, unless he says so in writing. Refer to the
1070 XSHOGI General Public License for full details.
1072 Everyone is granted permission to copy, modify and redistribute
1073 XSHOGI, but only under the conditions described in the XSHOGI General
1074 Public License. A copy of this license is supposed to have been given
1075 to you along with XSHOGI so you can know your rights and
1076 responsibilities. It should be in a file named COPYING. Among other
1077 things, the copyright notice and this notice must be preserved on all
1081 File: gnushogi.info, Node: References and links, Next: Acknowledgements, Prev: xshogi, Up: Top
1083 References and links
1084 ********************
1086 There are very few English-language books for people learning shogi.
1087 The two I recommend are:
1090 1. `Shogi for Beginners, 2nd. Edition', by John Fairbairn. This is a
1091 superb beginner's book in every way, covering all phases of the
1092 game. It was out of print for a long time, but has now been
1093 reprinted and is available either from Kiseido
1094 (`http://www.labnet.or.jp/~kiseido') or from George Hodges (see
1097 2. `The Art of Shogi', by Tony Hoskings. This is one step up from the
1098 Fairbairn book. It covers a lot of ground, and is especially
1099 noteworthy for its detailed treatment of opening lines. You can
1100 order this book from Amazon.com's UK branch
1101 (`http://www.amazon.co.uk').
1105 Another book you may find is `Shogi: Japan's Game of Strategy' by
1106 Trevor Leggett. This book is very elementary and is somewhat outdated,
1107 having been published first in 1966. However, it does feature a paper
1108 shogi board and punch-out pieces, so if you want a really cheap shogi
1109 set you might pick this book up. It is still in print.
1111 Two books that are no longer in print but are definitely worth
1112 getting if you find them are `Guide to Shogi Openings' and `Better
1113 Moves for Better Shogi', both by Aono Teriuchi. They are published in a
1114 bilingual edition (English/Japanese) and are the only books on shogi in
1115 English written by a Japanese professional shogi player. John Fairbairn
1116 did the translation from Japanese to English.
1118 Shogi sets are available from:
1124 United Kingdom BR1 2WT
1127 George also sells equipment for all the historical shogi variants
1128 (*note Shogi variants::) (except for Kyoku tai shogi) and also sells
1129 back issues of the magazine "Shogi" which he published for 70 issues in
1130 the late 70's to late 80's. This magazine is STRONGLY recommended; it
1131 contains more information about shogi in English than you will ever
1134 Here are some useful URLs:
1137 Pieter Stouten's shogi page: `http://www.shogi.net'
1138 This is the main shogi-related site on the internet, with links to
1139 almost all the other sites.
1141 Roger Hare's shogi page: `http://www.ed.ac.uk/~rjhare/shogi'
1142 This has lots of information, including full rules to most of the
1145 Patrick Davin's Shogi Nexus: `http://www.vega.or.jp/~patrick/shogi/'
1146 There's lots of cool stuff on this site; my favorite is the
1147 extensive collection of Tsume-shogi (mating) problems, both for
1148 beginners and more advanced players.
1150 Steve Evans' shogi page: `http://www.netspace.net.au/~trout/index.html'
1151 Steve has written a program that plays almost all of the shogi
1152 variants, unfortunately it only runs on Windows :-(
1154 Hans Bodlaender's chess variant pages: `http://www.cs.ruu.nl/~hansb/d.chessvar'
1155 This page has an almost unimaginable variety of rules for different
1156 chess variants, including many shogi variants (historical and
1161 File: gnushogi.info, Node: Acknowledgements, Next: Bugs, Prev: References and links, Up: Top
1166 I would like to thank the following people:
1169 * Matthias Mutz, who originally developed GNU shogi as a spin-off of
1170 GNU chess and who very kindly let me take over the maintenance of
1171 this very interesting project.
1173 * Richard Stallman and the Free Software Foundation, for creating an
1174 organization where anyone can contribute software for the common
1175 good of all, for making GNU/Linux possible, and especially for
1176 writing emacs and gcc, without which my working life would be
1179 * Georges Hodges, for starting the Shogi Association in England,
1180 without which I would probably never have heard of shogi, for
1181 supplying shogi equipment, for publishing the excellent magazine
1182 "Shogi" (now sadly defunct), for personally answering all my silly
1183 questions by mail, and for being the ambassador of shogi to the
1186 * Pieter Stouten, for having the most comprehensive shogi site on the
1187 World Wide Web (`http://www.shogi.net'), and for maintaining the
1188 shogi-l mailing list. Go to Pieter's web site for more
1189 information on subscribing to the list. Also thanks to everyone
1190 who contributes and has contributed to that list.
1192 * Matt Casters, for testing GNU shogi. Matt and I will be working
1193 together on improving the solution engine in future versions of
1199 File: gnushogi.info, Node: Bugs, Next: Index, Prev: Acknowledgements, Up: Top
1204 The motto of GNU shogi is "100% bug-free or you don't pay!" :-) In
1205 the extremely unlikely case (*ahem*) that you do find a bug, please
1206 send me (Mike Vanier) an email at <mvanier@cs.caltech.edu>. Also, feel
1207 free to send me comments, complaints, out-and-out raves, suggestions,
1208 plane tickets to Hawaii, and/or large suitcases filled with unmarked,
1209 untraceable hundred-dollar bills.
1212 File: gnushogi.info, Node: Index, Prev: Bugs, Up: Top
1219 * Acknowledgements: Acknowledgements.
1220 * Books: References and links.
1221 * Chu Shogi: Shogi variants.
1222 * Dai Shogi: Shogi variants.
1223 * Dai-dai Shogi: Shogi variants.
1226 * gnushogi: gnushogi.
1228 * Handicaps: Handicaps.
1229 * Introduction: Introduction.
1230 * Kyoku Tai Shogi: Shogi variants.
1232 * Mailing lists: References and links.
1233 * Maka-dai-dai Shogi: Shogi variants.
1234 * Opening setup: The opening setup.
1235 * Piece moves: The moves of the pieces.
1236 * Piece promotion: Promotion of pieces.
1237 * References: References and links.
1238 * Rules: The rules of shogi.
1239 * Sample game: Sample game.
1240 * Shogi variants: Shogi variants.
1241 * Shogi vs. Chess: Differences between shogi and chess.
1242 * Tai Shogi: Shogi variants.
1243 * Tenjiku Shogi: Shogi variants.
1244 * Tori Shogi: Shogi variants.
1245 * Variants: Shogi variants.
1246 * Wa Shogi: Shogi variants.
1247 * Web sites: References and links.
1248 * Winning the game: Winning the game.