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