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