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