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
164 .B standard Xt options
166 accepts standard Xt options like -display, -geometry, and -iconic.
168 .B -tc or -timeControl minutes[:seconds]
169 Amount of time for a set of moves determined by
170 .IR movesPerSession .
171 If this number of moves is played within the time control period,
173 resets the time clocks.
176 .B -mps or -movesPerSession moves
177 Number of moves in a time control period.
180 .B -st or -searchTime minutes[:seconds]
181 Tell gnushogi to spend at most the given amount of time searching
182 for each of its moves. Without this option, gnushogi chooses
183 its search time based on the number of moves and amount of time
184 remaining until the next time control.
185 Setting this option also sets -clockMode to False.
187 .B -sd or -searchDepth number
188 Tell gnushogi to look ahead at most the given number of moves when searching
189 for a move to make. Without this option, gnushogi chooses
190 its search depth based on the number of moves and amount of time
191 remaining until the next time control.
192 Setting this option also sets -clockMode to False.
194 .B -clock or -clockMode "(True | False)"
195 Determines whether or not to use the clock.
196 If clockMode is False, the clock does not run, but the
197 side that is to play next is still highlighted.
199 .B -td or -timeDelay seconds
200 Time delay between moves during "Load Game".
201 This doesn't have to be round numbers.
202 Try -td 0.4. Default: 1 second.
204 .B -nsp or -noShogiProgram "(True | False)"
205 If this option is True,
207 acts as a passive shogiboard; it does not
208 try to start a shogi program, not even to check whether
209 moves made in Force mode are legal.
210 It also sets -clockMode to False.
213 .B -fsp or -firstShogiProgram program
214 Name of first shogi program.
215 In matches between two machines, this program plays white.
218 .B -ssp or -secondShogiProgram program
219 Name of second shogi program, if needed.
220 In matches between two machines, this program plays black; otherwise
224 .B -fh or -firstHost host
225 Name of host the first shogi program plays on.
226 Default: "localhost".
228 .B -sh or -secondHost host
229 Name of host the second shogi program plays on.
230 Default: "localhost".
232 .B -rsh or -remoteShell shell_name
233 Some systems do not use rsh as the remote shell.
234 This option allows a user to name the remote shell command.
235 This should be done in the resource file.
237 .B -mm or -matchMode "(False | Init | Position | Opening)"
238 Automatically run a game between
239 .IR firstShogiProgram
241 .IR secondShogiProgram .
247 will start the game with the initial shogi position.
253 will start the game with the position specified by the
261 will play out the opening moves specified by the
266 resource is set, a move record for the match will
267 be saved in the specified file.
270 .B -lgf or -loadGameFile file
271 Name of file to read a game record from.
272 Game files are found in the directory named by the SHOGIDIR environment
273 variable. If this variable is not set, the current directory is used
274 unless the file name starts with a /.
276 .B -lpf or -loadPositionFile file
277 Name of file to read a game position from.
278 Position files are found in the directory named by the SHOGIDIR environment
279 variable. If this variable is not set, the current directory is used
280 unless the file name starts with a /.
282 .B -sgf or -saveGameFile file
283 Name of file to save a game record to.
284 Game files are saved in the directory named by the SHOGIDIR environment
285 variable. If this variable is not set, the current directory is used
286 unless the file name starts with a /.
288 .B -spf or -savePositionFile file
289 Name of file to save a game position to.
290 Position files are saved in the directory named by the SHOGIDIR environment
291 variable. If this variable is not set, the current directory is used
292 unless the file name starts with a /.
294 .B -coords or -showCoords "(True | False)"
295 If this option is True,
297 displays algebraic coordinates along the board's left and bottom edges.
298 The default is False. The
300 resource specifies what font to use.
302 .B -mono or -monoMode "(True | False)"
305 displays its pieces and squares with two colors or four.
306 You shouldn't have to specify monochrome.
308 will determine if this is necessary.
310 .B -wpc or -blackPieceColor color
311 Color specification for black pieces
313 .IR XParseColor (3X11).
315 These colors look good on a DEC workstation.
316 If you need different colors, try using the
318 application. Source for
320 can be found in the X11/R4 contrib directory.
322 .B -bpc or -whitePieceColor color
323 Same for white pieces.
326 .B -lsc or -lightSquareColor color
327 Same for light squares.
330 .B -dsc or -darkSquareColor color
331 Same for dark squares.
334 .B -wps or -westernPieceSet (True | False)
335 Choose the Western style piece set.
337 .B -npb or -normalPawnBitmap file
340 .B -nnb or -normalKnightBitmap file
342 .B -nbb or -normalBishopBitmap file
344 .B -nrb or -normalRookBitmap file
346 .B -nkb or -normalKingBitmap file
347 Names of the bitmap files for the bitmap piece icons.
352 .B -rpb or -reversePawnBitmap file
354 .B -rnb or -reverseKnightBitmap file
356 .B -rbb or -reverseBishopBitmap file
358 .B -rrb or -reverseRookBitmap file
360 .B -rkb or -reverseKingBitmap file
361 Names of the bitmap files for the outline piece icons.
364 .B -debug or -debugMode "(True | False)"
365 Turns on debugging printout.
369 The actual string that is sent to initialize the shogi program can be
370 set from .Xdefaults. It can't be set from the command line because of
371 syntax problems. The default value is "new\\nbeep\\nrandom\\neasy\\n".
372 The "new" and "beep" commands are required.
373 You can remove the "random" command if you
374 like; including it causes gnushogi to randomize its move selection slightly so
375 that it doesn't play the same moves in every game.
376 Even without "random", gnushogi
377 randomizes its choice of moves from its opening book.
378 You can also remove "easy" if you like; including it toggles easy mode
380 causing gnushogi to think on your time.
381 That is, if "easy" is included in the initString, gnushogi thinks
382 on your time; if not, it does not. (Yes, this does seem backwards, doesn't
384 You can also try adding other commands to the initString; see the gnushogi
385 documentation for details.
387 .B blackString and whiteString
388 These resources control what is sent when the Machine Black and Machine White
389 buttons are selected. This is mostly for compatibility with obsolete versions
392 Alternate bitmaps for piece icons can be specified
393 either by choosing one of the built-in sets or with
394 the file name resources described above.
395 There are three built-in sets of piece bitmaps available,
396 large (the default), medium, or small.
397 It is easiest to select the set you prefer in the .Xdefaults file:
400 XShogi*boardSize: Medium
402 The font used for button labels and comments can be changed in
403 the .Xdefaults file. You may want to choose a smaller
404 font if you are using the small pieces:
407 XShogi*font: helvetica_oblique12
409 The font used for coordinates (when the
411 option is True) can be set similarly:
414 XShogi*coordFont: helvetica_10
416 If you are using a grayscale monitor, try setting the colors to:
419 XShogi*blackPieceColor: gray100
421 XShogi*whitePieceColor: gray0
423 XShogi*lightSquareColor: gray60
425 XShogi*darkSquareColor: gray40
426 .SH COMMAND BUTTONS AND KEYS
431 Q or q is a keyboard equivalent.
436 to the beginning of a shogi game.
437 It also deselects any game or position files.
440 inverts the view of the shogi board.
443 displays a move hint from gnushogi.
446 plays a game from a record file.
447 If no file is specified a popup dialog asks for a filename.
448 Game files are found in the directory named by the SHOGIDIR environment
449 variable. If this variable is not declared then the current directory is used
450 unless the file name starts with a /.
451 G or g is a keyboard equivalent.
452 The game file parser will accept almost any file that contains
453 moves in algebraic notation.
454 If the first line begins with `#', it
455 is assumed to be a title and is displayed.
456 Text enclosed in parentheses or square brackets is assumed to be
457 commentary and is displayed in a pop-up window.
458 Any other text in the file is ignored.
461 sets up a position from a position file.
462 If no file is specified a popup dialog asks for a filename.
463 Position files are found in the directory named by the SHOGIDIR environment
464 variable. If this variable is not declared then the current directory is used
465 unless the file name starts with a /.
466 Position files must be in the format that the Save Position command
470 saves a game to a record file.
471 If no file is specified a popup dialog asks for a filename.
472 If the filename exists, the user is asked whether the current game record
473 is be appended to this file or if the file should be replaced.
474 Game files are saved in the directory named by the SHOGIDIR environment
475 variable. If this variable is not declared then the current directory is used
476 unless the file name starts with a /.
477 Game files are human-readable, and can also be read back by
478 the Load Game command. Furthermore, they are accepted as gnushogi text bookfiles.
481 saves a position to a position file.
482 If no file is specified a popup dialog asks for a filename.
483 Position files are saved in the directory named by the SHOGIDIR environment
484 variable. If this variable is not declared then the current directory is used
485 unless the file name starts with a /.
486 Position files are human-readable, and can also be read back by
487 the Load Position command.
490 forces gnushogi to play white.
493 forces gnushogi to play black.
496 forces a series of moves. That is, gnushogi stops playing
497 and xshogi allows you to make moves for both white and black.
500 plays a game between two computer programs.
503 moves forward through a series of remembered moves.
504 F or f is a keyboard equivalent.
507 moves backward through a series of remembered moves.
508 As a side effect, puts xshogi into Force Moves mode.
509 B or b is a keyboard equivalent.
512 pauses the clocks or (in Load Game mode) pauses the game being loaded.
513 Press Pause again to continue.
514 P or p is a keyboard equivalent.
517 lets you set up an arbitrary board position.
518 Use mouse button 1 to drag pieces to new squares, or to
519 delete a piece by dragging it off the board or dragging an empty square
520 on top of it. To drop a new piece on a square, press mouse button 2 or 3
521 over the square. This brings up a menu of black pieces (button 2) or white
522 pieces (button 3). Additional menu choices let you empty the square or
523 clear the board. You can set the side to play next
524 by clicking on the Black or White indicator at the top of the screen.
527 allows to make a two display game between two human players.
528 Enter the display you want to connect to. If you are allowed to
529 connect, a new board is displayed at the remote display.
530 Challenge mode can only be stopped by pressing "quit".
533 allows to reset the clocks for both players.
534 Enter the number of moves and the number of minutes in which the
535 moves should be done.
538 force computer to stop thinking and to make the current best move.
541 I, i, C or c iconifies
546 If you press the Pause button during gnushogi's turn,
548 will stop the clocks,
549 but gnushogi will still make a move.
551 After a mate or draw when playing against gnushogi, if you back up with
552 the Backward button, the clocks are reset (because
553 gnushogi has exited and must
558 functions may not work with versions of gnushogi earlier
559 than 1.1, patchlevel 02.
561 The game parser recognizes only algebraic notation.
563 Original authors of XBoard: Chris Sears and Dan Sears.
565 Enhancements for XBoard (Version 2.0): Tim Mann.
567 Conversion to XShogi (Version 1.1): Matthias Mutz.
569 XShogi borrows its piece bitmaps from CRANES Shogi.
571 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
572 Enhancements Copyright 1992 Free Software Foundation, Inc.
573 Enhancements Copyright 1993 Matthias Mutz
575 The following terms apply to Digital Equipment Corporation's copyright
581 Permission to use, copy, modify, and distribute this software and its
582 documentation for any purpose and without fee is hereby granted,
583 provided that the above copyright notice appear in all copies and that
584 both that copyright notice and this permission notice appear in
585 supporting documentation, and that the name of Digital not be
586 used in advertising or publicity pertaining to distribution of the
587 software without specific, written prior permission.
589 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
590 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
591 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
592 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
593 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
594 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
598 The following terms apply to the enhanced version of XShogi distributed
599 by the Free Software Foundation:
602 This file is part of XSHOGI.
604 XSHOGI is distributed in the hope that it will be useful, but WITHOUT ANY
605 WARRANTY. No author or distributor accepts responsibility to anyone for
606 the consequences of using it or for whether it serves any particular
607 purpose or works at all, unless he says so in writing. Refer to the XSHOGI
608 General Public License for full details.
610 Everyone is granted permission to copy, modify and redistribute XSHOGI, but
611 only under the conditions described in the XSHOGI General Public License. A
612 copy of this license is supposed to have been given to you along with
613 XSHOGI so you can know your rights and responsibilities. It should be in a
614 file named COPYING. Among other things, the copyright notice and this
615 notice must be preserved on all copies.