1 .TH xshogi 6 "Jan 29, 1993" "X Version 11"
3 xshogi \- Xt/Athena user interface for gnushogi
8 provides an X11/Xt/Athena Widgets user interface for gnushogi.
11 you can play gnushogi,
12 set up arbitrary positions,
13 force variations, or watch
15 manage a game between two shogi programs.
16 Furthermore, it can be used as an interface between two players on
20 can also be used as a shogi board to play out games.
21 It will read through a game file or allow a player to play
22 through a variation manually (force mode).
23 This is useful for keeping track of email postal games or browsing games
28 you can make moves by pressing mouse button 1
29 while the cursor is over a square with your piece on it
30 and dragging the mouse to another square.
31 If the move is illegal, gnushogi will not allow it.
33 will then retract the move.
36 Shogi is a Japanese board game played by two players.
37 The object of the game is to capture the opponent's King.
38 Shogi is played on a nine-by-nine board. The vertical rows are called files,
39 the horizontal ones ranks or just rows. Each player has twenty pieces:
40 one King, two Gold Generals, two Silver Generals, two kNights,
41 two Lances, one Rook, one Bishop and nine Pawns.
42 The player moving up the board and making the first move is referred to as
43 black and his opponent white, although in Shogi sets all pieces have the
44 same colour. They are differentiated only in direction: pieces pointing
45 away from a player are his. The pieces lie flat on the board and have
46 their Japanese name written on them.
51 one step in any direction per move
54 one step per move any way except diagonally backward (as a king but not diagonally backward)
57 one step per move forwards or diagonally (as a king but not sideways or vertically backward)
60 one step to left or right, and two steps forward (the only piece which may jump over other pieces)
63 moves vertically or horizontally any distance
66 moves diagonally any distance
69 moves forward any distance
75 The three rows furthest away from a player are called the promotion zone. Apart
76 from the King and the Gold, any piece can be promoted to a more powerful piece
77 when it makes a move completely or partly in the promotion zone. So, when a
78 piece moves into, out of or fully inside the promotion zone it may be promoted
79 upon completion of its move. Promotion is optional, provided that the piece
80 still can make a legal move in case it is not promoted: if a Pawn or a Lance
81 move to the last row, or a Knight moves to either of the last two rows, it must
82 be promoted. In Shogi sets promoting a piece is done by turning this piece
83 upside down. Its promoted name is written on its other side.
85 Apart from the King and the Gold General all pieces can promote.
86 After promotion their moves are as follows:
89 Promoted Silver, promoted kNight, promoted Lance and promoted Pawn all
93 The promoted Rook in addition to the moves of the unpromoted Rook can
94 move one step in the diagonal directions. It either moves like a Rook
98 The promoted Bishop in addition to the moves of the unpromoted Bishop
99 can move one step horizontally or vertically. It either moves like a
100 Bishop or like a King.
102 .SS Capturing and dropping pieces
104 When one piece moves onto the same square as an opponent's piece, the
105 opponent's piece is captured. All pieces capture in the same way that they
106 move. Captured pieces become part of the capturer's force. In a later move,
107 instead of moving a piece on the board, a player may put a piece that he
108 has captured from his opponent back onto the board, in an empty square.
109 This is called dropping a piece. Pieces are always dropped unpromoted: if
110 a promoted piece is captured, it reverts to its unpromoted rank.
111 Pieces may be dropped on any empty square on the board with only three
115 After dropping a piece it must be able to make a legal move. This applies
116 to Pawns, Knights or Lances. They may not be dropped onto a square from
117 which they will never be able to move.
120 Attacking the King by dropping a Pawn on the square in front of him is not
121 allowed if the King cannot prevent being captured on the following move.
122 To use the Chess expression: checkmating the King with a Pawn drop is
126 A pawn may only be dropped on a file (vertical row) if there is no other
127 unpromoted pawn of the same player on that file.
131 The game of Shogi has very few draws (roughly 1 percent), mainly because of
132 the possibility to drop pieces. Draws cannot be offered and can arise from
136 A position (including the pieces in hand) occurs 4 times with the same
137 player to move ("Sennichite"). However, if this is caused by consecutive
138 checks (direct attacks on the King, threatening to capture it on the next
139 move) by one side, the player giving these checks loses the game.
142 Both players have moved their King into the the promotion zone (or they
143 cannot be prevented to do so) and the Kings cannot be checkmated. In
144 that case the players may decide to count their pieces where the King does
145 not count, the Rook and Bishop count as 5 points, and all other pieces as
146 one point. Promotion is disregarded. If both players have at least 24
147 points the game is a draw ("Jishogi"). If a player has less, he loses the
150 Of course, a player can refuse to count pieces when he still has mating
151 chances or chances to gain material which would affect the outcome of the
152 counting. There is no strict rule about what to do if this is not the case,
153 but nonetheless a player refuses to count up (e.g. because he does not have
154 enough points for a draw). It has been generally accepted that in such a
155 case the game ends and the pieces are counted after one player has managed
156 to get all his pieces protected in the promotion zone.
159 The following command line options also correspond to X resources
160 that you can set in your
166 .B standard Xt options
168 accepts standard Xt options like -display, -geometry, -iconic, -bg etc.
170 .B -tc or -timeControl minutes[:seconds]
171 Amount of time for a set of moves determined by
172 .IR movesPerSession .
173 If this number of moves is played within the time control period,
175 resets the time clocks.
178 .B -mps or -movesPerSession moves
179 Number of moves in a time control period.
182 .B -st or -searchTime minutes[:seconds]
183 Tell gnushogi to spend at most the given amount of time searching
184 for each of its moves. Without this option, gnushogi chooses
185 its search time based on the number of moves and amount of time
186 remaining until the next time control.
187 Setting this option also sets -clockMode to False.
189 .B -sd or -searchDepth number
190 Tell gnushogi to look ahead at most the given number of moves when searching
191 for a move to make. Without this option, gnushogi chooses
192 its search depth based on the number of moves and amount of time
193 remaining until the next time control.
194 Setting this option also sets -clockMode to False.
196 .B -clock or -clockMode "(True | False)"
197 Determines whether or not to use the clock.
198 If clockMode is False, the clock does not run, but the
199 side that is to play next is still highlighted.
201 .B -td or -timeDelay seconds
202 Time delay between moves during "Load Game".
203 This doesn't have to be round numbers.
204 Try -td 0.4. Default: 1 second.
206 .B -nsp or -noShogiProgram "(True | False)"
207 If this option is True,
209 acts as a passive shogiboard; it does not
210 try to start a shogi program, not even to check whether
211 moves made in Force mode are legal.
212 It also sets -clockMode to False.
215 .B -fsp or -firstShogiProgram program
216 Name of first shogi program.
217 In matches between two machines, this program plays white.
220 .B -ssp or -secondShogiProgram program
221 Name of second shogi program, if needed.
222 In matches between two machines, this program plays black; otherwise
226 .B -fh or -firstHost host
227 Name of host the first shogi program plays on.
228 Default: "localhost".
230 .B -sh or -secondHost host
231 Name of host the second shogi program plays on.
232 Default: "localhost".
234 .B -rsh or -remoteShell shell_name
235 Some systems do not use rsh as the remote shell.
236 This option allows a user to name the remote shell command.
237 This should be done in the resource file.
239 .B -mm or -matchMode "(False | Init | Position | Opening)"
240 Automatically run a game between
241 .IR firstShogiProgram
243 .IR secondShogiProgram .
249 will start the game with the initial shogi position.
255 will start the game with the position specified by the
263 will play out the opening moves specified by the
268 resource is set, a move record for the match will
269 be saved in the specified file.
272 .B -lgf or -loadGameFile file
273 Name of file to read a game record from.
274 Game files are found in the directory named by the SHOGIDIR environment
275 variable. If this variable is not set, the current directory is used
276 unless the file name starts with a /.
278 .B -lpf or -loadPositionFile file
279 Name of file to read a game position from.
280 Position files are found in the directory named by the SHOGIDIR environment
281 variable. If this variable is not set, the current directory is used
282 unless the file name starts with a /.
284 .B -sgf or -saveGameFile file
285 Name of file to save a game record to.
286 Game files are saved in the directory named by the SHOGIDIR environment
287 variable. If this variable is not set, the current directory is used
288 unless the file name starts with a /.
290 .B -spf or -savePositionFile file
291 Name of file to save a game position to.
292 Position files are saved in the directory named by the SHOGIDIR environment
293 variable. If this variable is not set, the current directory is used
294 unless the file name starts with a /.
296 .B -coords or -showCoords "(True | False)"
297 If this option is True,
299 displays algebraic coordinates along the board's left and bottom edges.
300 The default is False. The
302 resource specifies what font to use.
304 .B -mono or -monoMode "(True | False)"
305 Monochrome mode. You shouldn't have to specify monochrome.
307 will determine if this is necessary.
309 .B -pc or -pieceColor color
310 Color specification for pieces suitable for
314 .B -sc or -squareColor color
318 .B -wps or -westernPieceSet (True | False)
319 Choose the Western style piece set.
321 .B -npb or -normalPawnBitmap file
324 .B -nnb or -normalKnightBitmap file
326 .B -nbb or -normalBishopBitmap file
328 .B -nrb or -normalRookBitmap file
330 .B -nkb or -normalKingBitmap file
331 Names of the bitmap files for the bitmap piece icons.
336 .B -rpb or -reversePawnBitmap file
338 .B -rnb or -reverseKnightBitmap file
340 .B -rbb or -reverseBishopBitmap file
342 .B -rrb or -reverseRookBitmap file
344 .B -rkb or -reverseKingBitmap file
345 Names of the bitmap files for the outline piece icons.
348 .B -debug or -debugMode "(True | False)"
349 Turns on debugging printout.
353 The actual string that is sent to initialize the shogi program can be
354 set from .Xdefaults. It can't be set from the command line because of
355 syntax problems. The default value is "new\\nbeep\\nrandom\\neasy\\n".
356 The "new" and "beep" commands are required.
357 You can remove the "random" command if you
358 like; including it causes gnushogi to randomize its move selection slightly so
359 that it doesn't play the same moves in every game.
360 Even without "random", gnushogi
361 randomizes its choice of moves from its opening book.
362 You can also remove "easy" if you like; including it toggles easy mode
364 causing gnushogi to think on your time.
365 That is, if "easy" is included in the initString, gnushogi thinks
366 on your time; if not, it does not. (Yes, this does seem backwards, doesn't
368 You can also try adding other commands to the initString; see the gnushogi
369 documentation for details.
371 .B blackString and whiteString
372 These resources control what is sent when the Machine Black and Machine White
373 buttons are selected. This is mostly for compatibility with obsolete versions
376 Alternate bitmaps for piece icons can be specified
377 either by choosing one of the built-in sets or with
378 the file name resources described above.
379 There are three built-in sets of piece bitmaps available,
380 large (the default), medium, or small.
381 It is easiest to select the set you prefer in the .Xdefaults file:
384 XShogi*boardSize: Medium
386 The font used for button labels and comments can be changed in
387 the .Xdefaults file. You may want to choose a smaller
388 font if you are using the small pieces:
391 XShogi*font: helvetica_oblique12
393 The font used for coordinates (when the
395 option is True) can be set similarly:
398 XShogi*coordFont: helvetica_10
400 If you are using a grayscale monitor, try setting the colors to:
403 XShogi*pieceColor: gray100
405 XShogi*squareColor: gray60
407 .SH COMMAND BUTTONS AND KEYS
412 Q or q is a keyboard equivalent.
417 to the beginning of a shogi game.
418 It also deselects any game or position files.
421 inverts the view of the shogi board.
424 displays a move hint from gnushogi.
427 plays a game from a record file.
428 If no file is specified a popup dialog asks for a filename.
429 Game files are found in the directory named by the SHOGIDIR environment
430 variable. If this variable is not declared then the current directory is used
431 unless the file name starts with a /.
432 G or g is a keyboard equivalent.
433 The game file parser will accept almost any file that contains
434 moves in algebraic notation.
435 If the first line begins with `#', it
436 is assumed to be a title and is displayed.
437 Text enclosed in parentheses or square brackets is assumed to be
438 commentary and is displayed in a pop-up window.
439 Any other text in the file is ignored.
442 sets up a position from a position file.
443 If no file is specified a popup dialog asks for a filename.
444 Position files are found in the directory named by the SHOGIDIR environment
445 variable. If this variable is not declared then the current directory is used
446 unless the file name starts with a /.
447 Position files must be in the format that the Save Position command
451 saves a game to a record file.
452 If no file is specified a popup dialog asks for a filename.
453 If the filename exists, the user is asked whether the current game record
454 is be appended to this file or if the file should be replaced.
455 Game files are saved in the directory named by the SHOGIDIR environment
456 variable. If this variable is not declared then the current directory is used
457 unless the file name starts with a /.
458 Game files are human-readable, and can also be read back by
459 the Load Game command. Furthermore, they are accepted as gnushogi text bookfiles.
462 saves a position to a position file.
463 If no file is specified a popup dialog asks for a filename.
464 Position files are saved in the directory named by the SHOGIDIR environment
465 variable. If this variable is not declared then the current directory is used
466 unless the file name starts with a /.
467 Position files are human-readable, and can also be read back by
468 the Load Position command.
471 forces gnushogi to play white.
474 forces gnushogi to play black.
477 forces a series of moves. That is, gnushogi stops playing
478 and xshogi allows you to make moves for both white and black.
481 plays a game between two computer programs.
484 moves forward through a series of remembered moves.
485 F or f is a keyboard equivalent.
488 moves backward through a series of remembered moves.
489 As a side effect, puts xshogi into Force Moves mode.
490 B or b is a keyboard equivalent.
493 pauses the clocks or (in Load Game mode) pauses the game being loaded.
494 Press Pause again to continue.
495 P or p is a keyboard equivalent.
498 lets you set up an arbitrary board position.
499 Use mouse button 1 to drag pieces to new squares, or to
500 delete a piece by dragging it off the board or dragging an empty square
501 on top of it. To drop a new piece on a square, press mouse button 2 or 3
502 over the square. This brings up a menu of black pieces (button 2) or white
503 pieces (button 3). Additional menu choices let you empty the square or
504 clear the board. You can set the side to play next
505 by clicking on the Black or White indicator at the top of the screen.
508 allows you to make a two display game between two human players.
509 Enter the display you want to connect to. If you are allowed to
510 connect, a new board is displayed at the remote display.
511 Challenge mode can only be stopped by pressing "quit".
514 allows you to reset the clocks for both players.
515 Enter the number of moves and the number of minutes in which the
516 moves should be done.
519 force computer to stop thinking and to make the current best move.
522 I, i, C or c iconifies
527 If you press the Pause button during gnushogi's turn,
529 will stop the clocks,
530 but gnushogi will still make a move.
532 After a mate or draw when playing against gnushogi, if you back up with
533 the Backward button, the clocks are reset (because
534 gnushogi has exited and must
539 functions may not work with versions of gnushogi earlier
540 than 1.1, patchlevel 02.
542 The game parser recognizes only algebraic notation.
544 Original authors of XBoard: Chris Sears and Dan Sears.
546 Enhancements for XBoard (Version 2.0): Tim Mann.
548 Conversion to XShogi (Version 1.1): Matthias Mutz.
550 Current maintainer: Mike Vanier.
552 XShogi borrows some of its piece bitmaps from CRANES Shogi.
554 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
555 Enhancements Copyright 1992 Free Software Foundation, Inc.
556 Enhancements Copyright 1993 Matthias Mutz
558 The following terms apply to Digital Equipment Corporation's copyright
564 Permission to use, copy, modify, and distribute this software and its
565 documentation for any purpose and without fee is hereby granted,
566 provided that the above copyright notice appear in all copies and that
567 both that copyright notice and this permission notice appear in
568 supporting documentation, and that the name of Digital not be
569 used in advertising or publicity pertaining to distribution of the
570 software without specific, written prior permission.
572 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
573 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
574 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
575 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
576 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
577 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
581 The following terms apply to the enhanced version of XShogi distributed
582 by the Free Software Foundation:
585 This file is part of XSHOGI.
587 XSHOGI is distributed in the hope that it will be useful, but WITHOUT ANY
588 WARRANTY. No author or distributor accepts responsibility to anyone for
589 the consequences of using it or for whether it serves any particular
590 purpose or works at all, unless he says so in writing. Refer to the XSHOGI
591 General Public License for full details.
593 Everyone is granted permission to copy, modify and redistribute XSHOGI, but
594 only under the conditions described in the XSHOGI General Public License. A
595 copy of this license is supposed to have been given to you along with
596 XSHOGI so you can know your rights and responsibilities. It should be in a
597 file named COPYING. Among other things, the copyright notice and this
598 notice must be preserved on all copies.