1 \input texinfo @c -*-texinfo-*-
3 @c % ** Start of header.
4 @setfilename gnushogi.info
5 @settitle GNU Shogi manual
10 @c ==================================
11 @c TeX-specific macros
12 @c ==================================
16 @c ==================================
17 @c info-specific macros
18 @c ==================================
22 @c ==================================
23 @c Summary description and copyright.
24 @c ==================================
28 This file describes how to use GNU shogi,
29 a program which plays Shogi (Japanese chess).
31 Copyright (C) 1999 Michael C. Vanier and the Free Software Foundation, Inc.
33 Permission is granted to make and distribute verbatim copies of
34 this manual provided the copyright notice and this permission notice
35 are preserved on all copies.
38 Permission is granted to process this file through TeX and print the
39 results, provided the printed document carries copying permission
40 notice identical to this one except for the removal of this paragraph
41 (this paragraph not being relevant to the printed manual).
44 Permission is granted to copy and distribute modified versions of this
45 manual under the conditions for verbatim copying, provided that the entire
46 resulting derived work is distributed under the terms of a permission
47 notice identical to this one.
49 Permission is granted to copy and distribute translations of this manual
50 into another language, under the above conditions for modified versions,
51 except that this permission notice may be stated in a translation approved
52 by the Free Software Foundation.
56 @c =========================================
57 @c End of summary description and copyright.
58 @c =========================================
61 @c ====================
62 @c Title and copyright.
63 @c ====================
67 @comment The title is printed in a large font.
68 @center @titlefont{GNU Shogi (Japanese chess)}
71 @c The following two commands start the copyright page.
73 @vskip 0pt plus 1filll
74 Copyright @copyright{} 1999 Michael C. Vanier and the Free Software Foundation
78 @c ===========================
79 @c End of title and copyright.
80 @c ===========================
83 @c =========================
84 @c Top node and master menu.
85 @c =========================
87 @node Top, (dir), (dir), (dir)
88 @top GNU Shogi (Japanese chess)
92 * Introduction:: What is GNU shogi?
93 * License:: The GNU General Public License.
94 * About shogi:: General information, rules, etc.
95 * gnushogi:: How to play GNU shogi (gnushogi).
96 * xshogi:: The X interface to GNU shogi.
97 * References and links:: Where to go for more information.
99 * Bugs:: Where and how to report bugs.
105 This document describes GNU shogi, a program which plays Japanese chess
106 (shogi) against a human opponent.
109 @c ================================
110 @c End of top node and master menu.
111 @c ================================
118 @node Introduction, License, Top, Top
119 @chapter Introduction
122 GNU shogi is a program that plays shogi, the Japanese version of chess,
123 against a human (or computer) opponent. This file describes how to use
124 GNU shogi and also gives background information about the game of shogi.
126 This file describes GNU shogi version 1.3. It was written by me, Mike
127 Vanier, the current maintainer of GNU shogi. My email address is
128 @email{mvanier@@bbb.caltech.edu}.
131 GNU shogi is actually two programs:
138 is the text-based program which also contains the game-playing engine.
141 is the X-windows graphical interface to gnushogi.
147 Since xshogi invokes gnushogi, most players will just type ``xshogi''
150 Disclaimer: I use the personal pronouns ``him'', ``his'' etc. to refer
151 to a shogi player regardless of gender. That's easier than writing
152 ``his or her'' all over the place. I don't mean to infer that women
153 don't play shogi; in fact shogi is very popular in Japan among women as
158 @node License, About shogi, Introduction, Top
159 @unnumbered GNU GENERAL PUBLIC LICENSE
162 @center Version 2, June 1991
165 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
166 675 Mass Ave, Cambridge, MA 02139, USA
168 Everyone is permitted to copy and distribute verbatim copies
169 of this license document, but changing it is not allowed.
172 @unnumberedsec Preamble
174 The licenses for most software are designed to take away your
175 freedom to share and change it. By contrast, the GNU General Public
176 License is intended to guarantee your freedom to share and change free
177 software---to make sure the software is free for all its users. This
178 General Public License applies to most of the Free Software
179 Foundation's software and to any other program whose authors commit to
180 using it. (Some other Free Software Foundation software is covered by
181 the GNU Library General Public License instead.) You can apply it to
184 When we speak of free software, we are referring to freedom, not
185 price. Our General Public Licenses are designed to make sure that you
186 have the freedom to distribute copies of free software (and charge for
187 this service if you wish), that you receive source code or can get it
188 if you want it, that you can change the software or use pieces of it
189 in new free programs; and that you know you can do these things.
191 To protect your rights, we need to make restrictions that forbid
192 anyone to deny you these rights or to ask you to surrender the rights.
193 These restrictions translate to certain responsibilities for you if you
194 distribute copies of the software, or if you modify it.
196 For example, if you distribute copies of such a program, whether
197 gratis or for a fee, you must give the recipients all the rights that
198 you have. You must make sure that they, too, receive or can get the
199 source code. And you must show them these terms so they know their
202 We protect your rights with two steps: (1) copyright the software, and
203 (2) offer you this license which gives you legal permission to copy,
204 distribute and/or modify the software.
206 Also, for each author's protection and ours, we want to make certain
207 that everyone understands that there is no warranty for this free
208 software. If the software is modified by someone else and passed on, we
209 want its recipients to know that what they have is not the original, so
210 that any problems introduced by others will not reflect on the original
211 authors' reputations.
213 Finally, any free program is threatened constantly by software
214 patents. We wish to avoid the danger that redistributors of a free
215 program will individually obtain patent licenses, in effect making the
216 program proprietary. To prevent this, we have made it clear that any
217 patent must be licensed for everyone's free use or not licensed at all.
219 The precise terms and conditions for copying, distribution and
224 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
227 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
232 This License applies to any program or other work which contains
233 a notice placed by the copyright holder saying it may be distributed
234 under the terms of this General Public License. The ``Program'', below,
235 refers to any such program or work, and a ``work based on the Program''
236 means either the Program or any derivative work under copyright law:
237 that is to say, a work containing the Program or a portion of it,
238 either verbatim or with modifications and/or translated into another
239 language. (Hereinafter, translation is included without limitation in
240 the term ``modification''.) Each licensee is addressed as ``you''.
242 Activities other than copying, distribution and modification are not
243 covered by this License; they are outside its scope. The act of
244 running the Program is not restricted, and the output from the Program
245 is covered only if its contents constitute a work based on the
246 Program (independent of having been made by running the Program).
247 Whether that is true depends on what the Program does.
250 You may copy and distribute verbatim copies of the Program's
251 source code as you receive it, in any medium, provided that you
252 conspicuously and appropriately publish on each copy an appropriate
253 copyright notice and disclaimer of warranty; keep intact all the
254 notices that refer to this License and to the absence of any warranty;
255 and give any other recipients of the Program a copy of this License
256 along with the Program.
258 You may charge a fee for the physical act of transferring a copy, and
259 you may at your option offer warranty protection in exchange for a fee.
262 You may modify your copy or copies of the Program or any portion
263 of it, thus forming a work based on the Program, and copy and
264 distribute such modifications or work under the terms of Section 1
265 above, provided that you also meet all of these conditions:
269 You must cause the modified files to carry prominent notices
270 stating that you changed the files and the date of any change.
273 You must cause any work that you distribute or publish, that in
274 whole or in part contains or is derived from the Program or any
275 part thereof, to be licensed as a whole at no charge to all third
276 parties under the terms of this License.
279 If the modified program normally reads commands interactively
280 when run, you must cause it, when started running for such
281 interactive use in the most ordinary way, to print or display an
282 announcement including an appropriate copyright notice and a
283 notice that there is no warranty (or else, saying that you provide
284 a warranty) and that users may redistribute the program under
285 these conditions, and telling the user how to view a copy of this
286 License. (Exception: if the Program itself is interactive but
287 does not normally print such an announcement, your work based on
288 the Program is not required to print an announcement.)
291 These requirements apply to the modified work as a whole. If
292 identifiable sections of that work are not derived from the Program,
293 and can be reasonably considered independent and separate works in
294 themselves, then this License, and its terms, do not apply to those
295 sections when you distribute them as separate works. But when you
296 distribute the same sections as part of a whole which is a work based
297 on the Program, the distribution of the whole must be on the terms of
298 this License, whose permissions for other licensees extend to the
299 entire whole, and thus to each and every part regardless of who wrote it.
301 Thus, it is not the intent of this section to claim rights or contest
302 your rights to work written entirely by you; rather, the intent is to
303 exercise the right to control the distribution of derivative or
304 collective works based on the Program.
306 In addition, mere aggregation of another work not based on the Program
307 with the Program (or with a work based on the Program) on a volume of
308 a storage or distribution medium does not bring the other work under
309 the scope of this License.
312 You may copy and distribute the Program (or a work based on it,
313 under Section 2) in object code or executable form under the terms of
314 Sections 1 and 2 above provided that you also do one of the following:
318 Accompany it with the complete corresponding machine-readable
319 source code, which must be distributed under the terms of Sections
320 1 and 2 above on a medium customarily used for software interchange; or,
323 Accompany it with a written offer, valid for at least three
324 years, to give any third party, for a charge no more than your
325 cost of physically performing source distribution, a complete
326 machine-readable copy of the corresponding source code, to be
327 distributed under the terms of Sections 1 and 2 above on a medium
328 customarily used for software interchange; or,
331 Accompany it with the information you received as to the offer
332 to distribute corresponding source code. (This alternative is
333 allowed only for noncommercial distribution and only if you
334 received the program in object code or executable form with such
335 an offer, in accord with Subsection b above.)
338 The source code for a work means the preferred form of the work for
339 making modifications to it. For an executable work, complete source
340 code means all the source code for all modules it contains, plus any
341 associated interface definition files, plus the scripts used to
342 control compilation and installation of the executable. However, as a
343 special exception, the source code distributed need not include
344 anything that is normally distributed (in either source or binary
345 form) with the major components (compiler, kernel, and so on) of the
346 operating system on which the executable runs, unless that component
347 itself accompanies the executable.
349 If distribution of executable or object code is made by offering
350 access to copy from a designated place, then offering equivalent
351 access to copy the source code from the same place counts as
352 distribution of the source code, even though third parties are not
353 compelled to copy the source along with the object code.
356 You may not copy, modify, sublicense, or distribute the Program
357 except as expressly provided under this License. Any attempt
358 otherwise to copy, modify, sublicense or distribute the Program is
359 void, and will automatically terminate your rights under this License.
360 However, parties who have received copies, or rights, from you under
361 this License will not have their licenses terminated so long as such
362 parties remain in full compliance.
365 You are not required to accept this License, since you have not
366 signed it. However, nothing else grants you permission to modify or
367 distribute the Program or its derivative works. These actions are
368 prohibited by law if you do not accept this License. Therefore, by
369 modifying or distributing the Program (or any work based on the
370 Program), you indicate your acceptance of this License to do so, and
371 all its terms and conditions for copying, distributing or modifying
372 the Program or works based on it.
375 Each time you redistribute the Program (or any work based on the
376 Program), the recipient automatically receives a license from the
377 original licensor to copy, distribute or modify the Program subject to
378 these terms and conditions. You may not impose any further
379 restrictions on the recipients' exercise of the rights granted herein.
380 You are not responsible for enforcing compliance by third parties to
384 If, as a consequence of a court judgment or allegation of patent
385 infringement or for any other reason (not limited to patent issues),
386 conditions are imposed on you (whether by court order, agreement or
387 otherwise) that contradict the conditions of this License, they do not
388 excuse you from the conditions of this License. If you cannot
389 distribute so as to satisfy simultaneously your obligations under this
390 License and any other pertinent obligations, then as a consequence you
391 may not distribute the Program at all. For example, if a patent
392 license would not permit royalty-free redistribution of the Program by
393 all those who receive copies directly or indirectly through you, then
394 the only way you could satisfy both it and this License would be to
395 refrain entirely from distribution of the Program.
397 If any portion of this section is held invalid or unenforceable under
398 any particular circumstance, the balance of the section is intended to
399 apply and the section as a whole is intended to apply in other
402 It is not the purpose of this section to induce you to infringe any
403 patents or other property right claims or to contest validity of any
404 such claims; this section has the sole purpose of protecting the
405 integrity of the free software distribution system, which is
406 implemented by public license practices. Many people have made
407 generous contributions to the wide range of software distributed
408 through that system in reliance on consistent application of that
409 system; it is up to the author/donor to decide if he or she is willing
410 to distribute software through any other system and a licensee cannot
413 This section is intended to make thoroughly clear what is believed to
414 be a consequence of the rest of this License.
417 If the distribution and/or use of the Program is restricted in
418 certain countries either by patents or by copyrighted interfaces, the
419 original copyright holder who places the Program under this License
420 may add an explicit geographical distribution limitation excluding
421 those countries, so that distribution is permitted only in or among
422 countries not thus excluded. In such case, this License incorporates
423 the limitation as if written in the body of this License.
426 The Free Software Foundation may publish revised and/or new versions
427 of the General Public License from time to time. Such new versions will
428 be similar in spirit to the present version, but may differ in detail to
429 address new problems or concerns.
431 Each version is given a distinguishing version number. If the Program
432 specifies a version number of this License which applies to it and ``any
433 later version'', you have the option of following the terms and conditions
434 either of that version or of any later version published by the Free
435 Software Foundation. If the Program does not specify a version number of
436 this License, you may choose any version ever published by the Free Software
440 If you wish to incorporate parts of the Program into other free
441 programs whose distribution conditions are different, write to the author
442 to ask for permission. For software which is copyrighted by the Free
443 Software Foundation, write to the Free Software Foundation; we sometimes
444 make exceptions for this. Our decision will be guided by the two goals
445 of preserving the free status of all derivatives of our free software and
446 of promoting the sharing and reuse of software generally.
457 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
458 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
459 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
460 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
461 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
462 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
463 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
464 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
465 REPAIR OR CORRECTION.
468 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
469 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
470 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
471 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
472 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
473 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
474 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
475 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
476 POSSIBILITY OF SUCH DAMAGES.
480 @heading END OF TERMS AND CONDITIONS
483 @center END OF TERMS AND CONDITIONS
487 @unnumberedsec How to Apply These Terms to Your New Programs
489 If you develop a new program, and you want it to be of the greatest
490 possible use to the public, the best way to achieve this is to make it
491 free software which everyone can redistribute and change under these terms.
493 To do so, attach the following notices to the program. It is safest
494 to attach them to the start of each source file to most effectively
495 convey the exclusion of warranty; and each file should have at least
496 the ``copyright'' line and a pointer to where the full notice is found.
499 @var{one line to give the program's name and a brief idea of what it does.}
500 Copyright (C) 19@var{yy} @var{name of author}
502 This program is free software; you can redistribute it and/or modify
503 it under the terms of the GNU General Public License as published by
504 the Free Software Foundation; either version 2 of the License, or
505 (at your option) any later version.
507 This program is distributed in the hope that it will be useful,
508 but WITHOUT ANY WARRANTY; without even the implied warranty of
509 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
510 GNU General Public License for more details.
512 You should have received a copy of the GNU General Public License
513 along with this program; if not, write to the Free Software
514 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
517 Also add information on how to contact you by electronic and paper mail.
519 If the program is interactive, make it output a short notice like this
520 when it starts in an interactive mode:
523 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
524 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
526 This is free software, and you are welcome to redistribute it
527 under certain conditions; type `show c' for details.
530 The hypothetical commands @samp{show w} and @samp{show c} should show
531 the appropriate parts of the General Public License. Of course, the
532 commands you use may be called something other than @samp{show w} and
533 @samp{show c}; they could even be mouse-clicks or menu items---whatever
536 You should also get your employer (if you work as a programmer) or your
537 school, if any, to sign a ``copyright disclaimer'' for the program, if
538 necessary. Here is a sample; alter the names:
541 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
542 `Gnomovision' (which makes passes at compilers) written by James Hacker.
544 @var{signature of Ty Coon}, 1 April 1989
545 Ty Coon, President of Vice
548 This General Public License does not permit incorporating your program into
549 proprietary programs. If your program is a subroutine library, you may
550 consider it more useful to permit linking proprietary applications with the
551 library. If this is what you want to do, use the GNU Library General
552 Public License instead of this License.
555 @node About shogi, gnushogi, License, Top
556 @chapter About the game of shogi
560 ``Japanese chess cedes nothing in depth or beauty to the European
561 game... it is at least as interesting.''
563 --- Alexander Alekhine @*
564 (quoted in David Pritchard, @cite{The Encyclopedia of Chess Variants})
568 ``... shogi [is] by far the most complex form of chess that has ever
569 achieved widespread popularity.''
571 --- R. Wayne Schmittberger, @cite{New Rules for Classic Games}
576 Shogi is the version of chess played in Japan. It is strikingly
577 different from standard chess (which I shall refer to henceforth as
578 ``international chess'') and also to all other regional variants,
579 because captured pieces can re-enter play on the side of the capturer.
580 This has several interesting effects on the play of the game:
586 Shogi is much more complex than international chess, at least in
587 terms of the average number of possible moves per turn (estimated at
588 about 35 for chess and at about 80 for shogi).
591 There are almost no draws (about 1-2% of all games in professional play).
594 Exchanges complicate the play rather than simplifying it.
597 There are no ``endgames'' in the standard chess sense; all pieces remain
598 in play throughout the game. Games typically end in a race to
599 checkmate the other player before being checkmated oneself.
602 Ownership of a piece is not indicated by the color of the piece;
603 instead, pieces are wedge-shaped and point towards the opponent. The
604 name of the piece is inscribed in Kanji characters on the front of the
608 Most importantly: it's more fun than other forms of chess :-)
614 Shogi is extremely popular in Japan; it has been estimated that 20
615 million Japanese can play shogi, of which perhaps 1 million are active
616 players. It is even more popular there than the game of go, Japan's
617 other favorite board game. There are a number of professional players
618 who make a considerable amount of money playing in shogi tournaments,
619 and the game receives extensive newpaper and television coverage.
620 Despite this, the game has yet to become popular outside of Japan. Part
621 of this is because the Kanji characters on the pieces scare away some
622 people, but mostly it's due, I think, to lack of exposure to the game
623 and to the difficulty of finding opponents. I hope that GNU shogi will
624 help introduce shogi to a wider audience.
628 * The rules of shogi::
632 * Differences between shogi and chess::
637 @c -------------------------------------------------------
639 @c The rules of shogi.
641 @c -------------------------------------------------------
643 @node The rules of shogi, Sample game, About shogi, About shogi
644 @section The rules of shogi
647 Shogi is a two-person abstract strategy board game with full information
648 (i.e. all pieces and moves are visible to both players at all times).
649 It is in the chess family, being descended from the same ancestral game
650 as international chess: the Indian game of Chaturanga. The two players
651 are referred to as ``Black'' and ``White'', with Black moving first
652 (unlike in international chess, where White moves first), and with
653 movement alternating between the two players. Note that ``Black'' and
654 ``White'' are just names; the pieces are not colored. Instead, they are
655 flat, wedge-shaped pieces which point towards the opponent. The
656 identity of a given piece is indicated by two Japanese Kanji characters
657 on each piece. In fact, only the top character is needed to identify
658 the piece and thus only the top character is used in shogi diagrams. I
659 will use alphabetical equivalents in the diagrams here; to see what the
660 Kanji characters look like, start up xshogi (@pxref{xshogi}) and compare
661 the starting setup there with the starting setup in this file
662 (@pxref{The opening setup}).
664 The object of the game is to capture the opponent's King. The board is
665 a grid of 9x9 uncolored squares, and pieces are placed on the squares.
666 Each player begins with 20 pieces, described in the next section.
667 Capture is by displacement, as in international chess.
671 * The moves of the pieces::
672 * The opening setup::
673 * Promotion of pieces::
678 * Notes for chess players::
682 @c The moves of the pieces.
684 @node The moves of the pieces, The opening setup, The rules of shogi, The rules of shogi
685 @subsection The moves of the pieces
688 Each player at the beginning of a shogi game has a total of 20 pieces of
689 eight different types. The moves of the shogi pieces can be divided
690 into three classes: ``stepping'' pieces, that only move one square at a
691 time; ``ranging'' pieces that move any number of unobstructed squares in
692 a line, and ``jumping'' pieces that can jump over obstructing pieces to
693 reach their destination squares. Most pieces can also promote to
694 different (usually stronger) pieces under certain circumstances (see the
695 next section). All pieces capture the same way that they move (even
696 pawns). The piece moves and promotions are as follows; each piece name
697 is followed by the standard piece abbreviation:
702 The king (K). The king can move one square in any horizontal, vertical,
703 or diagonal direction, just like the king in international chess. The
704 king does not promote.
707 The rook (R). The rook can move any number of squares in a horizontal
708 or vertical direction. The rook is the same as the rook in
709 international chess (except that it can promote). A rook promotes to a
710 ``dragon king'' or ``dragon'' for short (often just referred to as a
711 ``promoted rook''), which can move as a rook or can move one square in
712 any diagonal direction.
715 The bishop (B). The bishop can move any number of squares in a diagonal
716 direction. The bishop is the same as the bishop in international chess
717 (except that it can promote). A bishop promotes to a ``dragon horse''
718 or ``horse'' for short (often just referred to as a ``promoted
719 bishop''), which can move as a bishop or can move one square in any
720 horizontal or vertical direction. Note: the horse should not be
721 confused with a knight (see below), as they are two completely different
725 The gold general (G). A gold general can move one square in any
726 horizontal or vertical direction, or one square in a forward diagonal
727 direction. Gold generals do not promote.
730 The silver general (S). A silver general can move one square in any
731 diagonal direction, or one square straight forward. A silver general
732 promotes to a gold general.
735 The knight (N). A knight can move one square straight forward followed
736 by one square to either forward diagonal, jumping over intervening
737 pieces if any. In other words, a knight moves like its international
738 chess counterpart, but forward only. A knight promotes to a gold
739 general. The knight is the only jumping piece, as in chess.
742 The lance (L). A lance can move any number of squares straight forward.
743 A lance promotes to a gold general.
746 The pawn (P). A pawn can move one square straight forward. The pawn
747 captures the same way that it moves, in contrast to international chess.
748 There is also no initial two-space move for pawns and no
749 @emph{en-passant} capture. A pawn promotes to a gold general; a
750 promoted pawn is usually known as a ``Tokin''.
755 @c The opening setup.
757 @node The opening setup, Promotion of pieces, The moves of the pieces, The rules of shogi
758 @subsection The opening setup
759 @cindex Opening setup
761 The opening setup for shogi is as follows:
766 +---------------------------------------------+ @*
767 | wL | wN | wS | wG | wK | wG | wS | wN | wL | a @*
768 +---------------------------------------------+ @*
769 | | wR | | | | | | wB | | b @*
770 +---------------------------------------------+ @*
771 | wP | wP | wP | wP | wP | wP | wP | wP | wP | c @*
772 +---------------------------------------------+ @*
773 | | | | | | | | | | d @*
774 +---------------------------------------------+ @*
775 | | | | | | | | | | e @*
776 +---------------------------------------------+ @*
777 | | | | | | | | | | f @*
778 +---------------------------------------------+ @*
779 | bP | bP | bP | bP | bP | bP | bP | bP | bP | g @*
780 +---------------------------------------------+ @*
781 | | bB | | | | | | bR | | h @*
782 +---------------------------------------------+ @*
783 | bL | bN | bS | bG | bK | bG | bS | bN | bL | i @*
784 +---------------------------------------------+
787 @c The following TeX macros are taken with permission from
788 @c "TeX for the Beginner" by Wynter Snow.
791 \def\startline{\par\nobreak\noindent}
793 {\obeylines\obeyspaces%
794 \gdef\beginVerbatim{\bigbreak%
797 \obeylines\obeyspaces%
800 \gdef\endVerbatim{\endgroup\bigbreak}
805 +--------------------------------------------+
806 | wL | wN | wS | wG | wK | wG | wS | wN | wL | a
807 +--------------------------------------------+
808 | | wR | | | | | | wB | | b
809 +--------------------------------------------+
810 | wP | wP | wP | wP | wP | wP | wP | wP | wP | c
811 +--------------------------------------------+
812 | | | | | | | | | | d
813 +--------------------------------------------+
814 | | | | | | | | | | e
815 +--------------------------------------------+
816 | | | | | | | | | | f
817 +--------------------------------------------+
818 | bP | bP | bP | bP | bP | bP | bP | bP | bP | g
819 +--------------------------------------------+
820 | | bB | | | | | | bR | | h
821 +--------------------------------------------+
822 | bL | bN | bS | bG | bK | bG | bS | bN | bL | i
823 +--------------------------------------------+
830 Here, ``b'' stands for ``black'' and ``w'' stands for ``white'', so
831 that, for instance, ``bL'' means ``black lance''. The numbers above the
832 files and the letters to the right of the ranks represent the most
833 common notation system used for shogi by westerners (the Japanese also
834 use Arabic numerals for the files but use Japanese numerals for the
838 @c Promotion of pieces.
840 @node Promotion of pieces, Drops, The opening setup, The rules of shogi
841 @subsection Promotion of pieces
842 @cindex Piece promotion
844 In sharp contrast to international chess, where only pawns can promote
845 to higher-ranked pieces, most of the pieces in shogi can promote. The
846 promoted ranks are discussed in the section on piece moves (@pxref{The
847 moves of the pieces}) but are repeated here for reference:
852 promotes to gold general (called a `tokin' in this case only).
855 promotes to gold general.
858 promotes to gold general.
861 promotes to gold general.
867 promotes to ``dragon horse'' or just ``horse'' for short. The horse can
868 move as a bishop or can move one square in any orthogonal direction.
871 promotes to ``dragon king'' or just ``dragon'' for short. The dragon
872 can move as a rook or can move one square in any diagonal direction.
881 The three ranks furthest away from each player constitute his/her
882 ``promotion zone''. A player may, but is not required to, promote a
883 piece after making a move in which the piece begins and/or ends in the
884 promotion zone. Thus you can promote a piece when moving the piece into
885 the promotion zone, out of the promotion zone, or entirely within the
886 promotion zone. Promotion is mandatory in these cases:
892 @item You must promote a pawn or a lance after moving it to the last rank.
894 @item You must promote a knight after moving it to either of the last
901 These forced promotions ensure that a piece cannot be moved to a square
902 from which it would have no further move.
904 Pieces ``dropped'' onto the board (@pxref{Drops}) always drop in the
905 unpromoted state, even if they drop into the promotion zone.
911 @node Drops, Winning the game, Promotion of pieces, The rules of shogi
915 When a player captures a piece, that piece is not removed from play.
916 Instead, it becomes the property of the capturer and can re-enter play
917 by being placed on (almost) any vacant square during the player's move.
918 This is known as a ``drop'' and counts as a full move (in other words,
919 you can either move a piece on the board or drop a piece onto the board
920 during your move, but not both). All pieces drop in the unpromoted
921 state. Pieces may be legally dropped in their promotion zone, but they
922 do not promote on that turn.
924 There are several restrictions on drops:
928 @item A pawn may not be dropped onto a file if there is already an
929 unpromoted pawn belonging to the same player on that file. It is legal
930 to drop a pawn on a file which contains a @emph{promoted} pawn belonging
931 to the same player, however.
933 @item A pawn may not be dropped to give immediate checkmate on the
934 move. A pawn is, however, permitted to be moved on the board to give
935 immediate checkmate. This is a curious rule, and if anyone knows the
936 reason for it I would appreciate it if they would contact me and explain
939 @item A pawn or piece may not be dropped onto a square from which they
940 would have no legal move. This means that pawns and lances may not be
941 dropped onto the last rank, and the knight may not be dropped onto the
942 last or second-to-last rank.
946 It is entirely permissible (and often advisable) to drop a piece or pawn
947 between one's King and an attacking ranging piece. For this reason,
948 the final checkmating move is nearly always an attack on the King from
949 an adjacent square (except for an attack by a Knight).
951 Captured pieces are said to be pieces ``in hand''.
953 The drop is the primary distinguishing feature of Japanese chess, shared
954 with no other popular chess-type game. It gives shogi a very aggressive
955 quality, and dramatically increases the number of possible moves once a
956 few pieces have been captured. Another interesting feature of shogi is
957 that exchanges complicate play rather than simplifying it (as in
958 international chess), because of the drop rule.
963 @node Winning the game, Draws, Drops, The rules of shogi
964 @subsection Winning the game
965 @cindex Winning the game
967 A game of shogi is won by capturing the opponent's king. In general,
968 this is done by checkmating the king: attacking the king in such a way
969 that the king cannot be defended no matter what the defending player
970 moves. Note, though, that there is no rule that requires a player to
971 defend a king which is being attacked. However, if he does not defend
972 his king, the opponent is entirely free to capture it on the next move,
973 thus winning the game. As in international chess, in practice most
974 games end by resignation when one player realizes that he cannot escape
980 @node Draws, Handicaps, Winning the game, The rules of shogi
984 There are very few draws in shogi; only about 1-2% of professional games
985 end in a draw. One reason for this is that material can never be
986 depleted as in chess, because captured pieces are constantly re-entering
987 play as a consequence of the drop rule. In fact, most of the ways a
988 game can be drawn in chess are not allowed in shogi:
994 @item Draws cannot be offered.
996 @item There is no fifty-move rule.
998 @item A stalemate counts as a win for the stalemater. Stated otherwise:
999 if you can't move, you lose.
1001 @item Perpetual check is illegal (see below).
1007 There are only two legal ways in which a draw can occur:
1013 @item A position (including the pieces in hand) occurs 4 times with the same
1014 player to move (called ``Sennichite''). However, if this is caused by
1015 consecutive checks (direct attacks on the King, threatening to capture
1016 it on the next move) by one side, the player giving these checks loses
1017 the game. In other words, perpetual check results in a loss for the
1018 attacker who recreates the same position the 4th time.
1020 @item Both players have moved their King into the the promotion zone (or they
1021 cannot be prevented from doing so) and the Kings cannot be checkmated.
1022 A King who has entered the promotion zone is known as an ``entering
1023 King''; due to the forward orientation of most shogi pieces, it is very
1024 hard to mate such a King. In that case the players may decide to count
1025 their pieces as follows: the King does not count, the Rook and Bishop
1026 count as 5 points, and all other pieces as one point. Promotion is
1027 disregarded. If both players have at least 24 points the game is a draw
1028 (called ``Jishogi''). If a player has less, he loses the game.
1030 Of course, a player can refuse to count pieces when he still has mating
1031 chances or chances to gain material which would affect the outcome of
1032 the counting. There is no strict rule about what to do if this is not
1033 the case, but nonetheless a player refuses to count up (e.g. because he
1034 does not have enough points for a draw). It has been generally accepted
1035 that in such a case the game ends and the pieces are counted after one
1036 player has managed to get all his pieces protected in the promotion
1045 @node Handicaps, Notes for chess players, Draws, The rules of shogi
1046 @subsection Handicaps
1049 Unlike international chess, shogi has a well-established handicap system
1050 which is used when players of different strengths play against each
1051 other. Handicaps range from small to huge, which makes it possible for
1052 weak players to play against even very strong players and have an even
1055 Shogi players are ranked as follows: the weakest rank is around 15
1056 ``kyu'', which represents a beginner. 14 kyu is higher than 15 kyu, 13
1057 kyu is higher still, and so on until you get to 1 kyu. The next highest
1058 rank is 1 ``dan'', followed by 2 dan, 3 dan and so forth. The highest
1059 amateur rank is 6 dan; professionals go up to 9 dan. However,
1060 professional ranks are not the same as amateur ranks; a professional 1
1061 dan is @emph{much} stronger than an amateur 1 dan. This system is
1062 similar to that used by go players (and also other Japanese sports such
1065 A handicap consists of the stronger player playing White and removing
1066 one or more pieces from his side of the board at the start of the game.
1067 These pieces are permanently removed from play; they are not in hand.
1069 The following is a list of the accepted handicaps, from weakest to
1070 strongest. The degree of the handicap, represented by the position in
1071 the list, represents the difference in rank between the two players for
1072 which the handicap is appropriate. These rules are taken from the books
1073 ``Shogi for Beginners'' by John Fairbairn and ``The Art of Shogi'' by
1074 Tony Hoskings (@pxref{References and links}) and, I believe, represent
1075 current Japanese practice.
1082 The stronger player removes his left lance (on 1a).
1085 The players play a two-game match; in the first game the stronger player
1086 removes his left lance (on 1a), while in the second game he removes his
1090 The stronger player removes his bishop.
1093 The stronger player removes his rook.
1096 The stronger player removes his rook and left lance.
1099 The players play a two-game match; in the first game the stronger player
1100 removes his rook and left lance (on 1a), while in the second game he
1101 removes his rook and bishop.
1104 The stronger player removes his rook and bishop. This is usually called
1105 a ``two-piece'' handicap.
1108 The stronger player removes his rook, bishop, and both lances. This is
1109 called a ``four-piece'' handicap.
1112 The stronger player removes his rook, bishop, both lances, and both
1113 knights. This is called a ``six-piece'' handicap.
1116 The stronger player removes his rook, bishop, both lances, both knights,
1117 and both silvers. This is called an ``eight-piece'' handicap.
1123 Another advantage of playing handicap games is that the handicaps alter
1124 the optimal strategy for both players. For instance, handicaps all have
1125 their own opening lines which may bear little or no resemblance to those
1126 used in non-handicap shogi. This means that when learning handicap
1127 shogi, you are essentially learning completely new games which use the
1130 The reader may wonder how on earth a player giving an eight-piece
1131 handicap, say, could possibly hope to win. Don't forget, though, that
1132 in shogi the opponent's pieces can be captured and then become part of
1133 one's own army. Thus, if the opponent plays badly enough, the number of
1134 pieces will soon even out.
1137 @c Notes for chess players.
1139 @node Notes for chess players, , Handicaps, The rules of shogi
1140 @subsection Notes for chess players
1142 Here are a few miscellaneous things that may confuse chess players.
1143 Some of these have been mentioned elsewhere, but they bear repeating.
1148 @item There is no queen.
1150 @item Pawns capture the same way they move. There is no initial
1151 two-space pawn move and no @emph{en-passant} move.
1153 @item There is no special castling move. There @emph{are} a large
1154 number of possible defensive formations referred to as ``castles''
1155 (@pxref{Sample game}) but there is no need for special moves to create
1158 @item A given piece can only promote to @emph{one} other kind of piece.
1168 @node Sample game, Mating problems, The rules of shogi, About shogi
1169 @section Sample game
1172 @c This will have to be spruced up for the TeX version...
1174 This game was annotated by Pieter Stouten (@pxref{References and
1175 links}). I have made some minor corrections. Note that captures are
1176 denoted by the ``x'' symbol e.g. Rx3f and drops are denoted by the ``*''
1177 symbol e.g. R*3f. Check is indicated by a ``+'' after the move,
1178 e.g. R3f+. I recommend you use gnushogi/xshogi to play along with this
1179 game. In xshogi simply hit the ``Force Moves'' button after starting
1180 up, while in gnushogi enter the word ``force'' at the prompt. This will
1181 allow you to enter moves for both sides.
1183 Note also that the move numbering system used here is the chess-type
1184 system where one move means one move by each player. The Japanese count
1185 one move made by each player as two moves.
1187 ---------------------------------------------------------------------------
1189 Below you will find (the English translation of) an annotated game which
1190 was published in the Dutch Shogi magazine ``81'' and in the Dutch
1191 beginners booklet. It has proven to be a very useful game to explain
1192 some basic principles of Shogi. Also, it is a rather straightforward
1193 game compared to professional games where in most cases very diffuse
1194 middle game fights take place.
1196 Pieter Stouten, 14th May 1990.
1198 ---------------------------------------------------------------------------
1200 Black: Michael Trent (1-dan). White: David Murphy (2-dan).
1202 1. P2f P3d 2. P2e B3c @*
1203 [ This move is necessary, as otherwise white can exchange pawns: 3. P2d
1204 Px2d 4. Rx2d. He would thus get a pawn in hand and open up his rook
1208 [ White closes the bishop diagonal again. He plans to play ranging rook
1209 (the rook goes to 5b, 4b, 3 or 2b; a defensive strategy) and in that
1210 case he'd better avoid an exchange of bishops. One of the reasons is
1211 that he will have problems developing his pieces without leaving holes
1214 4. S4h R3b 5. P3f S4b 6. K6h K6b @*
1215 [ In general the rook plays an important role in the attacks. It is
1216 wise to move the king away from the area where the initial fights will
1217 be and both players act according to the Shogi proverb ``keep the rook
1220 7. K7h K7b 8. P5f P5d 9. G4i-5h G4a-5b @*
1221 [ Both players use their second gold general to build their castle. ]
1224 [ In itself this move is not bad. However, it will become clear that
1225 black plans a quick attack and in that case it is wiser to omit this
1228 10... S5c 11. P1f P1d @*
1229 [ The advance of the edge pawns must be timed very well. The remark at
1230 black's tenth move applies here too: this move is good if black wants to
1231 play a slow game, because it eliminates a future B1e. ]
1233 12. P4f K8b 13. N3g S7b @*
1234 [ Black develops his knight in order to start an attack over the second,
1235 third and fourth files. White strengthens his king's position and
1236 awaits the attack. He aims at a counterattack as soon as black has
1237 broken through into the white camp. Probably white's breakthrough will
1238 take place later, but he has good compensation in the form of a stronger
1239 castle. This theme occurs very often in static rook versus ranging rook
1243 [ Black starts his attack and white puts up a very passive defence. His
1244 rook has a hard task now to penetrate the black position. Moreover, he
1245 blocks his own bishop. It seems much better to start a counterattack
1246 with 14... P3e, later to be followed by B2b, B5a or Bx4d in order to use
1247 his rook more actively. ]
1249 15. Px4d Sx4d 16. P*4e S5c @*
1250 [ 16... Sx4e is more active. A silver general is normally more valuable
1251 than a knight, but white gets two pawns in hand and black none, while
1252 the knight might come in handy for white too. ]
1254 17. Bx3c+ Nx3c 18. P2d Px2d @*
1255 [ Black threatens to break through and white has to consider taking the
1256 pawn on 2d or starting a counterattack with Nx4e. If he chooses the
1257 latter, black can play Px2c+ followed by +P3c. The disadvantage is the
1258 black ``tokin'' (=promoted pawn) that white will get in his camp; the
1259 advantage is that it will cost black two more moves to promote his rook.
1260 Because white did not trust that the result after engaging in a
1261 ``semeai'' (=mutual attack) with 18...Nx4e would give a positive result,
1262 he captured the pawn on 2d. Making the right decision in moments like
1263 this often makes the difference between a win and a loss: miss one
1264 attacking chance and you will be forced to defend the whole game until
1265 the unavoidable defeat; on the other hand, an unsound attack can destroy
1266 all ``aji'' (=potential, meaning possibilities, threats) without getting
1267 anything in return. ]
1269 19. Rx2d Nx4e 20. Nx4e Rx4e 21. R2a+ P*4g @*
1270 [ Now it becomes clear why black's 10. S6h was not good. Had this move
1271 been omitted, then white would not have had the time to play 13... S7b
1272 and after R2a+ the gold on 6a would hang. Thus black would have kept
1273 ``sente'' (=initiative). Instead of 21... P*4g, B*6d is a very good
1274 move, because after 22. P*2h black does not have a pawn in hand anymore
1275 and he is being threatened with the annoying 22... N*4f 23. G5g N3h+
1276 24. S4g +N4h also. Black can also counter 21... B*6d with 22. N*3g.
1277 White would then reply with 22... R4b 23. B*3c P*4g 24. Bx4b+ Sx4b. The
1278 white rook has played its role and instead of spending moves on saving
1279 it white starts to scatter black's defences by successive pawn drops on
1280 the fourth file: 25. Gx4g P*4f 26. G5g N*6e 27. G5h P4g+ 28. Gx4g P*4f.
1281 This analysis was provided by Kato Hifumi, 9-dan professional (the
1282 highest regular grade). Destroying the coherence of the enemy pieces
1283 (their shape) by dropping pawns is one of the most important Shogi
1284 techniques. With the actual move 21... P*4g white missed a good
1287 22. Sx4g P*4f 23. B*3g Px4g+ 24. +Rx6a +Px3g @*
1288 [ 23. B*3g seems pointless, but a closer look reveals that it is
1289 actually quite mean. On move 24 white cannot capture black's ``Ryu''
1290 (=dragon =promoted rook) with his silver: 24... Sx6a 25. N*7d K7b
1291 26. G*8b mate. By attacking the front of the white castle and
1292 threatening to mate him there, black has the chance to break down the
1293 white defences from the side. ]
1296 [ Here 25... B*4d would be much better, because it is defensive and
1297 attacking at the same time. After e.g. 26. G*4c Bx9i+ 27. Gx5c black
1298 threatens 28. +Rx7b Kx7b 29. S*6a K8b 30. S*7a Kx7a 31. G*7b mate.
1299 White is one move quicker, however. He has the following beautiful
1300 ``tsume'' (mating sequence where every move is check): 27... N*8f 28. Px8f
1301 S*8g 29. Kx8g B*9h 30. K7h Bx8i+ 31. K8g +B8i-8h 32. K9f L*9e mate.
1302 This illustrates the sharpness of Shogi: one move can make the
1303 difference between winning and losing. ]
1306 [ This move eliminates white's last chances. 26... R4b 27. +Rx4b Sx4b
1307 28. R*4a seems annoying, but after 28... B*3c 29. S7g B*3b white wins
1308 the rook and with his ``tokin'' on 3g there still is some hope. ]
1311 [ White cannot defend anymore, so he starts a desperate attack. Black
1312 does not lose the right track, however. ]
1314 28. Nx5c+ +Px5h 29. +Nx6b +Px6h 30. Gx6h N*8f 31. Px8f B*6i 32. Gx6i
1315 R4h+ 33. N*6h +Rx6h 34. Gx6h S*8g 35. Kx8g N*9e 36. K7h Resigns @*
1316 [ White resigns here, because after 36... B*8g 27. K7g his attack has
1326 @node Mating problems, Shogi variants, Sample game, About shogi
1327 @section Mating problems
1329 One good way to improve at shogi is to solve mating problems. There are
1330 several types of these problems, but the most common is called a
1331 ``tsume-shogi'' problem, or ``tsume'' problem for short. In a tsume
1332 problem, all pieces that are not on the board are assumed to be in the
1333 opponent's hand (except for your King, which is usually not shown).
1334 Every move you make must be check until the final checkmate. Your
1335 opponent may play any piece on the board or drop any of his pieces in
1336 hand in order to prevent the mate. In a properly constructed tsume
1337 problem, all of your pieces on the board and in hand must be essential
1338 to the solution. One consequence of this is that all of your pieces in
1339 hand must be played during the solution. There should only be one
1340 correct solution for the given number of moves. Tsume problems use
1341 Japanese-style move numbering; thus, a problem where you move (and give
1342 check), your opponent moves, and you move to give checkmate is called a
1343 three-mover. Here is a really trivial three-mover:
1350 ----------------+ @*
1352 ----------------+ @*
1354 ----------------+ @*
1356 ----------------+ @*
1358 ----------------+ @*
1360 ----------------+ @*
1362 ----------------+ @*
1372 \def\startline{\par\nobreak\noindent}
1374 {\obeylines\obeyspaces%
1375 \gdef\beginVerbatim{\bigbreak%
1378 \obeylines\obeyspaces%
1381 \gdef\endVerbatim{\endgroup\bigbreak}
1406 Here, Black plays G*2b, White plays K1c, and Black plays S*1d mate.
1407 More typical tsume problems range from 5 moves to arbitrarily high
1408 numbers of moves, and they can be quite brain-busting. Tsume problems
1409 may seem artificial, but in the closing stages of the game where both
1410 players have a lot of pieces in hand, it is often necessary to give
1411 check at every move, or else your opponent will start a counterattack
1412 and will mate you before you mate him. A tsume problem is a worst-case
1413 scenario for the attacker: you have to mate your opponent even though he
1414 has every piece not on the board in hand, which means you have to
1415 develop sharp attacking skills. Many more tsume problems can be found
1416 on the internet; I particularly recommend Patrick Davin's ``Shogi
1417 Nexus'' (@pxref{References and links}).
1425 @node Shogi variants, Differences between shogi and chess, Mating problems, About shogi
1426 @section Shogi variants
1427 @cindex Shogi variants
1433 @cindex Tenjiku Shogi
1434 @cindex Dai-dai Shogi
1435 @cindex Maka-dai-dai Shogi
1437 @cindex Kyoku Tai Shogi
1439 Several historical variants of shogi exist. Most of these were invented
1440 before modern shogi (in some cases hundreds of years before), are much
1441 larger than modern shogi and are not played with drops. Thus, in many
1442 ways they are really more like giant chess games than like modern shogi.
1443 The only one of these games to have survived in Japan is Chu (middle)
1444 shogi, which is still played a little bit. Thanks to the efforts of
1445 George Hodges and John Fairbairn of the Shogi Association (two British
1446 shogi enthusiasts), these games were resurrected and rules and sets for
1447 them can still be purchased from George Hodges (@pxref{References and
1448 links}). I hope to eventually extend GNU shogi so that it can play at
1449 least some of these games. There are also several non-historical
1450 variants of shogi; I don't know much about them but you can find
1451 information about them on the internet (@pxref{References and links}).
1453 The historical variants include:
1460 Tori (bird) shogi, played on a 7x7 board with 32 pieces in all; this is
1461 the only variant that is known to have been played with drops.
1464 Wa shogi, played on an 11x11 board with 54 pieces. This game can be
1465 played with or without drops but the historical evidence favors the view
1466 that it was played without drops. However, most people who have tried
1467 it claim it is a much better game with drops, being even more intricate
1468 than standard shogi.
1471 Chu (middle) shogi, played on a 12x12 board with 92 pieces. This was
1472 (and is) by far the most popular of the variants, and has 21 different
1473 kinds of pieces in the starting line-up alone (along with several others
1474 that appear upon promotion). Unlike modern shogi, there are a
1475 tremendous number of ranging pieces and the game is definitely not
1476 played with drops. There is also an amazing piece called the Lion which
1477 has a double king move and can capture two pieces at once! Chu shogi
1478 has a small but fanatical following, some of whom consider it better
1482 Dai (great) shogi, played on a 15x15 board with 130 pieces. Other than
1483 the larger board, this game is very similar to Chu shogi.
1486 Tenjiku (exotic) shogi, played on a 16x16 board with 176 pieces. This
1487 game is possibly the most complex tactical game in existence. There are
1488 many astoundingly powerful pieces, including one (the Fire Demon) that
1489 can capture up to eight opposing pieces in a single move! Despite the
1490 size of the game, checkmates can occur very suddenly (and often very
1491 early on) if one player makes a wrong move. Tenjiku also has a small
1492 but fanatical following, one of whom (Colin Adams) has written a book on
1493 the game which is available for download at
1494 @uref{http://www.colina.demon.co.uk/tenjiku.html}.
1497 Dai-dai (great-great) shogi, played on a 17x17 board with 192 pieces.
1498 The opening setup alone has 64 different kinds of pieces! This game and
1499 the larger ones that follow sound pretty outlandish, but they have
1500 actually been played; a game of Dai-dai can supposedly be played in
1504 Maka-dai-dai (great-great-great) shogi, played on a 19x19 board with 192
1505 pieces. For those for whom Dai-dai shogi is just too small :-)
1508 Tai (grand) shogi, played on a 25x25 board with 377 pieces! Until
1509 recently, this was thought to be the biggest chess game ever devised,
1513 Kyoku tai (extremely grand?) shogi, played on a 36x36 board with 402
1514 pieces. The rules for this have just been unearthed in an old Japanese
1515 book. Hopefully someone will soon organize a postal Kyoku tai shogi
1516 championship; maybe their distant ancestors could finish it :-)
1518 It is thought that the really huge games (Dai-dai and up) were never
1519 really played to any significant extent (gee, wonder why?) and were
1520 devised merely so that the creators could have the fun of inventing
1521 enormous games, amazing their friends and confounding their enemies.
1522 However, the games up to Tenjiku shogi at least appear to be quite
1523 playable, assuming one has the time.
1530 @c Differences between shogi and chess.
1533 @node Differences between shogi and chess, , Shogi variants, About shogi
1534 @section Differences between shogi and chess
1535 @cindex Shogi vs. Chess
1537 Some differences between shogi and international chess have been
1538 mentioned elsewhere in this document; I summarize them here for people
1539 who are interested in game comparisons. I won't try to deal with the
1540 thorny question of which game is ``better'' although my bias may have
1541 already come through :-) In fact, the drop rule makes the two games so
1542 different in character that arguing over which game is better is like
1543 comparing apples to oranges (you'd be better off comparing chess to Chu
1544 shogi (@pxref{Shogi variants}). However, I believe that if you are a
1545 chess fan you'll really like shogi as well, and shogi is also popular
1546 with many people who don't particularly like chess.
1548 Here are the significant differences between chess and shogi:
1555 In shogi, captured pieces become the property of the capturer and can
1556 re-enter play by being dropped onto almost any vacant square. In chess,
1557 captured pieces are out of the game. Thus, in shogi, piece exchanges
1558 complicate the play significantly while in chess they simplify it.
1561 The shogi board is 9x9; the chess board is 8x8.
1564 Shogi has five pieces with no counterpart in chess: the gold and silver
1565 generals, the lance, the promoted rook and the promoted bishop. Chess
1566 has one piece with no counterpart in shogi: the queen. The knight's
1567 move in shogi is much more restrictive than in chess. Pieces in shogi
1568 generally have a much smaller range of movement than in chess (unless
1572 In shogi, all pieces except the gold general and the king can promote,
1573 but only to one kind of piece. Promotion is easier in shogi because the
1574 promotion zone is closer to the starting position of the pieces
1575 (especially pawns). In chess, only the pawn can promote, but it can
1576 promote to any other piece except the king.
1579 In shogi, pawns capture the same way they move. There is no initial
1580 two-space pawn move and hence no @emph{en-passant} captures. In chess,
1581 pawns capture diagonally which means that opposing pawns can block each
1585 In shogi, you only have one rook and one bishop. Note that the bishop
1586 is not restricted to only one ``color'' square (squares in shogi aren't
1587 colored, but never mind) because promoted bishops can also move one
1588 square orthogonally.
1591 There is no special castling move in shogi. The term ``castle'' is
1592 used in shogi to denote a defensive formation consisting of (usually)
1593 three generals which protect the king. There are many such castles
1594 (about 40 or so have names). @xref{Sample game}.
1597 Draws are much rarer in shogi than in chess. Perpetual check is not
1598 allowed. Stalemate is a virtual impossibility, and is a loss for the
1602 Since pieces are never out of play in shogi, chess-type endgames
1603 involving only a few pieces do not occur.
1606 Shogi games are generally longer than chess games (about 60-70 moves is
1610 Shogi has a well-developed handicap system which is in general use;
1617 The effects of all these differences on play include (in my opinion):
1624 Piece/pawn structures in chess are more rigid than in shogi. Pawns
1625 block each other and pawns, once advanced, cannot ever retreat. In
1626 shogi, you can repair the hole caused by a pawn advance by exchanging
1627 the pawn and dropping it back where you want it. Thus shogi is more
1628 fluid than chess and less ``structural''.
1631 Counterattack is MUCH more common in shogi than in chess. Games
1632 typically end in mutual mating attacks, where each player is trying to
1633 checkmate the other player before being checkmated himself. This makes
1634 tempo incredibly important and also makes sacrificial play quite common.
1637 Attacks involving only ranging pieces are more a feature of chess than
1638 of shogi. A shogi attack typically uses a ranging piece or pieces to
1639 support an attack by short-range pieces (especially generals). It is
1640 very rare to mate a king with a non-adjacent ranging piece in shogi
1641 since the player whose king is threatened can almost always interpose by
1649 @c --------------------
1651 @c --------------------
1653 @node gnushogi, xshogi, About shogi, Top
1657 This section describes how to run the ``gnushogi'' program.
1665 gnushogi [ [[-]a] [-b bookfile] [-B binbookfile] [-C] [-h langfile]
1666 [-L langfile] [-r length] [-R] [-s pathname] [-l pathname] [-S binbooksize]
1667 [-t] [-c size] [-T size] [-v] [-x] [-X] arg1 arg2 ]
1675 GNU shogi (gnushogi) plays a game of japanese chess (shogi) against the
1676 user or it plays against itself.
1678 At startup gnushogi reads the binbook file if it is present. It then
1679 looks for a book file. If it is present it adds its contents to the
1680 binbook data. If the binbook file is writable a new combined binbook
1683 Gnushogi is a modified version of the gnuchess program. It has a simple
1684 alphanumeric board display, or it can be used with the xshogi program
1685 under X windows. The program gets its opening moves from the file
1686 gnushogi.bbk which is located in a directory specified in the Makefile.
1687 To invoke the program type:
1694 simple curses based version
1696 @item gnushogi -X (or just gnushogi)
1697 xshogi compatible version
1700 raw test display version
1709 If one argument is given, it is the search time per move in
1710 [minutes:]seconds. So gnushogi 30 will generate one move every 30
1711 seconds, while gnushogi 5:00 will generate one move every 5 minutes.
1713 If two or more arguments are given, they will be used to set tournament
1714 time controls with the first argument of each pair being the number of
1715 moves and the second being the total clock time in minutes[:seconds].
1716 Thus, entering gnushogi 60 5 will set the clocks for 5 minutes (300
1717 seconds) for the first 60 moves, and gnushogi 30 3:30 will allow 3
1718 minutes and 30 seconds for 30 moves.
1720 gnushogi 30 5 1 :30 will allow 5 minutes for the first 30 moves and 30
1721 seconds for each move after that. Up to 4 pairs of controls may be
1724 If no argument is given the program will prompt the user for level of
1727 For use with xshogi see the documentation on that program.
1738 The book gnushogi.tbk consists of a sequence of openings. An opening
1739 begins with a line starting with a # (the rest of the line is a
1740 comment). Following this is a series of moves in algebraic notation
1741 alternating black and white separated by white space. A move may have a
1742 ? after it indicating this move should never be made in this position.
1743 Moves are stored as position:move so transpositions between openings can
1752 The hashfile if created should be on the order of 4 megabytes; you can
1753 create such a hashfile by typing ``gnushogi -c 22'' (see below). This
1754 file contains positions and moves learned from previous games. If a
1755 hashfile is used the computer makes use of the experience it gained in
1756 past games. Tests run so far show that it plays no worse with the
1757 hashfile than without, but it is not clear yet whether it provides a
1766 Note: Piece letters are determined by the language file. What is
1767 specified here is the default (English).
1769 Once gnushogi is invoked, the program will display the board and prompt
1770 the user for a move. To enter a move, use the notation 7g7f where the
1771 first letter-number pair indicates the origin square and the second
1772 letter-number pair indicates the destination square. An alternative is
1773 to use the notation P7f where the first letter indicates the piece type
1774 (P,L,N,S,G,B,R,K). To promote append a + the type of the new piece to
1775 the move, as in 2d2c+ or P2c+. Note that you must use capital letters
1776 for the pieces by default.
1780 COMMAND-LINE OPTIONS
1787 Do not search on opponent's time.
1790 Do search on opponent's time.
1792 @item -b @var{bookfile}
1793 Use bookfile for opening book.
1795 @item -B @var{binbookfile}
1796 Use binbookfile for binary opening book.
1799 Create a new HASHFILE. File size is 2^size entries of approximately 65+?
1803 Use curses-based display mode.
1806 Do not use hashfile.
1811 @item -l @var{pathname}
1812 Pathname of the loadfile used with get or xget.
1815 Use language lang from the file gnushogi.lang. If -L is not specified
1816 it uses the first language in the file.
1818 @item -P @var{plylevels}
1819 Number of plys to include in the binbookfile. For generating a
1822 @item -r @var{length}
1823 Rehash @emph{length} times in searching entries for position in
1824 transposition table.
1827 Use raw text display mode. This can be used for dumb terminals or for
1828 systems that don't have curses.
1830 @item -s @var{pathname}
1831 Pathname of the save file to use with the save command.
1834 Size of binbookfile for memory based books. For creating a binbookfile.
1837 Show statistics for HASHFILE.
1840 Set the transposition table size to 2^size entries.
1843 Show version and patchlevel.
1845 @item -x @var{value}
1846 Use value as the evaluation window xwndw.
1849 Use xshogi display mode (the default).
1859 In addition to legal moves, the following commands can be entered at the
1860 gnushogi prompt. Note: command names are determined by the language
1861 file and may vary with the implementation. The default language is
1867 allow algebraic input (not implemented).
1870 change Alpha window (default score + 90).
1873 change Beta window (default score - 90).
1876 toggles beeping after each move (default: on).
1879 updates the current board position on the display.
1882 turns off use of the opening library.
1885 causes the computer to play both sides of a shogi game.
1888 causes the computer to take the white pieces, if the computer is to move
1892 saves a game to disk as a book textfile. The program will prompt the
1893 user for a file name.
1896 toggles game mode time control. Assumes the time specified for time
1897 control is the time for a complete game. Input with the level command
1898 should be the game time and the expected number of moves in a game. go
1899 command must be given.
1902 show coordinates on the display (visual only).
1905 allows the value of @emph{contempt} to be modified.
1908 asks for a piece as color piece, as wb or bn, and shows its calculated
1909 value on each square.
1912 sets level of debugging output if compiled with debug options.
1915 allows the user to change the search depth of the program. The maximum
1916 depth is 29 ply. Normally the depth is set to 29 and the computer
1917 terminates its search based on elapsed time rather than depth. If depth
1918 is set to (say) 4 ply, the program will search until all moves have been
1919 examined to a depth of 4 ply (with extensions up to 11 additional ply
1920 for sequences of checks and captures). If you set a maximum time per
1921 move and also use the depth command, the search will stop at the
1922 specified time or the specified depth, whichever comes first.
1925 toggles easy mode (thinking on opponents time) on and off. The default
1926 is easy mode ON. If easy mode is disabled, the keyboard is polled for
1927 input every so often and when input is seen the search is terminated. It
1928 may also be terminated with a sigint.
1931 allows the user to set up a board position.
1941 command will exit setup mode.
1947 place a promoted pawn on 3b
1950 place a pawn in hand (among the captured pieces)
1954 Pieces are entered by typing a letter (p,l,n,s,g,b,r,k) for
1955 the piece followed by the coordinate. Here, letter case is ignored.
1957 The usual warning about the language file applies.
1963 tells the computer to move first. Computer begins searching for a move.
1967 allows the user to enter moves for both sides. To get the program to
1968 play after a sequence of moves has been entered use the ``black'' or
1972 retrieves a game from disk. The program will prompt the user for a file
1976 tells the computer to move first. Computer begins searching for a move.
1977 (same as ``first'').
1980 use/don't use hashfile.
1983 allows the user to change the minimum depth for using the hashfile and
1984 the number of moves from the beginning of the game to use it.
1987 displays a short description of the commands and the current status of
1991 causes the program to supply the user with its predicted move.
1994 allows the user to set time controls such as 60 moves in 5 minutes etc.
1995 In tournament mode, the program will vary the time it takes for each
1996 move depending on the situation. If easy mode is disabled (using the
1997 ``easy'' command), the program will often respond with its move
1998 immediately, saving time on its clock for use later on.
2001 writes the game moves and some statistics on search depth, nodes, and
2002 time to the file ``shogi.lst''.
2005 toggle material flag - draws on no pawns and both sides < rook.
2011 evaluates the board and shows the point score for each piece. The total
2012 score for a position is the sum of these individual piece scores.
2015 causes the program to display the principal variation and the score
2016 during the search. A score of 100 is equivalent to a 1 pawn advantage
2023 causes the program to randomize its move selection slightly.
2029 backout the last level for both sides. Equal to 2 undo's.
2032 causes the board display to be reversed. That is, the black pieces will
2033 now appear at the top of the board.
2036 reverse board display.
2039 saves a game to disk. The program will prompt the user for a file name.
2042 causes the program to switch places with the opponent and begin
2046 performs some speed tests for MoveList and CaptureList generation, and
2047 ScorePosition position scoring for the current board.
2050 set computer's time remaining, intended for synchronizing clocks among
2054 toggle tsume mode. In tsume mode, not all possible moves will be
2055 generated. If a king is in check, only moves that get the king out of
2056 check are generated. If the king is not in check, only moves that give
2057 check to the opponent's king are generated.
2060 undoes the last move whether it was the computer's or the human's. You
2061 may also type ``remove''. This is equivalent to two ``undo'''s
2062 (e.g. retract one move for each side).
2065 causes the computer to take the black pieces, if the computer is to move
2066 first the go command must be given.
2069 read an xshogi position file.
2072 save as an xshogi position file.
2075 change X window. The window around alpha/beta used to determine whether
2076 the position should be scored or just estimated. Note: this has
2077 @emph{nothing} to do with xshogi or X windows; the terms are completely
2085 @c --------------------
2087 @c --------------------
2089 @node xshogi, References and links, gnushogi, Top
2093 This section describes how to run the ``xshogi'' program.
2109 xshogi provides an X11/Xt/Athena Widgets user interface for gnushogi.
2110 With xshogi you can play gnushogi, set up arbitrary positions, force
2111 variations, or watch xshogi manage a game between two shogi programs.
2112 Furthermore, it can be used as an interface between two players on
2115 xshogi can also be used as a shogi board to play out games. It will
2116 read through a game file or allow a player to play through a variation
2117 manually (force mode). This is useful for keeping track of email postal
2118 games or browsing games off the net.
2120 After starting xshogi, you can make moves by pressing mouse button 1
2121 while the cursor is over a square with your piece on it and dragging the
2122 mouse to another square. If the move is illegal, gnushogi will not
2123 allow it. xshogi will then retract the move.
2127 COMMAND-LINE OPTIONS
2131 The following command line options also correspond to X resources that
2132 you can set in your .Xdefaults file.
2138 @item [standard Xt options]
2139 xshogi accepts standard Xt options like -display, -geometry, and
2142 @item -tc or -timeControl minutes[:seconds]
2143 Amount of time for a set of moves determined by movesPerSession. If
2144 this number of moves is played within the time control period, xshogi
2145 resets the time clocks. Default: 5 minutes.
2147 @item -mps or -movesPerSession moves
2148 Number of moves in a time control period. Default: 40 moves.
2150 @item -st or -searchTime minutes[:seconds]
2151 Tell gnushogi to spend at most the given amount of time searching for
2152 each of its moves. Without this option, gnushogi chooses its search
2153 time based on the number of moves and amount of time remaining until the
2154 next time control. Setting this option also sets -clockMode to False.
2156 @item -sd or -searchDepth number
2157 Tell gnushogi to look ahead at most the given number of moves when
2158 searching for a move to make. Without this option, gnushogi chooses
2159 its search depth based on the number of moves and amount of time
2160 remaining until the next time control. Setting this option also sets
2161 -clockMode to False.
2163 @item -clock or -clockMode (True | False)
2164 Determines whether or not to use the clock. If clockMode is False, the
2165 clock does not run, but the side that is to play next is still
2168 @item -td or -timeDelay seconds
2169 Time delay between moves during ``Load Game''. This doesn't have to be
2170 a round number. Try -td 0.4. Default: 1 second.
2172 @item -nsp or -noShogiProgram (True | False)
2173 If this option is True, xshogi acts as a passive shogi board; it does
2174 not try to start a shogi program, not even to check whether moves made
2175 in Force mode are legal. It also sets -clockMode to False. Default:
2178 @item -fsp or -firstShogiProgram program
2179 Name of first shogi program. In matches between two machines, this
2180 program plays white. Default: ``gnushogi''.
2182 @item -ssp or -secondShogiProgram program
2183 Name of second shogi program, if needed. In matches between two
2184 machines, this program plays black; otherwise it is not started.
2185 Default: ``gnushogi''.
2187 @item -fh or -firstHost host
2188 Name of host the first shogi program plays on. Default: ``localhost''.
2190 @item -sh or -secondHost host
2191 Name of host the second shogi program plays on. Default: ``localhost''.
2193 @item -rsh or -remoteShell shell_name
2194 Some systems do not use rsh as the remote shell. This option allows a
2195 user to name the remote shell command. This should be done in the
2198 @item -mm or -matchMode (False | Init | Position | Opening)
2199 Automatically run a game between firstShogiProgram and
2200 secondShogiProgram. If matchMode is set to Init, xshogi will start the
2201 game with the initial shogi position. If matchMode is set to Position,
2202 xshogi will start the game with the position specified by the
2203 loadPositionFile resource. If matchMode is set to Opening, xshogi will
2204 play out the opening moves specified by the -loadGameFile resource. If
2205 the -saveGameFile resource is set, a move record for the match will be
2206 saved in the specified file. Default: ``False''.
2208 @item -lgf or -loadGameFile file
2209 Name of file to read a game record from. Game files are found in the
2210 directory named by the SHOGIDIR environment variable. If this variable
2211 is not set, the current directory is used unless the file name starts
2214 @item -lpf or -loadPositionFile file
2215 Name of file to read a game position from. Position files are found in
2216 the directory named by the SHOGIDIR environment variable. If this
2217 variable is not set, the current directory is used unless the file name
2220 @item -sgf or -saveGameFile file
2221 Name of file to save a game record to. Game files are saved in the
2222 directory named by the SHOGIDIR environment variable. If this variable
2223 is not set, the current directory is used unless the file name starts
2226 @item -spf or -savePositionFile file
2227 Name of file to save a game position to. Position files are saved in
2228 the directory named by the SHOGIDIR environment variable. If this
2229 variable is not set, the current directory is used unless the file name
2232 @item -coords or -showCoords (True | False)
2233 If this option is True, xshogi displays algebraic coordinates along the
2234 board's left and bottom edges. The default is False. The coordFont
2235 resource specifies what font to use.
2237 @item -mono or -monoMode (True | False)
2238 Determines whether xshogi displays its pieces and squares with two
2239 colors or four. You shouldn't have to specify monochrome. xshogi will
2240 determine if this is necessary.
2242 @item -wpc or -blackPieceColor color
2243 Color specification for black pieces suitable for XParseColor(3X11).
2244 Default: #FFFFCC. These colors look good on a DEC workstation. If you
2245 need different colors, try using the xcolors application. Source for
2246 xcolors can be found in the X11 contrib directory.
2248 @item -bpc or -whitePieceColor color
2249 Same for white pieces. Default: #202020.
2251 @item -lsc or -lightSquareColor color
2252 Same for light squares. Default: #C8C365.
2254 @item -dsc or -darkSquareColor color
2255 Same for dark squares. Default: #77A26D.
2257 @item -wps or -westernPieceSet (True | False)
2258 Choose the Western style piece set.
2260 @item -npb or -normalPawnBitmap file
2261 @item -nnb or -normalKnightBitmap file
2262 @item -nbb or -normalBishopBitmap file
2263 @item -nrb or -normalRookBitmap file
2264 @item -nkb or -normalKingBitmap file
2265 Names of the bitmap files for the bitmap piece icons.
2267 @item -rpb or -reversePawnBitmap file
2268 @item -rnb or -reverseKnightBitmap file
2269 @item -rbb or -reverseBishopBitmap file
2270 @item -rrb or -reverseRookBitmap file
2271 @item -rkb or -reverseKingBitmap file
2272 Names of the bitmap files for the outline piece icons.
2274 @item -debug or -debugMode (True | False)
2275 Turns on debugging printout.
2290 The actual string that is sent to initialize the shogi program can be
2291 set from .Xdefaults. It can't be set from the command line because of
2292 syntax problems. The default value is ``new\nbeep\nrandom\neasy\n''.
2293 The ``new'' and ``beep'' commands are required. You can remove the
2294 ``random'' command if you like; including it causes gnushogi to
2295 randomize its move selection slightly so that it doesn't play the same
2296 moves in every game. Even without ``random'', gnushogi randomizes its
2297 choice of moves from its opening book. You can also remove ``easy'' if
2298 you like; including it toggles easy mode off, causing gnushogi to think
2299 on your time. That is, if ``easy'' is included in the initString, GNU
2300 Shogi thinks on your time; if not, it does not. (Yes, this does seem
2301 backwards, doesn't it.) You can also try adding other commands to the
2302 initString; see the gnushogi documentation (@pxref{gnushogi}) for
2305 @item blackString and whiteString
2306 These resources control what is sent when the Machine Black and Machine
2307 White buttons are selected. This is mostly for compatibility with
2308 obsolete versions of gnushogi.
2310 Alternate bitmaps for piece icons can be specified either by choosing
2311 one of the built-in sets or with the file name resources described
2312 above. There are three built-in sets of piece bitmaps available, large
2313 (the default), medium, or small. It is easiest to select the set you
2314 prefer in the .Xdefaults file:
2316 XShogi*boardSize: Medium
2318 The font used for button labels and comments can be changed in the
2319 .Xdefaults file. You may want to choose a smaller font if you are using
2322 XShogi*font: helvetica_oblique12
2324 The font used for coordinates (when the showCoords option is True) can
2327 XShogi*coordFont: helvetica_10
2329 If you are using a grayscale monitor, try setting the colors to:
2331 XShogi*blackPieceColor: gray100 @*
2332 XShogi*whitePieceColor: gray0 @*
2333 XShogi*lightSquareColor: gray60 @*
2334 XShogi*darkSquareColor: gray40
2340 COMMAND BUTTONS AND KEYS
2347 Quits xshogi. Q or q is a keyboard equivalent.
2350 Resets xshogi to the beginning of a shogi game. It also deselects any
2351 game or position files.
2354 inverts the view of the shogi board.
2357 displays a move hint from gnushogi.
2360 plays a game from a record file. If no file is specified a popup dialog
2361 asks for a filename. Game files are found in the directory named by the
2362 SHOGIDIR environment variable. If this variable is not declared then
2363 the current directory is used unless the file name starts with a /. G
2364 or g is a keyboard equivalent. The game file parser will accept almost
2365 any file that contains moves in algebraic notation. If the first line
2366 begins with `#', it is assumed to be a title and is displayed. Text
2367 enclosed in parentheses or square brackets is assumed to be commentary
2368 and is displayed in a pop-up window. Any other text in the file is
2372 sets up a position from a position file. If no file is specified a
2373 popup dialog asks for a filename. Position files are found in the
2374 directory named by the SHOGIDIR environment variable. If this variable
2375 is not declared then the current directory is used unless the file name
2376 starts with a /. Position files must be in the format that the Save
2377 Position command writes.
2380 saves a game to a record file. If no file is specified a popup dialog
2381 asks for a filename. If the filename exists, the user is asked whether
2382 the current game record is be appended to this file or if the file
2383 should be replaced. Game files are saved in the directory named by the
2384 SHOGIDIR environment variable. If this variable is not declared then
2385 the current directory is used unless the file name starts with a /.
2386 Game files are human-readable, and can also be read back by the Load
2387 Game command. Furthermore, they are accepted as gnushogi text bookfiles.
2390 saves a position to a position file. If no file is specified a popup
2391 dialog asks for a filename. Position files are saved in the directory
2392 named by the SHOGIDIR environment variable. If this variable is not
2393 declared then the current directory is used unless the file name starts
2394 with a /. Position files are human-readable, and can also be read back
2395 by the Load Position command.
2398 forces gnushogi to play white.
2401 forces gnushogi to play black.
2404 forces a series of moves. That is, gnushogi stops playing and xshogi
2405 allows you to make moves for both white and black.
2408 plays a game between two computer programs.
2411 moves forward through a series of remembered moves. F or f is a
2412 keyboard equivalent.
2415 moves backward through a series of remembered moves. As a side effect,
2416 puts xshogi into Force Moves mode. B or b is a keyboard equivalent.
2419 pauses the clocks or (in Load Game mode) pauses the game being loaded.
2420 Press Pause again to continue. P or p is a keyboard equivalent.
2423 lets you set up an arbitrary board position. Use mouse button 1 to drag
2424 pieces to new squares, or to delete a piece by dragging it off the board
2425 or dragging an empty square on top of it. To drop a new piece on a
2426 square, press mouse button 2 or 3 over the square. This brings up a
2427 menu of black pieces (button 2) or white pieces (button 3). Additional
2428 menu choices let you empty the square or clear the board. You can set
2429 the side to play next by clicking on the Black or White indicator at the
2433 allows to make a two display game between two human players. Enter the
2434 display you want to connect to. If you are allowed to connect, a new
2435 board is displayed at the remote display. Challenge mode can only be
2436 stopped by pressing ``quit''.
2439 allows to reset the clocks for both players. Enter the number of moves
2440 and the number of minutes in which the moves should be done.
2443 force computer to stop thinking and to make the current best move.
2445 @item Iconify I, i, C or c
2456 If you press the Pause button during GNU Shogi's turn,
2457 xshogi will stop the clocks, but gnushogi will still make a
2460 After a mate or draw when playing against gnushogi, if you
2461 back up with the Backward button, the clocks are reset
2462 (because gnushogi has exited and must be restarted).
2464 The game parser recognizes only algebraic notation.
2472 Original authors of XBoard: Chris Sears and Dan Sears.
2474 Enhancements for XBoard (Version 2.0): Tim Mann.
2476 Conversion to XShogi (Version 1.1): Matthias Mutz.
2478 Current maintainer: Mike Vanier.
2482 COPYRIGHT INFORMATION
2486 XShogi borrows its piece bitmaps from CRANES Shogi.
2488 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
2489 Enhancements Copyright 1992 Free Software Foundation, Inc. Enhancements
2490 Copyright 1993 Matthias Mutz. Further enhancements copyright 1999 by
2491 Michael Vanier and the Free Software Foundation, Inc.
2493 The following terms apply to Digital Equipment Corporation's copyright
2498 Permission to use, copy, modify, and distribute this software and its
2499 documentation for any purpose and without fee is hereby granted,
2500 provided that the above copyright notice appear in all copies and that
2501 both that copyright notice and this permission notice appear in
2502 supporting documentation, and that the name of Digital not be used in
2503 advertising or publicity pertaining to distribution of the software
2504 without specific, written prior permission.
2506 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
2507 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
2508 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
2509 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
2510 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
2511 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
2514 The following terms apply to the enhanced version of XShogi distributed
2515 by the Free Software Foundation:
2517 This file is part of XSHOGI.
2519 XSHOGI is distributed in the hope that it will be useful, but WITHOUT
2520 ANY WARRANTY. No author or distributor accepts responsibility to anyone
2521 for the consequences of using it or for whether it serves any particular
2522 purpose or works at all, unless he says so in writing. Refer to the
2523 XSHOGI General Public License for full details.
2525 Everyone is granted permission to copy, modify and redistribute XSHOGI,
2526 but only under the conditions described in the XSHOGI General Public
2527 License. A copy of this license is supposed to have been given to you
2528 along with XSHOGI so you can know your rights and responsibilities. It
2529 should be in a file named COPYING. Among other things, the copyright
2530 notice and this notice must be preserved on all copies.
2533 @c ---------------------
2534 @c References and links.
2535 @c ---------------------
2537 @node References and links, Acknowledgements, xshogi, Top
2538 @chapter References and links
2541 @cindex Mailing lists
2545 There are very few English-language books for people learning shogi.
2546 The two I recommend are:
2553 @cite{Shogi for Beginners, 2nd. Edition}, by John Fairbairn. This is a
2554 superb beginner's book in every way, covering all phases of the game.
2555 It was out of print for a long time, but has now been reprinted and is
2556 available either from Kiseido (@uref{http://www.labnet.or.jp/~kiseido})
2557 or from George Hodges (see below).
2560 @cite{The Art of Shogi}, by Tony Hoskings. This is one step up from the
2561 Fairbairn book. It covers a lot of ground, and is especially noteworthy
2562 for its detailed treatment of opening lines. You can order this book
2563 from Amazon.com's UK branch (@uref{http://www.amazon.co.uk}).
2569 Another book you may find is @cite{Shogi: Japan's Game of Strategy} by
2570 Trevor Leggett. This book is very elementary and is somewhat outdated,
2571 having been published first in 1966. However, it does feature a paper
2572 shogi board and punch-out pieces, so if you want a really cheap shogi
2573 set you might pick this book up. It is still in print.
2575 Two books that are no longer in print but are definitely worth getting
2576 if you find them are @cite{Guide to Shogi Openings} and @cite{Better
2577 Moves for Better Shogi}, both by Aono Teriuchi. They are published in a
2578 bilingual edition (English/Japanese) and are the only books on shogi in
2579 English written by a Japanese professional shogi player. John Fairbairn
2580 did the translation from Japanese to English.
2582 Shogi sets are available from:
2590 United Kingdom BR1 2WT
2595 George also sells equipment for all the historical shogi variants
2596 (@pxref{Shogi variants}) (except for Kyoku tai shogi) and also sells
2597 back issues of the magazine ``Shogi'' which he published for 70 issues
2598 in the late 70's to late 80's. This magazine is STRONGLY recommended;
2599 it contains more information about shogi in English than you will ever
2602 Here are some useful URLs:
2608 @item Pieter Stouten's shogi page: @uref{http://www.halcyon.com/stouten/shogi.html}
2609 This is the main shogi-related site on the internet, with links to
2610 almost all the other sites.
2612 @item Roger Hare's shogi page: @uref{http://www.ed.ac.uk/~rjhare/shogi}
2613 This has lots of information, including full rules to most of the shogi
2616 @item Patrick Davin's Shogi Nexus: @uref{http://www.vega.or.jp/~patrick/shogi/}
2617 There's lots of cool stuff on this site; my favorite is the extensive
2618 collection of Tsume-shogi (mating) problems, both for beginners and
2619 more advanced players.
2621 @item Steve Evans' shogi page: @uref{http://www.netspace.net.au/~trout/index.html}
2622 Steve has written a program that plays almost all of the shogi variants,
2623 unfortunately it only runs on Windows :-(
2625 @item Hans Bodlaender's chess variant pages: @uref{http://www.cs.ruu.nl/~hansb/d.chessvar}
2626 This page has an almost unimaginable variety of rules for different
2627 chess variants, including many shogi variants (historical and non-historical).
2633 @c -----------------
2634 @c Acknowledgements.
2635 @c -----------------
2637 @node Acknowledgements, Bugs, References and links, Top
2638 @chapter Acknowledgements
2639 @cindex Acknowledgements
2641 I would like to thank the following people:
2648 Matthias Mutz, who originally developed GNU shogi as a spin-off of GNU
2649 chess and who very kindly let me take over the maintenance of this very
2650 interesting project.
2653 Richard Stallman and the Free Software Foundation, for creating an
2654 organization where anyone can contribute software for the common good of
2655 all, for making GNU/Linux possible, and especially for writing emacs and
2656 gcc, without which my working life would be intolerable.
2659 Georges Hodges, for starting the Shogi Association in England, without
2660 which I would probably never have heard of shogi, for supplying shogi
2661 equipment, for publishing the excellent magazine ``Shogi'' (now sadly
2662 defunct), for personally answering all my silly questions by mail, and
2663 for being the ambassador of shogi to the West.
2666 Pieter Stouten, for having the most comprehensive shogi site on the
2667 World Wide Web @uref{http://www.halcyon.com/stouten/shogi.html}, and for
2668 maintaining the shogi-l mailing list. Go to Pieter's web site for more
2669 information on subscribing to the list. Also thanks to everyone who
2670 contributes and has contributed to that list.
2673 Matt Casters, for testing GNU shogi. Matt and I will be working
2674 together on improving the solution engine in future versions of this
2685 @node Bugs, Index, Acknowledgements, Top
2688 The motto of GNU shogi is ``100% bug-free or you don't pay!'' :-) In the
2689 extremely unlikely case (*ahem*) that you do find a bug, please send me
2690 (Mike Vanier) an email at @email{mvanier@@bbb.caltech.edu}. Also, feel
2691 free to send me comments, complaints, out-and-out raves, suggestions,
2692 plane tickets to Hawaii, and/or large suitcases filled with unmarked,
2693 untraceable hundred-dollar bills.
2706 @node Index, , Bugs, Top