Drop -pedantic from default gcc flags and restore use of explicit initializer fields.
[gnushogi.git] / doc / gnushogi.texinfo
blobddf60335542ab280f79d32c60e2980a51838fffa
1 \input texinfo   @c -*-texinfo-*-
3 @c % **  Start of header.
4 @setfilename gnushogi.info
5 @settitle GNU Shogi manual
6 @c % **  End of header.
8 @dircategory Games
9 @direntry
10 * gnushogi: (gnushogi).          Japanese chess
11 @end direntry
13 @setchapternewpage odd
15 @c ==================================
16 @c TeX-specific macros
17 @c ==================================
19 @c None yet!
21 @c ==================================
22 @c info-specific macros
23 @c ==================================
25 @c None yet!
27 @c ==================================
28 @c Summary description and copyright.
29 @c ==================================
31 @ifinfo
33 This file describes how to use GNU shogi, 
34 a program which plays Shogi (Japanese chess).
36 Copyright (C) 2013 Yann Dirson and the Free Software Foundation, Inc.
37 Copyright (C) 1999 Michael C. Vanier and the Free Software Foundation, Inc.
39 Permission is granted to make and distribute verbatim copies of
40 this manual provided the copyright notice and this permission notice
41 are preserved on all copies.
43 @ignore
44 Permission is granted to process this file through TeX and print the
45 results, provided the printed document carries copying permission
46 notice identical to this one except for the removal of this paragraph
47 (this paragraph not being relevant to the printed manual).
48 @end ignore
50 Permission is granted to copy and distribute modified versions of this
51 manual under the conditions for verbatim copying, provided that the entire
52 resulting derived work is distributed under the terms of a permission
53 notice identical to this one.
55 Permission is granted to copy and distribute translations of this manual
56 into another language, under the above conditions for modified versions,
57 except that this permission notice may be stated in a translation approved
58 by the Free Software Foundation.
60 @end ifinfo
62 @c =========================================
63 @c End of summary description and copyright.
64 @c =========================================
67 @c ====================
68 @c Title and copyright.
69 @c ====================
71 @titlepage
72 @sp 10
73 @comment The title is printed in a large font.
74 @center @titlefont{GNU Shogi (Japanese chess)}
75 @author   Mike Vanier
77 @c  The following two commands start the copyright page.
78 @page
79 @vskip 0pt plus 1filll
80 Copyright @copyright{} 2013 Yann Dirson and the Free Software Foundation
81 Copyright @copyright{} 1999 Michael C. Vanier and the Free Software Foundation
83 @end titlepage
85 @c ===========================
86 @c End of title and copyright.
87 @c ===========================
90 @c =========================
91 @c Top node and master menu.
92 @c =========================
94 @node    Top, (dir), (dir), (dir)
95 @top     GNU Shogi (Japanese chess)
97 @ifnottex
98 @menu
99 * Introduction::         What is GNU shogi?
100 * About shogi::          General information, rules, etc.
101 * gnushogi::             How to play GNU shogi (gnushogi).
102 * xshogi::               The X interface to GNU shogi.
103 * References and links:: Where to go for more information.
104 * Acknowledgements::
105 * Bugs::                 Where and how to report bugs.
106 * Index::        
107 @end menu
108 @end ifnottex
110 @iftex
111 This document describes GNU shogi, a program which plays Japanese chess
112 (shogi) against a human opponent.
113 @end iftex
115 @c ================================
116 @c End of top node and master menu.
117 @c ================================
120 @c =====
121 @c Body.
122 @c =====
124 @node Introduction, About shogi, Top, Top
125 @chapter Introduction
126 @cindex Introduction
128 GNU shogi is a program that plays shogi, the Japanese version of chess,
129 against a human (or computer) opponent.  This file describes how to use
130 GNU shogi and also gives background information about the game of shogi.
132 This file describes GNU Shogi version 1.3.2.  It was written by Mike
133 Vanier @email{mvanier@@cs.caltech.edu}, maintainer of GNU shogi at
134 that time.
136 GNU Shogi is currently maintained by Yann Dirson
137 @email{ydirson@@free.fr}.
140 GNU Shogi is actually one program, 'gnushogi', the text-based program
141 which also contains the game-playing engine.
143 The GNU Shogi distribution also contains the 'xshogi' program, an
144 X-Window graphical interface to gnushogi.  XShogi was forked off GNU
145 XBoard years ago, is far from today's UI standards, and has barely
146 been maintained recently, while XBoard has grown much and is able to
147 play Shogi.  In future versions, GNU Shogi will be able to use XBoard
148 as a GUI and XShogi will be retired.
150 Since xshogi invokes gnushogi, most players will just type ``xshogi''
151 and start playing.
153 Disclaimer: I use the personal pronouns ``him'', ``his'' etc. to refer
154 to a shogi player regardless of gender.  That's easier than writing
155 ``his or her'' all over the place.  I don't mean to infer that women
156 don't play shogi; in fact shogi is very popular in Japan among women as
157 well as men.
160 @node    About shogi, gnushogi, Introduction, Top
161 @chapter About the game of shogi
162      
164 @quotation
165 ``Japanese chess cedes nothing in depth or beauty to the European
166 game... it is at least as interesting.''
168 --- Alexander Alekhine @*
169 (quoted in David Pritchard, @cite{The Encyclopedia of Chess Variants}) 
171 ``... shogi [is] by far the most complex form of chess that has ever
172 achieved widespread popularity.''
174 --- R. Wayne Schmittberger, @cite{New Rules for Classic Games}
175 @end quotation
177 Shogi is the version of chess played in Japan.  It is strikingly
178 different from standard chess (which I shall refer to henceforth as
179 ``international chess'') and also to all other regional variants,
180 because captured pieces can re-enter play on the side of the capturer.
181 This has several interesting effects on the play of the game:
183 @enumerate
184 @item
185 Shogi is much more complex than international chess, at least in
186 terms of the average number of possible moves per turn (estimated at
187 about 35 for chess and at about 80 for shogi).
189 @item
190 There are almost no draws (about 1-2% of all games in professional play).
192 @item
193 Exchanges complicate the play rather than simplifying it.
195 @item
196 There are no ``endgames'' in the standard chess sense; all pieces remain
197 in play throughout the game.  Games typically end in a race to
198 checkmate the other player before being checkmated oneself.
200 @item
201 Ownership of a piece is not indicated by the color of the piece;
202 instead, pieces are wedge-shaped and point towards the opponent.  The
203 name of the piece is inscribed in Kanji characters on the front of the
204 piece.
206 @item
207 Most importantly: it's more fun than other forms of chess :-)
209 @end enumerate
211 Shogi is extremely popular in Japan; it has been estimated that 20
212 million Japanese can play shogi, of which perhaps 1 million are active
213 players.  It is even more popular there than the game of go, Japan's
214 other favorite board game.  There are a number of professional players
215 who make a considerable amount of money playing in shogi tournaments,
216 and the game receives extensive newpaper and television coverage.
217 Despite this, the game has yet to become popular outside of Japan.  Part
218 of this is because the Kanji characters on the pieces scare away some
219 people, but mostly it's due, I think, to lack of exposure to the game
220 and to the difficulty of finding opponents.  I hope that GNU shogi will
221 help introduce shogi to a wider audience.
223 @ifnottex
224 @menu
225 * The rules of shogi::
226 * Sample game::
227 * Mating problems::
228 * Shogi variants::
229 * Differences between shogi and chess::
230 @end menu
231 @end ifnottex
234 @c -------------------------------------------------------
235 @c 
236 @c The rules of shogi.
238 @c -------------------------------------------------------
240 @node    The rules of shogi, Sample game, About shogi, About shogi
241 @section The rules of shogi
242 @cindex  Rules
244 Shogi is a two-person abstract strategy board game with full information
245 (i.e. all pieces and moves are visible to both players at all times).
246 It is in the chess family, being descended from the same ancestral game
247 as international chess: the Indian game of Chaturanga.  The two players
248 are referred to as ``Black'' and ``White'', with Black moving first
249 (unlike in international chess, where White moves first), and with
250 movement alternating between the two players.  Note that ``Black'' and
251 ``White'' are just names; the pieces are not colored.  Instead, they are
252 flat, wedge-shaped pieces which point towards the opponent.  The
253 identity of a given piece is indicated by two Japanese Kanji characters
254 on each piece.  In fact, only the top character is needed to identify
255 the piece and thus only the top character is used in shogi diagrams.  I
256 will use alphabetical equivalents in the diagrams here; to see what the
257 Kanji characters look like, start up xshogi (@pxref{xshogi}) and compare
258 the starting setup there with the starting setup in this file
259 (@pxref{The opening setup}).
261 The object of the game is to capture the opponent's King.  The board is
262 a grid of 9x9 uncolored squares, and pieces are placed on the squares.
263 Each player begins with 20 pieces, described in the next section.
264 Capture is by displacement, as in international chess.
266 @ifnottex
267 @menu
268 * The moves of the pieces::
269 * The opening setup::
270 * Promotion of pieces::
271 * Drops::
272 * Winning the game::
273 * Draws::
274 * Handicaps::
275 * Notes for chess players::
276 @end menu
277 @end ifnottex
279 @c The moves of the pieces.
281 @node       The moves of the pieces, The opening setup, The rules of shogi, The rules of shogi
282 @subsection The moves of the pieces
283 @cindex     Piece moves
285 Each player at the beginning of a shogi game has a total of 20 pieces of
286 eight different types.  The moves of the shogi pieces can be divided
287 into three classes: ``stepping'' pieces, that only move one square at a
288 time; ``ranging'' pieces that move any number of unobstructed squares in
289 a line, and ``jumping'' pieces that can jump over obstructing pieces to
290 reach their destination squares.  Most pieces can also promote to
291 different (usually stronger) pieces under certain circumstances (see the
292 next section).  All pieces capture the same way that they move (even
293 pawns).  The piece moves and promotions are as follows; each piece name
294 is followed by the standard piece abbreviation:
296 @enumerate
298 @item
299 The king (K).  The king can move one square in any horizontal, vertical,
300 or diagonal direction, just like the king in international chess.  The
301 king does not promote.
303 @item
304 The rook (R).  The rook can move any number of squares in a horizontal
305 or vertical direction.  The rook is the same as the rook in
306 international chess (except that it can promote).  A rook promotes to a
307 ``dragon king'' or ``dragon'' for short (often just referred to as a
308 ``promoted rook''), which can move as a rook or can move one square in
309 any diagonal direction.
311 @item
312 The bishop (B).  The bishop can move any number of squares in a diagonal
313 direction.  The bishop is the same as the bishop in international chess
314 (except that it can promote).  A bishop promotes to a ``dragon horse''
315 or ``horse'' for short (often just referred to as a ``promoted
316 bishop''), which can move as a bishop or can move one square in any
317 horizontal or vertical direction.  Note: the horse should not be
318 confused with a knight (see below), as they are two completely different
319 pieces.
321 @item
322 The gold general (G).  A gold general can move one square in any
323 horizontal or vertical direction, or one square in a forward diagonal
324 direction.  Gold generals do not promote.
326 @item
327 The silver general (S).  A silver general can move one square in any
328 diagonal direction, or one square straight forward.  A silver general
329 promotes to a gold general.
331 @item
332 The knight (N).  A knight can move one square straight forward followed
333 by one square to either forward diagonal, jumping over intervening
334 pieces if any.  In other words, a knight moves like its international
335 chess counterpart, but forward only.  A knight promotes to a gold
336 general.  The knight is the only jumping piece, as in chess.
338 @item
339 The lance (L).  A lance can move any number of squares straight forward.
340 A lance promotes to a gold general.
342 @item
343 The pawn (P).  A pawn can move one square straight forward.  The pawn
344 captures the same way that it moves, in contrast to international chess.
345 There is also no initial two-space move for pawns and no
346 @emph{en-passant} capture.  A pawn promotes to a gold general; a
347 promoted pawn is usually known as a ``Tokin''.
349 @end enumerate
352 @c The opening setup.
354 @node       The opening setup, Promotion of pieces, The moves of the pieces, The rules of shogi
355 @subsection The opening setup
356 @cindex     Opening setup
358 The opening setup for shogi is as follows:
360 @ifnottex
361 @verbatim
362    9    8    7    6    5    4    3    2    1
363 +--------------------------------------------+
364 | wL | wN | wS | wG | wK | wG | wS | wN | wL |  a
365 +--------------------------------------------+
366 |    | wR |    |    |    |    |    | wB |    |  b
367 +--------------------------------------------+
368 | wP | wP | wP | wP | wP | wP | wP | wP | wP |  c
369 +--------------------------------------------+
370 |    |    |    |    |    |    |    |    |    |  d
371 +--------------------------------------------+
372 |    |    |    |    |    |    |    |    |    |  e
373 +--------------------------------------------+
374 |    |    |    |    |    |    |    |    |    |  f
375 +--------------------------------------------+
376 | bP | bP | bP | bP | bP | bP | bP | bP | bP |  g
377 +--------------------------------------------+
378 |    | bB |    |    |    |    |    | bR |    |  h
379 +--------------------------------------------+
380 | bL | bN | bS | bG | bK | bG | bS | bN | bL |  i
381 +--------------------------------------------+
382 @end verbatim
383 @end ifnottex
385 @c The following TeX macros are taken with permission from 
386 @c "TeX for the Beginner" by Wynter Snow.
388 @tex
389 \def\startline{\par\nobreak\noindent}
391 {\obeylines\obeyspaces%
392 \gdef\beginVerbatim{\bigbreak%
393 \begingroup%
394 \parskip=0pt%
395 \obeylines\obeyspaces%
396 \let^^M=\startline%
397 \tt}}
398 \gdef\endVerbatim{\endgroup\bigbreak}
399 \beginVerbatim
402    9    8    7    6    5    4    3    2    1
403 +--------------------------------------------+     
404 | wL | wN | wS | wG | wK | wG | wS | wN | wL |  a   
405 +--------------------------------------------+     
406 |    | wR |    |    |    |    |    | wB |    |  b   
407 +--------------------------------------------+     
408 | wP | wP | wP | wP | wP | wP | wP | wP | wP |  c   
409 +--------------------------------------------+     
410 |    |    |    |    |    |    |    |    |    |  d   
411 +--------------------------------------------+     
412 |    |    |    |    |    |    |    |    |    |  e   
413 +--------------------------------------------+     
414 |    |    |    |    |    |    |    |    |    |  f   
415 +--------------------------------------------+     
416 | bP | bP | bP | bP | bP | bP | bP | bP | bP |  g   
417 +--------------------------------------------+     
418 |    | bB |    |    |    |    |    | bR |    |  h   
419 +--------------------------------------------+     
420 | bL | bN | bS | bG | bK | bG | bS | bN | bL |  i   
421 +--------------------------------------------+
423 \endVerbatim
424 @end tex
426 Here, ``b'' stands for ``black'' and ``w'' stands for ``white'', so
427 that, for instance, ``bL'' means ``black lance''.  The numbers above the
428 files and the letters to the right of the ranks represent the most
429 common notation system used for shogi by westerners (the Japanese also
430 use Arabic numerals for the files but use Japanese numerals for the
431 ranks).  
434 @c Promotion of pieces.
436 @node       Promotion of pieces, Drops, The opening setup, The rules of shogi
437 @subsection Promotion of pieces
438 @cindex     Piece promotion
440 In sharp contrast to international chess, where only pawns can promote
441 to higher-ranked pieces, most of the pieces in shogi can promote.  The
442 promoted ranks are discussed in the section on piece moves (@pxref{The
443 moves of the pieces}) but are repeated here for reference:
445 @table @asis
447 @item Pawn
448 promotes to gold general (called a `tokin' in this case only).
450 @item Lance
451 promotes to gold general.
453 @item Knight
454 promotes to gold general.
456 @item Silver general
457 promotes to gold general.
459 @item Gold general
460 does not promote.
462 @item Bishop
463 promotes to ``dragon horse'' or just ``horse'' for short.  The horse can
464 move as a bishop or can move one square in any orthogonal direction.
466 @item Rook
467 promotes to ``dragon king'' or just ``dragon'' for short.  The dragon
468 can move as a rook or can move one square in any diagonal direction.
470 @item King
471 does not promote.
473 @end table
475 The three ranks furthest away from each player constitute his/her
476 ``promotion zone''.  A player may, but is not required to, promote a
477 piece after making a move in which the piece begins and/or ends in the
478 promotion zone.  Thus you can promote a piece when moving the piece into
479 the promotion zone, out of the promotion zone, or entirely within the
480 promotion zone.  Promotion is mandatory in these cases:
482 @enumerate
484 @item You must promote a pawn or a lance after moving it to the last rank.
486 @item You must promote a knight after moving it to either of the last
487 two ranks.
489 @end enumerate
491 These forced promotions ensure that a piece cannot be moved to a square
492 from which it would have no further move.
494 Pieces ``dropped'' onto the board (@pxref{Drops}) always drop in the
495 unpromoted state, even if they drop into the promotion zone.
499 @c Drops.
501 @node       Drops, Winning the game, Promotion of pieces, The rules of shogi
502 @subsection Drops
503 @cindex     Drops
505 When a player captures a piece, that piece is not removed from play.
506 Instead, it becomes the property of the capturer and can re-enter play
507 by being placed on (almost) any vacant square during the player's move.
508 This is known as a ``drop'' and counts as a full move (in other words,
509 you can either move a piece on the board or drop a piece onto the board
510 during your move, but not both).  All pieces drop in the unpromoted
511 state.  Pieces may be legally dropped in their promotion zone, but they
512 do not promote on that turn.
514 There are several restrictions on drops:
516 @enumerate
518 @item A pawn may not be dropped onto a file if there is already an
519 unpromoted pawn belonging to the same player on that file.  It is legal
520 to drop a pawn on a file which contains a @emph{promoted} pawn belonging
521 to the same player, however.
523 @item A pawn may not be dropped to give immediate checkmate on the
524 move.  A pawn is, however, permitted to be moved on the board to give
525 immediate checkmate.  This is a curious rule, and if anyone knows the
526 reason for it I would appreciate it if they would contact me and explain
527 it to me :-)
529 @item A pawn or piece may not be dropped onto a square from which they
530 would have no legal move.  This means that pawns and lances may not be
531 dropped onto the last rank, and the knight may not be dropped onto the
532 last or second-to-last rank.
534 @end enumerate
536 It is entirely permissible (and often advisable) to drop a piece or pawn
537 between one's King and an attacking ranging piece.  For this reason,
538 the final checkmating move is nearly always an attack on the King from
539 an adjacent square (except for an attack by a Knight).
541 Captured pieces are said to be pieces ``in hand''.
543 The drop is the primary distinguishing feature of Japanese chess, shared
544 with no other popular chess-type game.  It gives shogi a very aggressive
545 quality, and dramatically increases the number of possible moves once a
546 few pieces have been captured.  Another interesting feature of shogi is
547 that exchanges complicate play rather than simplifying it (as in
548 international chess), because of the drop rule.
551 @c Winning.
553 @node       Winning the game, Draws, Drops, The rules of shogi
554 @subsection Winning the game
555 @cindex     Winning the game
557 A game of shogi is won by capturing the opponent's king.  In general,
558 this is done by checkmating the king: attacking the king in such a way
559 that the king cannot be defended no matter what the defending player
560 moves.  Note, though, that there is no rule that requires a player to
561 defend a king which is being attacked.  However, if he does not defend
562 his king, the opponent is entirely free to capture it on the next move,
563 thus winning the game.  As in international chess, in practice most
564 games end by resignation when one player realizes that he cannot escape
565 checkmate. 
568 @c Draws.
570 @node       Draws, Handicaps, Winning the game, The rules of shogi
571 @subsection Draws
572 @cindex     Draws
574 There are very few draws in shogi; only about 1-2% of professional games
575 end in a draw.  One reason for this is that material can never be
576 depleted as in chess, because captured pieces are constantly re-entering
577 play as a consequence of the drop rule.  In fact, most of the ways a
578 game can be drawn in chess are not allowed in shogi:
580 @itemize @bullet
582 @item Draws cannot be offered.
584 @item There is no fifty-move rule.
586 @item A stalemate counts as a win for the stalemater.  Stated otherwise:
587 if you can't move, you lose.
589 @item Perpetual check is illegal (see below).
591 @end itemize
593 There are only two legal ways in which a draw can occur:
595 @enumerate
597 @item A position (including the pieces in hand) occurs 4 times with the same
598 player to move (called ``Sennichite'').  However, if this is caused by
599 consecutive checks (direct attacks on the King, threatening to capture
600 it on the next move) by one side, the player giving these checks loses
601 the game.  In other words, perpetual check results in a loss for the
602 attacker who recreates the same position the 4th time.
604 @item Both players have moved their King into the the promotion zone (or they
605 cannot be prevented from doing so) and the Kings cannot be checkmated.
606 A King who has entered the promotion zone is known as an ``entering
607 King''; due to the forward orientation of most shogi pieces, it is very
608 hard to mate such a King.  In that case the players may decide to count
609 their pieces as follows: the King does not count, the Rook and Bishop
610 count as 5 points, and all other pieces as one point.  Promotion is
611 disregarded.  If both players have at least 24 points the game is a draw
612 (called ``Jishogi'').  If a player has less, he loses the game.
614 Of course, a player can refuse to count pieces when he still has mating
615 chances or chances to gain material which would affect the outcome of
616 the counting.  There is no strict rule about what to do if this is not
617 the case, but nonetheless a player refuses to count up (e.g. because he
618 does not have enough points for a draw).  It has been generally accepted
619 that in such a case the game ends and the pieces are counted after one
620 player has managed to get all his pieces protected in the promotion
621 zone.
623 @end enumerate
625 @c Handicaps.
627 @node       Handicaps, Notes for chess players, Draws, The rules of shogi
628 @subsection Handicaps
629 @cindex     Handicaps
631 Unlike international chess, shogi has a well-established handicap system
632 which is used when players of different strengths play against each
633 other.  Handicaps range from small to huge, which makes it possible for
634 weak players to play against even very strong players and have an even
635 chance of winning.
637 Shogi players are ranked as follows: the weakest rank is around 15
638 ``kyu'', which represents a beginner.  14 kyu is higher than 15 kyu, 13
639 kyu is higher still, and so on until you get to 1 kyu.  The next highest
640 rank is 1 ``dan'', followed by 2 dan, 3 dan and so forth.  The highest
641 amateur rank is 6 dan; professionals go up to 9 dan.  However,
642 professional ranks are not the same as amateur ranks; a professional 1
643 dan is @emph{much} stronger than an amateur 1 dan.  This system is
644 similar to that used by go players (and also other Japanese sports such
645 as karate).
647 A handicap consists of the stronger player playing White and removing
648 one or more pieces from his side of the board at the start of the game.
649 These pieces are permanently removed from play; they are not in hand.
651 The following is a list of the accepted handicaps, from weakest to
652 strongest.  The degree of the handicap, represented by the position in
653 the list, represents the difference in rank between the two players for
654 which the handicap is appropriate.  These rules are taken from the books
655 ``Shogi for Beginners'' by John Fairbairn and ``The Art of Shogi'' by
656 Tony Hoskings (@pxref{References and links}) and, I believe, represent
657 current Japanese practice.
659 @enumerate
661 @item 
662 The stronger player removes his left lance (on 1a).
664 @item 
665 The players play a two-game match; in the first game the stronger player
666 removes his left lance (on 1a), while in the second game he removes his
667 bishop.
669 @item 
670 The stronger player removes his bishop.
672 @item 
673 The stronger player removes his rook.
675 @item 
676 The stronger player removes his rook and left lance.
678 @item 
679 The players play a two-game match; in the first game the stronger player
680 removes his rook and left lance (on 1a), while in the second game he
681 removes his rook and bishop.
683 @item 
684 The stronger player removes his rook and bishop.  This is usually called
685 a ``two-piece'' handicap.
687 @item 
688 The stronger player removes his rook, bishop, and both lances.  This is
689 called a ``four-piece'' handicap.
691 @item 
692 The stronger player removes his rook, bishop, both lances, and both
693 knights.  This is called a ``six-piece'' handicap.
695 @item 
696 The stronger player removes his rook, bishop, both lances, both knights,
697 and both silvers.  This is called an ``eight-piece'' handicap.
699 @end enumerate
701 Another advantage of playing handicap games is that the handicaps alter
702 the optimal strategy for both players.  For instance, handicaps all have
703 their own opening lines which may bear little or no resemblance to those
704 used in non-handicap shogi.  This means that when learning handicap
705 shogi, you are essentially learning completely new games which use the
706 same equipment!
708 The reader may wonder how on earth a player giving an eight-piece
709 handicap, say, could possibly hope to win.  Don't forget, though, that
710 in shogi the opponent's pieces can be captured and then become part of
711 one's own army.  Thus, if the opponent plays badly enough, the number of
712 pieces will soon even out.
715 @c Notes for chess players.
717 @node       Notes for chess players,  , Handicaps, The rules of shogi
718 @subsection Notes for chess players
720 Here are a few miscellaneous things that may confuse chess players.
721 Some of these have been mentioned elsewhere, but they bear repeating.
723 @enumerate
724 @item There is no queen.
726 @item Pawns capture the same way they move.  There is no initial
727 two-space pawn move and no @emph{en-passant} move.
729 @item There is no special castling move.  There @emph{are} a large
730 number of possible defensive formations referred to as ``castles''
731 (@pxref{Sample game}) but there is no need for special moves to create
732 them.
734 @item A given piece can only promote to @emph{one} other kind of piece.
736 @end enumerate
738 @c 
739 @c Sample game.
740 @c 
742 @node    Sample game, Mating problems, The rules of shogi, About shogi
743 @section Sample game
744 @cindex  Sample game
746 @c This will have to be spruced up for the TeX version...
748 This game was annotated by Pieter Stouten (@pxref{References and
749 links}).  I have made some minor corrections.  Note that captures are
750 denoted by the ``x'' symbol e.g. Rx3f and drops are denoted by the ``*''
751 symbol e.g. R*3f.  Check is indicated by a ``+'' after the move,
752 e.g. R3f+.  I recommend you use gnushogi/xshogi to play along with this
753 game.  In xshogi simply hit the ``Force Moves'' button after starting
754 up, while in gnushogi enter the word ``force'' at the prompt.  This will
755 allow you to enter moves for both sides.
757 Note also that the move numbering system used here is the chess-type
758 system where one move means one move by each player.  The Japanese count
759 one move made by each player as two moves.
761 ---------------------------------------------------------------------------
763 Below you will find (the English translation of) an annotated game which
764 was published in the Dutch Shogi magazine ``81'' and in the Dutch
765 beginners booklet.  It has proven to be a very useful game to explain
766 some basic principles of Shogi.  Also, it is a rather straightforward
767 game compared to professional games where in most cases very diffuse
768 middle game fights take place.
770    Pieter Stouten, 14th May 1990.
772 ---------------------------------------------------------------------------
774 Black: Michael Trent (1-dan).  White: David Murphy (2-dan).
776    1. P2f P3d  2. P2e B3c @*
777 [ This move is necessary, as otherwise white can exchange pawns: 3. P2d
778 Px2d 4. Rx2d.  He would thus get a pawn in hand and open up his rook
779 file. ]
781    3. P7f P4d @*
782 [ White closes the bishop diagonal again.  He plans to play ranging rook
783 (the rook goes to 5b, 4b, 3 or 2b; a defensive strategy) and in that
784 case he'd better avoid an exchange of bishops.  One of the reasons is
785 that he will have problems developing his pieces without leaving holes
786 for bishop drops. ]
788    4. S4h R3b  5. P3f S4b  6. K6h K6b @*
789 [ In general the rook plays an important role in the attacks.  It is
790 wise to move the king away from the area where the initial fights will
791 be and both players act according to the Shogi proverb ``keep the rook
792 and king apart''. ]
794    7. K7h K7b  8. P5f P5d  9. G4i-5h G4a-5b @*
795 [ Both players use their second gold general to build their castle. ]
797    10. S6h @*
798 [ In itself this move is not bad.  However, it will become clear that
799 black plans a quick attack and in that case it is wiser to omit this
800 move. ]
802    10... S5c  11. P1f P1d @*
803 [ The advance of the edge pawns must be timed very well.  The remark at
804 black's tenth move applies here too: this move is good if black wants to
805 play a slow game, because it eliminates a future B1e. ]
807    12. P4f K8b  13. N3g S7b @*
808 [ Black develops his knight in order to start an attack over the second,
809 third and fourth files.  White strengthens his king's position and
810 awaits the attack.  He aims at a counterattack as soon as black has
811 broken through into the white camp.  Probably white's breakthrough will
812 take place later, but he has good compensation in the form of a stronger
813 castle.  This theme occurs very often in static rook versus ranging rook
814 games. ]
816    14. P4e R4b @*
817 [ Black starts his attack and white puts up a very passive defence.  His
818 rook has a hard task now to penetrate the black position.  Moreover, he
819 blocks his own bishop.  It seems much better to start a counterattack
820 with 14... P3e, later to be followed by B2b, B5a or Bx4d in order to use
821 his rook more actively. ]
823    15. Px4d Sx4d  16. P*4e S5c @*
824 [ 16... Sx4e is more active.  A silver general is normally more valuable
825 than a knight, but white gets two pawns in hand and black none, while
826 the knight might come in handy for white too. ]
828    17. Bx3c+ Nx3c  18. P2d Px2d @*
829 [ Black threatens to break through and white has to consider taking the
830 pawn on 2d or starting a counterattack with Nx4e.  If he chooses the
831 latter, black can play Px2c+ followed by +P3c.  The disadvantage is the
832 black ``tokin'' (=promoted pawn) that white will get in his camp; the
833 advantage is that it will cost black two more moves to promote his rook.
834 Because white did not trust that the result after engaging in a
835 ``semeai'' (=mutual attack) with 18...Nx4e would give a positive result,
836 he captured the pawn on 2d.  Making the right decision in moments like
837 this often makes the difference between a win and a loss: miss one
838 attacking chance and you will be forced to defend the whole game until
839 the unavoidable defeat; on the other hand, an unsound attack can destroy
840 all ``aji'' (=potential, meaning possibilities, threats) without getting
841 anything in return. ]
843    19. Rx2d Nx4e  20. Nx4e Rx4e  21. R2a+ P*4g @*
844 [ Now it becomes clear why black's 10. S6h was not good.  Had this move
845 been omitted, then white would not have had the time to play 13... S7b
846 and after R2a+ the gold on 6a would hang.  Thus black would have kept
847 ``sente'' (=initiative).  Instead of 21... P*4g, B*6d is a very good
848 move, because after 22. P*2h black does not have a pawn in hand anymore
849 and he is being threatened with the annoying 22... N*4f 23. G5g N3h+
850 24. S4g +N4h also.  Black can also counter 21... B*6d with 22. N*3g.
851 White would then reply with 22... R4b 23. B*3c P*4g 24. Bx4b+ Sx4b.  The
852 white rook has played its role and instead of spending moves on saving
853 it white starts to scatter black's defences by successive pawn drops on
854 the fourth file: 25. Gx4g P*4f 26. G5g N*6e 27. G5h P4g+ 28. Gx4g P*4f.
855 This analysis was provided by Kato Hifumi, 9-dan professional (the
856 highest regular grade).  Destroying the coherence of the enemy pieces
857 (their shape) by dropping pawns is one of the most important Shogi
858 techniques.  With the actual move 21... P*4g white missed a good
859 chance. ]
861    22. Sx4g P*4f  23. B*3g Px4g+  24. +Rx6a +Px3g @*
862 [ 23. B*3g seems pointless, but a closer look reveals that it is
863 actually quite mean.  On move 24 white cannot capture black's ``Ryu''
864 (=dragon =promoted rook) with his silver: 24... Sx6a 25. N*7d K7b
865 26. G*8b mate.  By attacking the front of the white castle and
866 threatening to mate him there, black has the chance to break down the
867 white defences from the side. ]
869    25. +Rx5b S*6b @*
870 [ Here 25... B*4d would be much better, because it is defensive and
871 attacking at the same time.  After e.g. 26. G*4c Bx9i+ 27. Gx5c black
872 threatens 28. +Rx7b Kx7b 29. S*6a K8b 30. S*7a Kx7a 31. G*7b mate.
873 White is one move quicker, however.  He has the following beautiful
874 ``tsume'' (mating sequence where every move is check): 27... N*8f 28. Px8f
875 S*8g 29. Kx8g B*9h 30. K7h Bx8i+ 31. K8g +B8i-8h 32. K9f L*9e mate.
876 This illustrates the sharpness of Shogi: one move can make the
877 difference between winning and losing. ]
879    26. P*4f Rx4f @*
880 [ This move eliminates white's last chances.  26... R4b 27. +Rx4b Sx4b
881 28. R*4a seems annoying, but after 28... B*3c 29. S7g B*3b white wins
882 the rook and with his ``tokin'' on 3g there still is some hope. ]
884    27. N*6e +P4g @*
885 [ White cannot defend anymore, so he starts a desperate attack.  Black
886 does not lose the right track, however. ]
888    28. Nx5c+ +Px5h  29. +Nx6b +Px6h  30. Gx6h N*8f  31. Px8f B*6i  32. Gx6i
889    R4h+  33. N*6h +Rx6h  34. Gx6h S*8g  35. Kx8g N*9e  36. K7h Resigns @*
890 [ White resigns here, because after 36... B*8g 27. K7g his attack has
891 petered out. ]
893 @page
896 @c 
897 @c Mating problems.
898 @c 
900 @node    Mating problems, Shogi variants, Sample game, About shogi
901 @section Mating problems
903 One good way to improve at shogi is to solve mating problems.  There are
904 several types of these problems, but the most common is called a
905 ``tsume-shogi'' problem, or ``tsume'' problem for short.  In a tsume
906 problem, all pieces that are not on the board are assumed to be in the
907 opponent's hand (except for your King, which is usually not shown).
908 Every move you make must be check until the final checkmate.  Your
909 opponent may play any piece on the board or drop any of his pieces in
910 hand in order to prevent the mate.  In a properly constructed tsume
911 problem, all of your pieces on the board and in hand must be essential
912 to the solution.  One consequence of this is that all of your pieces in
913 hand must be played during the solution.  There should only be one
914 correct solution for the given number of moves.  Tsume problems use
915 Japanese-style move numbering; thus, a problem where you move (and give
916 check), your opponent moves, and you move to give checkmate is called a
917 three-mover.  Here is a really trivial three-mover:
919 @ifnottex
920 @verbatim
921    3    2    1
922 ----------------+
923  |    |    |    |  a
924 ----------------+
925  |    |    | wK |  b
926 ----------------+
927  |    |    |    |  c
928 ----------------+
929  | bN |    |    |  d
930 ----------------+
931  |    |    |    |  e
932 ----------------+
933  |    | bN |    |  f
934 ----------------+
936 Black in hand: S, G
937 @end verbatim
938 @end ifnottex
941 @tex
942 \def\startline{\par\nobreak\noindent}
944 {\obeylines\obeyspaces%
945 \gdef\beginVerbatim{\bigbreak%
946 \begingroup%
947 \parskip=0pt%
948 \obeylines\obeyspaces%
949 \let^^M=\startline%
950 \tt}}
951 \gdef\endVerbatim{\endgroup\bigbreak}
952 \beginVerbatim
954    3    2    1            
955 ----------------+         
956  |    |    |    |  a         
957 ----------------+           
958  |    |    | wK |  b         
959 ----------------+           
960  |    |    |    |  c       
961 ----------------+         
962  | bN |    |    |  d       
963 ----------------+         
964  |    |    |    |  e       
965 ----------------+         
966  |    | bN |    |  f       
967 ----------------+
968      
969 Black in hand: 2G
971 \endVerbatim
972 @end tex
974 Here, Black plays G*2b, White plays K1c, and Black plays G*1d mate.
975 More typical tsume problems range from 5 moves to arbitrarily high
976 numbers of moves, and they can be quite brain-busting.  Tsume problems
977 may seem artificial, but in the closing stages of the game where both
978 players have a lot of pieces in hand, it is often necessary to give
979 check at every move, or else your opponent will start a counterattack
980 and will mate you before you mate him.  A tsume problem is a worst-case
981 scenario for the attacker: you have to mate your opponent even though he
982 has every piece not on the board in hand, which means you have to
983 develop sharp attacking skills.  Many more tsume problems can be found
984 on the internet; I particularly recommend Patrick Davin's ``Shogi
985 Nexus'' (@pxref{References and links}).
987 @page
989 @c 
990 @c Shogi variants.
991 @c 
993 @node    Shogi variants, Differences between shogi and chess, Mating problems, About shogi
994 @section Shogi variants
995 @cindex  Shogi variants
996 @cindex  Variants
997 @cindex  Tori Shogi
998 @cindex  Wa Shogi
999 @cindex  Chu Shogi
1000 @cindex  Dai Shogi
1001 @cindex  Tenjiku Shogi
1002 @cindex  Dai-dai Shogi
1003 @cindex  Maka-dai-dai Shogi
1004 @cindex  Tai Shogi
1005 @cindex  Kyoku Tai Shogi
1007 Several historical variants of shogi exist.  Most of these were invented
1008 before modern shogi (in some cases hundreds of years before), are much
1009 larger than modern shogi and are not played with drops.  Thus, in many
1010 ways they are really more like giant chess games than like modern shogi.
1011 The only one of these games to have survived in Japan is Chu (middle)
1012 shogi, which is still played a little bit.  Thanks to the efforts of
1013 George Hodges and John Fairbairn of the Shogi Association (two British
1014 shogi enthusiasts), these games were resurrected and rules and sets for
1015 them can still be purchased from George Hodges (@pxref{References and
1016 links}).  I hope to eventually extend GNU shogi so that it can play at
1017 least some of these games.  There are also several non-historical
1018 variants of shogi; I don't know much about them but you can find
1019 information about them on the internet (@pxref{References and links}).
1021 The historical variants include:
1023 @enumerate
1025 @item
1026 Tori (bird) shogi, played on a 7x7 board with 32 pieces in all; this is
1027 the only variant that is known to have been played with drops.
1029 @item
1030 Wa shogi, played on an 11x11 board with 54 pieces.  This game can be
1031 played with or without drops but the historical evidence favors the view
1032 that it was played without drops.  However, most people who have tried
1033 it claim it is a much better game with drops, being even more intricate
1034 than standard shogi.
1036 @item
1037 Chu (middle) shogi, played on a 12x12 board with 92 pieces.  This was
1038 (and is) by far the most popular of the variants, and has 21 different
1039 kinds of pieces in the starting line-up alone (along with several others
1040 that appear upon promotion).  Unlike modern shogi, there are a
1041 tremendous number of ranging pieces and the game is definitely not
1042 played with drops.  There is also an amazing piece called the Lion which
1043 has a double king move and can capture two pieces at once!  Chu shogi
1044 has a small but fanatical following, some of whom consider it better
1045 than modern shogi.
1047 @item
1048 Dai (great) shogi, played on a 15x15 board with 130 pieces.  Other than
1049 the larger board, this game is very similar to Chu shogi.
1051 @item
1052 Tenjiku (exotic) shogi, played on a 16x16 board with 176 pieces.  This
1053 game is possibly the most complex tactical game in existence.  There are
1054 many astoundingly powerful pieces, including one (the Fire Demon) that
1055 can capture up to eight opposing pieces in a single move!  Despite the
1056 size of the game, checkmates can occur very suddenly (and often very
1057 early on) if one player makes a wrong move.  Tenjiku also has a small
1058 but fanatical following, one of whom (Colin Adams) has written a book on
1059 the game which is available for download at
1060 @uref{http://www.colina.demon.co.uk/tenjiku.html}.
1062 @item
1063 Dai-dai (great-great) shogi, played on a 17x17 board with 192 pieces.
1064 The opening setup alone has 64 different kinds of pieces!  This game and
1065 the larger ones that follow sound pretty outlandish, but they have
1066 actually been played; a game of Dai-dai can supposedly be played in
1067 about 12 hours.
1069 @item
1070 Maka-dai-dai (great-great-great) shogi, played on a 19x19 board with 192
1071 pieces.  For those for whom Dai-dai shogi is just too small :-)
1073 @item
1074 Tai (grand) shogi, played on a 25x25 board with 354 pieces!  Until
1075 recently, this was thought to be the biggest chess game ever devised,
1076 but now there is...
1078 @item
1079 Kyoku tai (extremely grand?) shogi, played on a 36x36 board with 402
1080 pieces.  The rules for this have just been unearthed in an old Japanese
1081 book.  Hopefully someone will soon organize a postal Kyoku tai shogi
1082 championship; maybe their distant ancestors could finish it :-)
1084 It is thought that the really huge games (Dai-dai and up) were never
1085 really played to any significant extent (gee, wonder why?) and were
1086 devised merely so that the creators could have the fun of inventing
1087 enormous games, amazing their friends and confounding their enemies.
1088 However, the games up to Tenjiku shogi at least appear to be quite
1089 playable, assuming one has the time.
1091 @end enumerate
1094 @c Differences between shogi and chess.
1097 @node    Differences between shogi and chess,  ,  Shogi variants, About shogi
1098 @section Differences between shogi and chess
1099 @cindex  Shogi vs. Chess
1101 Some differences between shogi and international chess have been
1102 mentioned elsewhere in this document; I summarize them here for people
1103 who are interested in game comparisons.  I won't try to deal with the
1104 thorny question of which game is ``better'' although my bias may have
1105 already come through :-) In fact, the drop rule makes the two games so
1106 different in character that arguing over which game is better is like
1107 comparing apples to oranges (you'd be better off comparing chess to Chu
1108 shogi (@pxref{Shogi variants}).  However, I believe that if you are a
1109 chess fan you'll really like shogi as well, and shogi is also popular
1110 with many people who don't particularly like chess.
1112 Here are the significant differences between chess and shogi:
1114 @enumerate
1116 @item
1117 In shogi, captured pieces become the property of the capturer and can
1118 re-enter play by being dropped onto almost any vacant square.  In chess,
1119 captured pieces are out of the game.  Thus, in shogi, piece exchanges
1120 complicate the play significantly while in chess they simplify it.
1122 @item
1123 The shogi board is 9x9; the chess board is 8x8.
1125 @item
1126 Shogi has five pieces with no counterpart in chess: the gold and silver
1127 generals, the lance, the promoted rook and the promoted bishop.  Chess
1128 has one piece with no counterpart in shogi: the queen.  The knight's
1129 move in shogi is much more restrictive than in chess.  Pieces in shogi
1130 generally have a much smaller range of movement than in chess (unless
1131 they are in hand).
1133 @item
1134 In shogi, all pieces except the gold general and the king can promote,
1135 but only to one kind of piece.  Promotion is easier in shogi because the
1136 promotion zone is closer to the starting position of the pieces
1137 (especially pawns).  In chess, only the pawn can promote, but it can
1138 promote to any other piece except the king.
1140 @item
1141 In shogi, pawns capture the same way they move.  There is no initial
1142 two-space pawn move and hence no @emph{en-passant} captures.  In chess,
1143 pawns capture diagonally which means that opposing pawns can block each
1144 other.
1146 @item
1147 In shogi, you only have one rook and one bishop.  Note that the bishop
1148 is not restricted to only one ``color'' square (squares in shogi aren't
1149 colored, but never mind) because promoted bishops can also move one
1150 square orthogonally.
1152 @item
1153 There is no special castling move in shogi.  The term ``castle'' is
1154 used in shogi to denote a defensive formation consisting of (usually)
1155 three generals which protect the king.  There are many such castles
1156 (about 40 or so have names).  @xref{Sample game}.
1158 @item
1159 Draws are much rarer in shogi than in chess.  Perpetual check is not
1160 allowed.  Stalemate is a virtual impossibility, and is a loss for the
1161 stalematee. 
1163 @item
1164 Since pieces are never out of play in shogi, chess-type endgames
1165 involving only a few pieces do not occur.
1167 @item
1168 Shogi games are generally longer than chess games (about 60-70 moves is
1169 typical).
1171 @item
1172 Shogi has a well-developed handicap system which is in general use;
1173 chess does not.
1175 @end enumerate
1177 The effects of all these differences on play include (in my opinion):
1179 @enumerate
1181 @item
1182 Piece/pawn structures in chess are more rigid than in shogi.  Pawns
1183 block each other and pawns, once advanced, cannot ever retreat.  In
1184 shogi, you can repair the hole caused by a pawn advance by exchanging
1185 the pawn and dropping it back where you want it.  Thus shogi is more
1186 fluid than chess and less ``structural''.
1188 @item
1189 Counterattack is MUCH more common in shogi than in chess.  Games
1190 typically end in mutual mating attacks, where each player is trying to
1191 checkmate the other player before being checkmated himself.  This makes
1192 tempo incredibly important and also makes sacrificial play quite common.
1194 @item
1195 Attacks involving only ranging pieces are more a feature of chess than
1196 of shogi.  A shogi attack typically uses a ranging piece or pieces to
1197 support an attack by short-range pieces (especially generals).  It is
1198 very rare to mate a king with a non-adjacent ranging piece in shogi
1199 since the player whose king is threatened can almost always interpose by
1200 dropping a piece.
1202 @end enumerate
1205 @c --------------------
1206 @c gnushogi.
1207 @c --------------------
1209 @node    gnushogi, xshogi, About shogi, Top
1210 @chapter gnushogi
1211 @cindex  gnushogi
1213 This section describes how to run the ``gnushogi'' program.
1215 SYNOPSIS
1216      
1217 gnushogi [ [[-]a] [-b bookfile] [-B binbookfile] [-C] [-h langfile] 
1218 [-L langfile] [-r length] [-R] [-s pathname] [-l pathname] [-S binbooksize]
1219 [-t] [-c size] [-T size] [-v] [-x] [-X] arg1 arg2 ]
1221 DESCRIPTION
1223 GNU shogi (gnushogi) plays a game of japanese chess (shogi) against the
1224 user or it plays against itself.
1226 At startup gnushogi reads the binbook file if it is present.  It then
1227 looks for a book file.  If it is present it adds its contents to the
1228 binbook data.  If the binbook file is writable a new combined binbook
1229 file is written.
1231 Gnushogi is a modified version of the gnuchess program.  It has a simple
1232 alphanumeric board display, or it can be used with the xshogi program
1233 under X windows.  The program gets its opening moves from the file
1234 gnushogi.bbk which is located in a directory specified in the Makefile.
1235 To invoke the program type:
1237 @table @samp
1239 @item  gnushogi -C
1240 simple curses based version
1242 @item  gnushogi -X (or just gnushogi)
1243 xshogi compatible version
1245 @item gnushogi -R
1246 raw test display version
1247 @end table
1249 TIME CONTROLS
1251 If one argument is given, it is the search time per move in
1252 [minutes:]seconds.  So gnushogi 30 will generate one move every 30
1253 seconds, while gnushogi 5:00 will generate one move every 5 minutes.
1255 If two or more arguments are given, they will be used to set tournament
1256 time controls with the first argument of each pair being the number of
1257 moves and the second being the total clock time in minutes[:seconds].
1258 Thus, entering gnushogi 60 5 will set the clocks for 5 minutes (300
1259 seconds) for the first 60 moves, and gnushogi 30 3:30 will allow 3
1260 minutes and 30 seconds for 30 moves.
1262 gnushogi 30 5 1 :30 will allow 5 minutes for the first 30 moves and 30
1263 seconds for each move after that.  Up to 4 pairs of controls may be
1264 specified.
1266 If no argument is given the program will prompt the user for level of
1267 play.
1269 For use with xshogi see the documentation on that program.
1270 @xref{xshogi}.
1272 @page
1274 BOOK
1276 The book gnushogi.tbk consists of a sequence of openings.  An opening
1277 begins with a line starting with a # (the rest of the line is a comment).
1278 Following this is a series of moves in algebraic notation alternating
1279 between black and white separated by whitespace.  A move may have a ?
1280 after it indicating this move should never be made in this position.  Moves
1281 are stored as position:move so transpositions between openings can take
1282 place.
1284 HASHFILE
1286 The hashfile if created should be on the order of 4 megabytes; you can
1287 create such a hashfile by typing ``gnushogi -c 22'' (see below).  This
1288 file contains positions and moves learned from previous games.  If a
1289 hashfile is used the computer makes use of the experience it gained in
1290 past games.  Tests run so far show that it plays no worse with the
1291 hashfile than without, but it is not clear yet whether it provides a
1292 real advantage.
1294 LEGAL MOVES
1296 Note: Piece letters are determined by the language file.  What is
1297 specified here is the default (English).
1299 Once gnushogi is invoked, the program will display the board and prompt
1300 the user for a move.  To enter a move, use the notation 7g7f where the
1301 first letter-number pair indicates the origin square and the second
1302 letter-number pair indicates the destination square.  An alternative is
1303 to use the notation P7f where the first letter indicates the piece type
1304 (P,L,N,S,G,B,R,K).  To promote append a + the type of the new piece to
1305 the move, as in 2d2c+ or P2c+. Note that you must use capital letters
1306 for the pieces by default.
1308 COMMAND-LINE OPTIONS
1310 @table @samp
1312 @item -a
1313 Do not search on opponent's time.
1315 @item a
1316 Do search on opponent's time.
1318 @item -b @var{bookfile}
1319 Use bookfile for opening book.
1321 @item -B @var{binbookfile}
1322 Use binbookfile for binary opening book.
1324 @item -c @var{size}          
1325 Create a new HASHFILE.  File size is 2^size entries of approximately 65+?
1326 bytes.
1328 @item -C
1329 Use curses-based display mode.
1331 @item -h   
1332 Do not use hashfile.
1334 @item h    
1335 Do use hashfile.
1337 @item -l @var{pathname}
1338 Pathname of the loadfile used with get or xget.
1340 @item -L @var{lang}
1341 Use language lang from the file gnushogi.lang.  If -L is not specified
1342 it uses the first language in the file.
1344 @item  -P @var{plylevels}
1345 Number of plys to include in the binbookfile.  For generating a
1346 binbookfile.
1348 @item  -r @var{length}
1349 Rehash @emph{length} times in searching entries for position in
1350 transposition table.
1352 @item  -R  
1353 Use raw text display mode.  This can be used for dumb terminals or for
1354 systems that don't have curses.
1356 @item  -s @var{pathname}
1357 Pathname of the save file to use with the save command.
1359 @item  -S @var{size}
1360 Size of binbookfile for memory based books.  For creating a binbookfile.
1362 @item  -t   
1363 Show statistics for HASHFILE.
1365 @item  -T @var{size}
1366 Set the transposition table size to 2^size entries.
1368 @item  -v   
1369 Show version and patchlevel.
1371 @item  -x @var{value}
1372 Use value as the evaluation window xwndw.
1374 @item  -X   
1375 Use xshogi display mode (the default).
1377 @end table
1380 COMMANDS
1382 In addition to legal moves, the following commands can be entered at the
1383 gnushogi prompt.  Note: command names are determined by the language
1384 file and may vary with the implementation.  The default language is
1385 English.
1387 @table @samp
1389 @item alg
1390 allow algebraic input (not implemented).
1392 @item Awindow 
1393 change Alpha window (default score + 90).
1395 @item Bwindow 
1396 change Beta window (default score - 90).
1398 @item beep 
1399 toggles beeping after each move (default: on).
1401 @item bd 
1402 updates the current board position on the display.
1404 @item book 
1405 turns off use of the opening library.
1407 @item both 
1408 causes the computer to play both sides of a shogi game.
1410 @item black 
1411 causes the computer to play as White, if the computer was to move
1412 first.
1414 @item bsave 
1415 saves a game to disk as a book textfile.  The program will prompt the
1416 user for a file name.
1418 @item gamein 
1419 toggles game mode time control.  Assumes the time specified for time
1420 control is the time for a complete game.  Input with the level command
1421 should be the game time and the expected number of moves in a game.  go
1422 command must be given.
1424 @item coords 
1425 show coordinates on the display (visual only).
1427 @item contempt 
1428 allows the value of @emph{contempt} to be modified.
1430 @item debug 
1431 asks for a piece as color piece, as wb or bn, and shows its calculated
1432 value on each square.
1434 @item debuglevel 
1435 sets level of debugging output if compiled with debug options.
1437 @item depth 
1438 allows the user to change the search depth of the program.  The maximum
1439 depth is 29 ply.  Normally the depth is set to 29 and the computer
1440 terminates its search based on elapsed time rather than depth.  If depth
1441 is set to (say) 4 ply, the program will search until all moves have been
1442 examined to a depth of 4 ply (with extensions up to 11 additional ply
1443 for sequences of checks and captures).  If you set a maximum time per
1444 move and also use the depth command, the search will stop at the
1445 specified time or the specified depth, whichever comes first.
1447 @item easy 
1448 toggles easy mode (thinking on opponents time) on and off. The default
1449 is easy mode ON.  If easy mode is disabled, the keyboard is polled for
1450 input every so often and when input is seen the search is terminated. It
1451 may also be terminated with a sigint.
1453 @item edit 
1454 allows the user to set up a board position.
1455 @itemize @minus
1457 @item #    
1458 clear the board.
1460 @item c
1461 toggle piece color.
1463 @item .
1464 command will exit setup mode.
1466 @item p3b
1467 place a pawn on 3b
1469 @item p3b+
1470 place a promoted pawn on 3b
1472 @item p*
1473 place a pawn in hand (among the captured pieces)
1475 @end itemize
1477 Pieces are entered by typing a letter (p,l,n,s,g,b,r,k)  for
1478 the piece followed by the coordinate.  Here, letter case is ignored.
1480 The usual warning about the language file applies.
1482 @item exit 
1483 exits gnushogi.
1485 @item first 
1486 tells the computer to move first.  Computer begins searching for a move.
1487 (same as ``go'').
1489 @item force 
1490 allows the user to enter moves for both sides.  To get the program to
1491 play after a sequence of moves has been entered use the ``black'' or
1492 ``white'' commands.
1494 @item get 
1495 retrieves a game from disk.  The program will prompt the user for a file
1496 name.
1498 @item go 
1499 tells the computer to move first.  Computer begins searching for a move.
1500 (same as ``first'').
1502 @item hash 
1503 use/don't use hashfile.
1505 @item hashdepth 
1506 allows the user to change the minimum depth for using the hashfile and
1507 the number of moves from the beginning of the game to use it.
1509 @item help 
1510 displays a short description of the commands and the current status of
1511 options.
1513 @item hint 
1514 causes the program to supply the user with its predicted move.
1516 @item level 
1517 allows the user to set time controls such as 60 moves in 5 minutes etc.
1518 In tournament mode, the program will vary the time it takes for each
1519 move depending on the situation.  If easy mode is disabled (using the
1520 ``easy'' command), the program will often respond with its move
1521 immediately, saving time on its clock for use later on.
1523 @item list 
1524 writes the game moves and some statistics on search depth, nodes, and
1525 time to the file ``shogi.lst''.
1527 @item material 
1528 toggle material flag - draws on no pawns and both sides < rook.
1530 @item new 
1531 starts a new game.
1533 @item p 
1534 evaluates the board and shows the point score for each piece.  The total
1535 score for a position is the sum of these individual piece scores.
1537 @item post 
1538 causes the program to display the principal variation and the score
1539 during the search.  A score of 100 is equivalent to a 1 pawn advantage
1540 for the computer.
1542 @item quit 
1543 exits the game.
1545 @item random 
1546 causes the program to randomize its move selection slightly.
1548 @item rcptr 
1549 set recapture mode.
1551 @item remove 
1552 backout the last level for both sides.  Equal to 2 undo's.
1554 @item reverse 
1555 causes the board display to be reversed.  That is, the Black's pieces will
1556 now appear at the top of the board.
1558 @item rv 
1559 reverse board display.
1561 @item save 
1562 saves a game to disk.  The program will prompt the user for a file name.
1564 @item switch 
1565 causes the program to switch places with the opponent and begin
1566 searching.
1568 @item test 
1569 performs some speed tests for MoveList and CaptureList generation, and
1570 ScorePosition position scoring for the current board.
1572 @item time 
1573 set computer's time remaining, intended for synchronizing clocks among
1574 multiple players.
1576 @item tsume 
1577 toggle tsume mode. In tsume mode, not all possible moves will be
1578 generated. If a king is in check, only moves that get the king out of
1579 check are generated.  If the king is not in check, only moves that give
1580 check to the opponent's king are generated.
1582 @item undo 
1583 undoes the last move whether it was the computer's or the human's.  You
1584 may also type ``remove''.  This is equivalent to two ``undo'''s
1585 (e.g. retract one move for each side).
1587 @item white 
1588 causes the computer to play as Black; if the computer is to move
1589 first the go command must be given.
1591 @item xget 
1592 read an xshogi position file.
1594 @item xsave 
1595 save as an xshogi position file.
1597 @item xwndw 
1598 change X window. The window around alpha/beta used to determine whether
1599 the position should be scored or just estimated.  Note: this has
1600 @emph{nothing} to do with xshogi or X windows; the terms are completely
1601 separate.
1603 @end table
1606 @c --------------------
1607 @c xshogi.
1608 @c --------------------
1610 @node    xshogi, References and links, gnushogi, Top
1611 @chapter xshogi
1612 @cindex  xshogi
1614 This section describes how to run the ``xshogi'' program.
1616 SYNOPSIS
1618 xshogi [ options ]
1620 DESCRIPTION
1622 xshogi provides an X11/Xt/Athena Widgets user interface for gnushogi.
1623 With xshogi you can play gnushogi, set up arbitrary positions, force
1624 variations, or watch xshogi manage a game between two shogi programs.
1625 Furthermore, it can be used as an interface between two players on
1626 different displays.
1628 xshogi can also be used as a shogi board to play out games.  It will
1629 read through a game file or allow a player to play through a variation
1630 manually (force mode).  This is useful for keeping track of email postal
1631 games or browsing games off the net.
1633 After starting xshogi, you can make moves by pressing mouse button 1
1634 while the cursor is over a square with your piece on it and dragging the
1635 mouse to another square.  If the move is illegal, gnushogi will not
1636 allow it.  xshogi will then retract the move.
1638 COMMAND-LINE OPTIONS
1640 The following command line options also correspond to X resources that
1641 you can set in your .Xdefaults file.
1643 @table @samp
1645 @item [standard Xt options]
1646 xshogi accepts standard Xt options like -display, -geometry, and
1647 -iconic.
1649 @item -tc or -timeControl minutes[:seconds]
1650 Amount of time for a set of moves determined by movesPerSession.  If
1651 this number of moves is played within the time control period, xshogi
1652 resets the time clocks.  Default: 5 minutes.
1654 @item -mps or -movesPerSession moves
1655 Number of moves in a time control period.  Default: 40 moves.
1657 @item -st or -searchTime minutes[:seconds]
1658 Tell gnushogi to spend at most the given amount of time searching for
1659 each of its moves.  Without this option, gnushogi chooses its search
1660 time based on the number of moves and amount of time remaining until the
1661 next time control.  Setting this option also sets -clockMode to False.
1663 @item -sd or -searchDepth number
1664 Tell gnushogi to look ahead at most the given number of moves when
1665 searching for a move to make.  Without this option, gnushogi chooses
1666 its search depth based on the number of moves and amount of time
1667 remaining until the next time control.  Setting this option also sets
1668 -clockMode to False.
1670 @item -clock or -clockMode (True | False)
1671 Determines whether or not to use the clock.  If clockMode is False, the
1672 clock does not run, but the side that is to play next is still
1673 highlighted.
1675 @item -td or -timeDelay seconds
1676 Time delay between moves during ``Load Game''.  This doesn't have to be
1677 a round number.  Try -td 0.4.  Default: 1 second.
1679 @item -nsp or -noShogiProgram (True | False)
1680 If this option is True, xshogi acts as a passive shogi board; it does
1681 not try to start a shogi program, not even to check whether moves made
1682 in Force mode are legal.  It also sets -clockMode to False.  Default:
1683 False.
1685 @item -fsp or -firstShogiProgram program
1686 Name of first shogi program.  In matches between two machines, this
1687 program plays white.  Default: ``gnushogi''.
1689 @item -ssp or -secondShogiProgram program
1690 Name of second shogi program, if needed.  In matches between two
1691 machines, this program plays black; otherwise it is not started.
1692 Default: ``gnushogi''.
1694 @item -fh or -firstHost host
1695 Name of host the first shogi program plays on.  Default: ``localhost''.
1697 @item -sh or -secondHost host
1698 Name of host the second shogi program plays on.  Default: ``localhost''.
1700 @item -rsh or -remoteShell shell_name
1701 Some systems do not use rsh as the remote shell.  This option allows a
1702 user to name the remote shell command.  This should be done in the
1703 resource file.
1705 @item -mm or -matchMode (False | Init | Position | Opening)
1706 Automatically run a game between firstShogiProgram and
1707 secondShogiProgram.  If matchMode is set to Init, xshogi will start the
1708 game with the initial shogi position.  If matchMode is set to Position,
1709 xshogi will start the game with the position specified by the
1710 loadPositionFile resource.  If matchMode is set to Opening, xshogi will
1711 play out the opening moves specified by the -loadGameFile resource.  If
1712 the -saveGameFile resource is set, a move record for the match will be
1713 saved in the specified file.  Default: ``False''.
1715 @item -lgf or -loadGameFile file
1716 Name of file to read a game record from.  Game files are found in the
1717 directory named by the SHOGIDIR environment variable.  If this variable
1718 is not set, the current directory is used unless the file name starts
1719 with a /.
1721 @item -lpf or -loadPositionFile file
1722 Name of file to read a game position from.  Position files are found in
1723 the directory named by the SHOGIDIR environment variable.  If this
1724 variable is not set, the current directory is used unless the file name
1725 starts with a /.
1727 @item -sgf or -saveGameFile file
1728 Name of file to save a game record to.  Game files are saved in the
1729 directory named by the SHOGIDIR environment variable.  If this variable
1730 is not set, the current directory is used unless the file name starts
1731 with a /.
1733 @item -spf or -savePositionFile file
1734 Name of file to save a game position to.  Position files are saved in
1735 the directory named by the SHOGIDIR environment variable.  If this
1736 variable is not set, the current directory is used unless the file name
1737 starts with a /.
1739 @item -coords or -showCoords (True | False)
1740 If this option is True, xshogi displays algebraic coordinates along the
1741 board's left and bottom edges.  The default is False.  The coordFont
1742 resource specifies what font to use.
1744 @item -mono or -monoMode (True | False)
1745 Determines whether xshogi displays its pieces and squares with two
1746 colors or four.  You shouldn't have to specify monochrome.  xshogi will
1747 determine if this is necessary.
1749 @item -pc or -pieceColor color
1750 Color specification for pieces suitable for XParseColor().
1751 Default: #FFFFD7.  
1753 @item -sc or -squareColor color
1754 Same for squares.  Default: #EBDFB0.
1756 @item -wps or -westernPieceSet (True | False)
1757 Choose the Western style piece set.
1759 @item -npb or -normalPawnBitmap file
1760 @item -nnb or -normalKnightBitmap file
1761 @item -nbb or -normalBishopBitmap file
1762 @item -nrb or -normalRookBitmap file
1763 @item -nkb or -normalKingBitmap file
1764 Names of the bitmap files for the bitmap piece icons.
1766 @item -rpb or -reversePawnBitmap file
1767 @item -rnb or -reverseKnightBitmap file
1768 @item -rbb or -reverseBishopBitmap file
1769 @item -rrb or -reverseRookBitmap file
1770 @item -rkb or -reverseKingBitmap file
1771 Names of the bitmap files for the outline piece icons.
1773 @item -debug or -debugMode (True | False)
1774 Turns on debugging printout.
1776 @end table
1778 @page
1780 OTHER X RESOURCES
1782 @table @samp
1784 @item initString
1785 The actual string that is sent to initialize the shogi program can be
1786 set from .Xdefaults.  It can't be set from the command line because of
1787 syntax problems.  The default value is ``new\nbeep\nrandom\neasy\n''.
1788 The ``new'' and ``beep'' commands are required. You can remove the
1789 ``random'' command if you like; including it causes gnushogi to
1790 randomize its move selection slightly so that it doesn't play the same
1791 moves in every game.  Even without ``random'', gnushogi randomizes its
1792 choice of moves from its opening book.  You can also remove ``easy'' if
1793 you like; including it toggles easy mode off, causing gnushogi to think
1794 on your time.  That is, if ``easy'' is included in the initString, GNU
1795 Shogi thinks on your time; if not, it does not.  (Yes, this does seem
1796 backwards, doesn't it.)  You can also try adding other commands to the
1797 initString; see the gnushogi documentation (@pxref{gnushogi}) for
1798 details.
1800 @item blackString and whiteString
1801 These resources control what is sent when the Machine Black and Machine
1802 White buttons are selected.  This is mostly for compatibility with
1803 obsolete versions of gnushogi.
1805 Alternate bitmaps for piece icons can be specified either by choosing
1806 one of the built-in sets or with the file name resources described
1807 above.  There are three built-in sets of piece bitmaps available, large
1808 (the default), medium, or small.  It is easiest to select the set you
1809 prefer in the .Xdefaults file:
1811      XShogi*boardSize:   Medium
1813 The font used for button labels and comments can be changed in the
1814 .Xdefaults file.  You may want to choose a smaller font if you are using
1815 the small pieces:
1817      XShogi*font:    helvetica_oblique12
1819 The font used for coordinates (when the showCoords option is True) can
1820 be set similarly:
1822      XShogi*coordFont:    helvetica_10
1824 If you are using a grayscale monitor, try setting the colors to:
1826      XShogi*pieceColor:     gray100 @*
1827      XShogi*squareColor:    gray60  @*
1829 @end table
1831 COMMAND BUTTONS AND KEYS
1833 @table @samp
1835 @item Quit    
1836 Quits xshogi.  Q or q is a keyboard equivalent.
1838 @item Reset   
1839 Resets xshogi to the beginning of a shogi game.  It also deselects any
1840 game or position files.
1842 @item Flip View
1843 inverts the view of the shogi board.
1845 @item Hint    
1846 displays a move hint from gnushogi.
1848 @item Load Game
1849 plays a game from a record file.  If no file is specified a popup dialog
1850 asks for a filename.  Game files are found in the directory named by the
1851 SHOGIDIR environment variable.  If this variable is not declared then
1852 the current directory is used unless the file name starts with a /.  G
1853 or g is a keyboard equivalent.  The game file parser will accept almost
1854 any file that contains moves in algebraic notation.  If the first line
1855 begins with `#', it is assumed to be a title and is displayed.  Text
1856 enclosed in parentheses or square brackets is assumed to be commentary
1857 and is displayed in a pop-up window.  Any other text in the file is
1858 ignored.
1860 @item Load Position
1861 sets up a position from a position file.  If no file is specified a
1862 popup dialog asks for a filename.  Position files are found in the
1863 directory named by the SHOGIDIR environment variable.  If this variable
1864 is not declared then the current directory is used unless the file name
1865 starts with a /.  Position files must be in the format that the Save
1866 Position command writes.
1868 @item Save Game
1869 saves a game to a record file.  If no file is specified a popup dialog
1870 asks for a filename.  If the filename exists, the user is asked whether
1871 the current game record is be appended to this file or if the file
1872 should be replaced.  Game files are saved in the directory named by the
1873 SHOGIDIR environment variable.  If this variable is not declared then
1874 the current directory is used unless the file name starts with a /.
1875 Game files are human-readable, and can also be read back by the Load
1876 Game command. Furthermore, they are accepted as gnushogi text bookfiles.
1878 @item Save Position
1879 saves a position to a position file.  If no file is specified a popup
1880 dialog asks for a filename.  Position files are saved in the directory
1881 named by the SHOGIDIR environment variable.  If this variable is not
1882 declared then the current directory is used unless the file name starts
1883 with a /.  Position files are human-readable, and can also be read back
1884 by the Load Position command.
1886 @item Machine White
1887 forces gnushogi to play white.
1889 @item Machine Black
1890 forces gnushogi to play black.
1892 @item Force Moves
1893 forces a series of moves.  That is, gnushogi stops playing and xshogi
1894 allows you to make moves for both white and black.
1896 @item Two Machines
1897 plays a game between two computer programs.
1899 @item Forward 
1900 moves forward through a series of remembered moves.  F or f is a
1901 keyboard equivalent.
1903 @item Backward
1904 moves backward through a series of remembered moves.  As a side effect,
1905 puts xshogi into Force Moves mode.  B or b is a keyboard equivalent.
1907 @item Pause   
1908 pauses the clocks or (in Load Game mode) pauses the game being loaded.
1909 Press Pause again to continue.  P or p is a keyboard equivalent.
1911 @item Edit Position
1912 lets you set up an arbitrary board position.  Use mouse button 1 to drag
1913 pieces to new squares, or to delete a piece by dragging it off the board
1914 or dragging an empty square on top of it.  To drop a new piece on a
1915 square, press mouse button 2 or 3 over the square.  This brings up a
1916 menu of black pieces (button 2) or white pieces (button 3).  Additional
1917 menu choices let you empty the square or clear the board.  You can set
1918 the side to play next by clicking on the Black or White indicator at the
1919 top of the screen.
1921 @item Challenge
1922 allows you to make a two display game between two human players.  Enter
1923 the display you want to connect to.  If you are allowed to connect, a
1924 new board is displayed at the remote display.  Challenge mode can only
1925 be stopped by pressing ``quit''.
1927 @item Select Level
1928 allows you to reset the clocks for both players.  Enter the number of
1929 moves and the number of minutes in which the moves should be done.
1931 @item Move NOW
1932 force computer to stop thinking and to make the current best move.
1934 @item Iconify I, i, C or c 
1935 iconifies xshogi.
1937 @end table
1939 LIMITATIONS
1941 If you press the  Pause  button  during  GNU  Shogi's  turn,
1942 xshogi will stop the clocks, but gnushogi will still make a
1943 move.
1945 After a mate or draw when playing against gnushogi, if  you
1946 back  up  with  the  Backward  button,  the clocks are reset
1947 (because gnushogi has exited and must be restarted).
1949 The game parser recognizes only algebraic notation.
1951 AUTHORS
1953 Original authors of XBoard:  Chris Sears and Dan Sears.
1955 Enhancements for XBoard (Version 2.0):  Tim Mann.
1957 Conversion to XShogi (Version 1.1):  Matthias Mutz.
1959 Current maintainer: Mike Vanier.
1961 COPYRIGHT INFORMATION
1963 XShogi borrows its piece bitmaps from CRANES Shogi.
1965 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
1966 Enhancements Copyright 1992 Free Software Foundation, Inc.  Enhancements
1967 Copyright 1993 Matthias Mutz.  Further enhancements copyright 1999 by
1968 Michael Vanier and the Free Software Foundation, Inc.
1970 The following terms apply to Digital Equipment Corporation's copyright
1971 interest in XBoard:
1973 All Rights Reserved
1975 Permission to use, copy, modify, and distribute this software and its
1976 documentation for any purpose and without fee is hereby granted,
1977 provided that the above copyright notice appear in all copies and that
1978 both that copyright notice and this permission notice appear in
1979 supporting documentation, and that the name of Digital not be used in
1980 advertising or publicity pertaining to distribution of the software
1981 without specific, written prior permission.
1983 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
1984 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
1985 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
1986 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1987 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1988 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1989 SOFTWARE.
1991 The following terms apply to the enhanced version of XShogi distributed
1992 by the Free Software Foundation:
1994 This file is part of XSHOGI.
1996 XSHOGI is distributed in the hope that it will be useful, but WITHOUT
1997 ANY WARRANTY.  No author or distributor accepts responsibility to anyone
1998 for the consequences of using it or for whether it serves any particular
1999 purpose or works at all, unless he says so in writing.  Refer to the
2000 XSHOGI General Public License for full details.
2002 Everyone is granted permission to copy, modify and redistribute XSHOGI,
2003 but only under the conditions described in the XSHOGI General Public
2004 License. A copy of this license is supposed to have been given to you
2005 along with XSHOGI so you can know your rights and responsibilities.  It
2006 should be in a file named COPYING.  Among other things, the copyright
2007 notice and this notice must be preserved on all copies.
2010 @c ---------------------
2011 @c References and links.
2012 @c ---------------------
2014 @node    References and links, Acknowledgements, xshogi, Top
2015 @chapter References and links
2016 @cindex  References
2017 @cindex  Books
2018 @cindex  Mailing lists
2019 @cindex  Web sites
2022 There are very few English-language books for people learning shogi.
2023 The two I recommend are:
2025 @enumerate
2027 @item
2028 @cite{Shogi for Beginners, 2nd. Edition}, by John Fairbairn.  This is a
2029 superb beginner's book in every way, covering all phases of the game.
2030 It was out of print for a long time, but has now been reprinted and is
2031 available either from Kiseido (@uref{http://www.labnet.or.jp/~kiseido})
2032 or from George Hodges (see below).
2034 @item
2035 @cite{The Art of Shogi}, by Tony Hoskings.  This is one step up from the
2036 Fairbairn book.  It covers a lot of ground, and is especially noteworthy
2037 for its detailed treatment of opening lines.  You can order this book
2038 from Amazon.com's UK branch (@uref{http://www.amazon.co.uk}).
2040 @end enumerate
2042 Another book you may find is @cite{Shogi: Japan's Game of Strategy} by
2043 Trevor Leggett.  This book is very elementary and is somewhat outdated,
2044 having been published first in 1966.  However, it does feature a paper
2045 shogi board and punch-out pieces, so if you want a really cheap shogi
2046 set you might pick this book up.  It is still in print.
2048 Two books that are no longer in print but are definitely worth getting
2049 if you find them are @cite{Guide to Shogi Openings} and @cite{Better
2050 Moves for Better Shogi}, both by Aono Teriuchi.  They are published in a
2051 bilingual edition (English/Japanese) and are the only books on shogi in
2052 English written by a Japanese professional shogi player.  John Fairbairn
2053 did the translation from Japanese to English.
2055 Shogi sets are available from:
2057 @quotation
2058 George F. Hodges @*
2059 P.O. Box 77 @*
2060 Bromley, Kent @*
2061 United Kingdom BR1 2WT
2062 @end quotation
2064 George also sells equipment for all the historical shogi variants
2065 (@pxref{Shogi variants}) (except for Kyoku tai shogi) and also sells
2066 back issues of the magazine ``Shogi'' which he published for 70 issues
2067 in the late 70's to late 80's.  This magazine is STRONGLY recommended;
2068 it contains more information about shogi in English than you will ever
2069 find anywhere else.
2071 Here are some useful URLs:
2073 @table @asis
2075 @item Pieter Stouten's shogi page: @uref{http://www.shogi.net}
2076 This is the main shogi-related site on the internet, with links to
2077 almost all the other sites.
2079 @item Roger Hare's shogi page: @uref{http://www.ed.ac.uk/~rjhare/shogi}
2080 This has lots of information, including full rules to most of the shogi
2081 variants.
2083 @item Patrick Davin's Shogi Nexus: @uref{http://www.vega.or.jp/~patrick/shogi/}
2084 There's lots of cool stuff on this site; my favorite is the extensive
2085 collection of Tsume-shogi (mating) problems, both for beginners and
2086 more advanced players.
2088 @item Steve Evans' shogi page: @uref{http://www.netspace.net.au/~trout/index.html} 
2089 Steve has written a program that plays almost all of the shogi variants,
2090 unfortunately it only runs on Windows :-(
2092 @item Hans Bodlaender's chess variant pages: @uref{http://www.cs.ruu.nl/~hansb/d.chessvar}
2093 This page has an almost unimaginable variety of rules for different
2094 chess variants, including many shogi variants (historical and non-historical).
2096 @end table
2098 @c -----------------
2099 @c Acknowledgements.
2100 @c -----------------
2102 @node    Acknowledgements, Bugs, References and links, Top
2103 @chapter Acknowledgements
2104 @cindex  Acknowledgements
2106 I would like to thank the following people:
2108 @itemize @bullet
2110 @item
2111 Matthias Mutz, who originally developed GNU shogi as a spin-off of GNU
2112 chess and who very kindly let me take over the maintenance of this very
2113 interesting project.
2115 @item
2116 Richard Stallman and the Free Software Foundation, for creating an
2117 organization where anyone can contribute software for the common good of
2118 all, for making GNU/Linux possible, and especially for writing emacs and
2119 gcc, without which my working life would be intolerable.
2121 @item
2122 Georges Hodges, for starting the Shogi Association in England, without
2123 which I would probably never have heard of shogi, for supplying shogi
2124 equipment, for publishing the excellent magazine ``Shogi'' (now sadly
2125 defunct), for personally answering all my silly questions by mail, and
2126 for being the ambassador of shogi to the West.
2128 @item
2129 Pieter Stouten, for having the most comprehensive shogi site on the
2130 World Wide Web (@uref{http://www.shogi.net}), and for
2131 maintaining the shogi-l mailing list.  Go to Pieter's web site for more
2132 information on subscribing to the list.  Also thanks to everyone who
2133 contributes and has contributed to that list.
2135 @item
2136 Matt Casters, for testing GNU shogi.  Matt and I will be working
2137 together on improving the solution engine in future versions of this
2138 program.
2140 @end itemize
2142 @c -----
2143 @c Bugs.
2144 @c -----
2146 @node    Bugs, Index, Acknowledgements, Top
2147 @chapter Bugs
2149 The motto of GNU shogi is ``100% bug-free or you don't pay!'' :-) In
2150 the extremely unlikely case (*ahem*) that you do find a bug, please
2151 report it to the bug tracker at
2152 @uref{https://savannah.gnu.org/projects/gnushogi/}.  Also, feel free
2153 to post comments, complaints, out-and-out raves, suggestions and such
2154 to one of the mailing lists at
2155 @uref{https://savannah.gnu.org/mail/?group=gnushogi}.
2158 @c ============
2159 @c End of body.
2160 @c ============
2164 @c ====
2165 @c End.
2166 @c ====
2168 @node    Index,  , Bugs, Top
2169 @chapter Index
2171 @printindex cp
2173 @contents
2175 @bye