Updating to version 1.3, release made by Mike Vanier (mvanier@bbb.caltech.edu).
[gnushogi.git] / doc / gnushogi_18.html
1 <HTML>
2 <HEAD>
3 <!-- Created by texi2html 1.57 from gnushogi.texinfo on June 29,  1999 -->
4
5 <TITLE>GNU Shogi manual - xshogi</TITLE>
6 </HEAD>
7 <BODY >
8  [<A HREF="gnushogi_toc.html">Contents</A>] &#160; [<A HREF="gnushogi_17.html">Back</A>] &#160; [<A HREF="gnushogi_17.html">Prev</A>] &#160; [<A>Up</A>] &#160; [<A HREF="gnushogi_19.html">Next</A>] &#160; [<A HREF="gnushogi_19.html">Forward</A>] &#160;<BR><HR><BR>
9
10
11 <H1><A NAME="SEC21">xshogi</A></H1>
12 <P>
13 <A NAME="IDX26"></A>
14
15
16 <P>
17 This section describes how to run the "xshogi" program.
18
19
20 <P>
21 SYNOPSIS
22
23
24 <P>
25 xshogi [ options ]
26
27
28 <P>
29 DESCRIPTION
30
31
32 <P>
33 xshogi provides an X11/Xt/Athena Widgets user interface for gnushogi.
34 With xshogi you can play gnushogi, set up arbitrary positions, force
35 variations, or watch xshogi manage a game between two shogi programs.
36 Furthermore, it can be used as an interface between two players on
37 different displays.
38
39
40 <P>
41 xshogi can also be used as a shogi board to play out games.  It will
42 read through a game file or allow a player to play through a variation
43 manually (force mode).  This is useful for keeping track of email postal
44 games or browsing games off the net.
45
46
47 <P>
48 After starting xshogi, you can make moves by pressing mouse button 1
49 while the cursor is over a square with your piece on it and dragging the
50 mouse to another square.  If the move is illegal, gnushogi will not
51 allow it.  xshogi will then retract the move.
52
53
54 <P>
55 COMMAND-LINE OPTIONS
56
57
58 <P>
59 The following command line options also correspond to X resources that
60 you can set in your .Xdefaults file.
61
62
63 <DL COMPACT>
64
65 <DT><SAMP>`[standard Xt options]'</SAMP>
66 <DD>
67 xshogi accepts standard Xt options like -display, -geometry, and
68 -iconic.
69
70 <DT><SAMP>`-tc or -timeControl minutes[:seconds]'</SAMP>
71 <DD>
72 Amount of time for a set of moves determined by movesPerSession.  If
73 this number of moves is played within the time control period, xshogi
74 resets the time clocks.  Default: 5 minutes.
75
76 <DT><SAMP>`-mps or -movesPerSession moves'</SAMP>
77 <DD>
78 Number of moves in a time control period.  Default: 40 moves.
79
80 <DT><SAMP>`-st or -searchTime minutes[:seconds]'</SAMP>
81 <DD>
82 Tell gnushogi to spend at most the given amount of time searching for
83 each of its moves.  Without this option, gnushogi chooses its search
84 time based on the number of moves and amount of time remaining until the
85 next time control.  Setting this option also sets -clockMode to False.
86
87 <DT><SAMP>`-sd or -searchDepth number'</SAMP>
88 <DD>
89 Tell gnushogi to look ahead at most the given number of moves when
90 searching for a move to make.  Without this option, gnushogi chooses
91 its search depth based on the number of moves and amount of time
92 remaining until the next time control.  Setting this option also sets
93 -clockMode to False.
94
95 <DT><SAMP>`-clock or -clockMode (True | False)'</SAMP>
96 <DD>
97 Determines whether or not to use the clock.  If clockMode is False, the
98 clock does not run, but the side that is to play next is still
99 highlighted.
100
101 <DT><SAMP>`-td or -timeDelay seconds'</SAMP>
102 <DD>
103 Time delay between moves during "Load Game".  This doesn't have to be
104 a round number.  Try -td 0.4.  Default: 1 second.
105
106 <DT><SAMP>`-nsp or -noShogiProgram (True | False)'</SAMP>
107 <DD>
108 If this option is True, xshogi acts as a passive shogi board; it does
109 not try to start a shogi program, not even to check whether moves made
110 in Force mode are legal.  It also sets -clockMode to False.  Default:
111 False.
112
113 <DT><SAMP>`-fsp or -firstShogiProgram program'</SAMP>
114 <DD>
115 Name of first shogi program.  In matches between two machines, this
116 program plays white.  Default: "gnushogi".
117
118 <DT><SAMP>`-ssp or -secondShogiProgram program'</SAMP>
119 <DD>
120 Name of second shogi program, if needed.  In matches between two
121 machines, this program plays black; otherwise it is not started.
122 Default: "gnushogi".
123
124 <DT><SAMP>`-fh or -firstHost host'</SAMP>
125 <DD>
126 Name of host the first shogi program plays on.  Default: "localhost".
127
128 <DT><SAMP>`-sh or -secondHost host'</SAMP>
129 <DD>
130 Name of host the second shogi program plays on.  Default: "localhost".
131
132 <DT><SAMP>`-rsh or -remoteShell shell_name'</SAMP>
133 <DD>
134 Some systems do not use rsh as the remote shell.  This option allows a
135 user to name the remote shell command.  This should be done in the
136 resource file.
137
138 <DT><SAMP>`-mm or -matchMode (False | Init | Position | Opening)'</SAMP>
139 <DD>
140 Automatically run a game between firstShogiProgram and
141 secondShogiProgram.  If matchMode is set to Init, xshogi will start the
142 game with the initial shogi position.  If matchMode is set to Position,
143 xshogi will start the game with the position specified by the
144 loadPositionFile resource.  If matchMode is set to Opening, xshogi will
145 play out the opening moves specified by the -loadGameFile resource.  If
146 the -saveGameFile resource is set, a move record for the match will be
147 saved in the specified file.  Default: "False".
148
149 <DT><SAMP>`-lgf or -loadGameFile file'</SAMP>
150 <DD>
151 Name of file to read a game record from.  Game files are found in the
152 directory named by the SHOGIDIR environment variable.  If this variable
153 is not set, the current directory is used unless the file name starts
154 with a /.
155
156 <DT><SAMP>`-lpf or -loadPositionFile file'</SAMP>
157 <DD>
158 Name of file to read a game position from.  Position files are found in
159 the directory named by the SHOGIDIR environment variable.  If this
160 variable is not set, the current directory is used unless the file name
161 starts with a /.
162
163 <DT><SAMP>`-sgf or -saveGameFile file'</SAMP>
164 <DD>
165 Name of file to save a game record to.  Game files are saved in the
166 directory named by the SHOGIDIR environment variable.  If this variable
167 is not set, the current directory is used unless the file name starts
168 with a /.
169
170 <DT><SAMP>`-spf or -savePositionFile file'</SAMP>
171 <DD>
172 Name of file to save a game position to.  Position files are saved in
173 the directory named by the SHOGIDIR environment variable.  If this
174 variable is not set, the current directory is used unless the file name
175 starts with a /.
176
177 <DT><SAMP>`-coords or -showCoords (True | False)'</SAMP>
178 <DD>
179 If this option is True, xshogi displays algebraic coordinates along the
180 board's left and bottom edges.  The default is False.  The coordFont
181 resource specifies what font to use.
182
183 <DT><SAMP>`-mono or -monoMode (True | False)'</SAMP>
184 <DD>
185 Determines whether xshogi displays its pieces and squares with two
186 colors or four.  You shouldn't have to specify monochrome.  xshogi will
187 determine if this is necessary.
188
189 <DT><SAMP>`-wpc or -blackPieceColor color'</SAMP>
190 <DD>
191 Color specification for black pieces suitable for XParseColor(3X11).
192 Default: #FFFFCC.  These colors look good on a DEC workstation.  If you
193 need different colors, try using the xcolors application.  Source for
194 xcolors can be found in the X11 contrib directory.
195
196 <DT><SAMP>`-bpc or -whitePieceColor color'</SAMP>
197 <DD>
198 Same for white pieces.  Default: #202020.
199
200 <DT><SAMP>`-lsc or -lightSquareColor color'</SAMP>
201 <DD>
202 Same for light squares.  Default: #C8C365.
203
204 <DT><SAMP>`-dsc or -darkSquareColor color'</SAMP>
205 <DD>
206 Same for dark squares.  Default: #77A26D.
207
208 <DT><SAMP>`-wps or -westernPieceSet (True | False)'</SAMP>
209 <DD>
210 Choose the Western style piece set.
211
212 <DT><SAMP>`-npb or -normalPawnBitmap file'</SAMP>
213 <DD>
214 <DT><SAMP>`-nnb or -normalKnightBitmap file'</SAMP>
215 <DD>
216 <DT><SAMP>`-nbb or -normalBishopBitmap file'</SAMP>
217 <DD>
218 <DT><SAMP>`-nrb or -normalRookBitmap file'</SAMP>
219 <DD>
220 <DT><SAMP>`-nkb or -normalKingBitmap file'</SAMP>
221 <DD>
222 Names of the bitmap files for the bitmap piece icons.
223
224 <DT><SAMP>`-rpb or -reversePawnBitmap file'</SAMP>
225 <DD>
226 <DT><SAMP>`-rnb or -reverseKnightBitmap file'</SAMP>
227 <DD>
228 <DT><SAMP>`-rbb or -reverseBishopBitmap file'</SAMP>
229 <DD>
230 <DT><SAMP>`-rrb or -reverseRookBitmap file'</SAMP>
231 <DD>
232 <DT><SAMP>`-rkb or -reverseKingBitmap file'</SAMP>
233 <DD>
234 Names of the bitmap files for the outline piece icons.
235
236 <DT><SAMP>`-debug or -debugMode (True | False)'</SAMP>
237 <DD>
238 Turns on debugging printout.
239
240 </DL>
241
242 <P>
243 OTHER X RESOURCES
244
245
246 <DL COMPACT>
247
248 <DT><SAMP>`initString'</SAMP>
249 <DD>
250 The actual string that is sent to initialize the shogi program can be
251 set from .Xdefaults.  It can't be set from the command line because of
252 syntax problems.  The default value is "new\nbeep\nrandom\neasy\n".
253 The "new" and "beep" commands are required. You can remove the
254 "random" command if you like; including it causes gnushogi to
255 randomize its move selection slightly so that it doesn't play the same
256 moves in every game.  Even without "random", gnushogi randomizes its
257 choice of moves from its opening book.  You can also remove "easy" if
258 you like; including it toggles easy mode off, causing gnushogi to think
259 on your time.  That is, if "easy" is included in the initString, GNU
260 Shogi thinks on your time; if not, it does not.  (Yes, this does seem
261 backwards, doesn't it.)  You can also try adding other commands to the
262 initString; see the gnushogi documentation (see section <A HREF="gnushogi_17.html#SEC20">gnushogi</A>) for
263 details.
264
265 <DT><SAMP>`blackString and whiteString'</SAMP>
266 <DD>
267 These resources control what is sent when the Machine Black and Machine
268 White buttons are selected.  This is mostly for compatibility with
269 obsolete versions of gnushogi.
270
271 Alternate bitmaps for piece icons can be specified either by choosing
272 one of the built-in sets or with the file name resources described
273 above.  There are three built-in sets of piece bitmaps available, large
274 (the default), medium, or small.  It is easiest to select the set you
275 prefer in the .Xdefaults file:
276
277      XShogi*boardSize:   Medium
278
279 The font used for button labels and comments can be changed in the
280 .Xdefaults file.  You may want to choose a smaller font if you are using
281 the small pieces:
282
283      XShogi*font:    helvetica_oblique12
284
285 The font used for coordinates (when the showCoords option is True) can
286 be set similarly:
287
288      XShogi*coordFont:    helvetica_10
289
290 If you are using a grayscale monitor, try setting the colors to:
291
292      XShogi*blackPieceColor:     gray100 <BR>
293      XShogi*whitePieceColor:     gray0   <BR>
294      XShogi*lightSquareColor:    gray60  <BR>
295      XShogi*darkSquareColor:     gray40
296
297 </DL>
298
299 <P>
300 COMMAND BUTTONS AND KEYS
301
302
303 <DL COMPACT>
304
305 <DT><SAMP>`Quit'</SAMP>
306 <DD>
307 Quits xshogi.  Q or q is a keyboard equivalent.
308
309 <DT><SAMP>`Reset'</SAMP>
310 <DD>
311 Resets xshogi to the beginning of a shogi game.  It also deselects any
312 game or position files.
313
314 <DT><SAMP>`Flip View'</SAMP>
315 <DD>
316 inverts the view of the shogi board.
317
318 <DT><SAMP>`Hint'</SAMP>
319 <DD>
320 displays a move hint from gnushogi.
321
322 <DT><SAMP>`Load Game'</SAMP>
323 <DD>
324 plays a game from a record file.  If no file is specified a popup dialog
325 asks for a filename.  Game files are found in the directory named by the
326 SHOGIDIR environment variable.  If this variable is not declared then
327 the current directory is used unless the file name starts with a /.  G
328 or g is a keyboard equivalent.  The game file parser will accept almost
329 any file that contains moves in algebraic notation.  If the first line
330 begins with `#', it is assumed to be a title and is displayed.  Text
331 enclosed in parentheses or square brackets is assumed to be commentary
332 and is displayed in a pop-up window.  Any other text in the file is
333 ignored.
334
335 <DT><SAMP>`Load Position'</SAMP>
336 <DD>
337 sets up a position from a position file.  If no file is specified a
338 popup dialog asks for a filename.  Position files are found in the
339 directory named by the SHOGIDIR environment variable.  If this variable
340 is not declared then the current directory is used unless the file name
341 starts with a /.  Position files must be in the format that the Save
342 Position command writes.
343
344 <DT><SAMP>`Save Game'</SAMP>
345 <DD>
346 saves a game to a record file.  If no file is specified a popup dialog
347 asks for a filename.  If the filename exists, the user is asked whether
348 the current game record is be appended to this file or if the file
349 should be replaced.  Game files are saved in the directory named by the
350 SHOGIDIR environment variable.  If this variable is not declared then
351 the current directory is used unless the file name starts with a /.
352 Game files are human-readable, and can also be read back by the Load
353 Game command. Furthermore, they are accepted as gnushogi text bookfiles.
354
355 <DT><SAMP>`Save Position'</SAMP>
356 <DD>
357 saves a position to a position file.  If no file is specified a popup
358 dialog asks for a filename.  Position files are saved in the directory
359 named by the SHOGIDIR environment variable.  If this variable is not
360 declared then the current directory is used unless the file name starts
361 with a /.  Position files are human-readable, and can also be read back
362 by the Load Position command.
363
364 <DT><SAMP>`Machine White'</SAMP>
365 <DD>
366 forces gnushogi to play white.
367
368 <DT><SAMP>`Machine Black'</SAMP>
369 <DD>
370 forces gnushogi to play black.
371
372 <DT><SAMP>`Force Moves'</SAMP>
373 <DD>
374 forces a series of moves.  That is, gnushogi stops playing and xshogi
375 allows you to make moves for both white and black.
376
377 <DT><SAMP>`Two Machines'</SAMP>
378 <DD>
379 plays a game between two computer programs.
380
381 <DT><SAMP>`Forward'</SAMP>
382 <DD>
383 moves forward through a series of remembered moves.  F or f is a
384 keyboard equivalent.
385
386 <DT><SAMP>`Backward'</SAMP>
387 <DD>
388 moves backward through a series of remembered moves.  As a side effect,
389 puts xshogi into Force Moves mode.  B or b is a keyboard equivalent.
390
391 <DT><SAMP>`Pause'</SAMP>
392 <DD>
393 pauses the clocks or (in Load Game mode) pauses the game being loaded.
394 Press Pause again to continue.  P or p is a keyboard equivalent.
395
396 <DT><SAMP>`Edit Position'</SAMP>
397 <DD>
398 lets you set up an arbitrary board position.  Use mouse button 1 to drag
399 pieces to new squares, or to delete a piece by dragging it off the board
400 or dragging an empty square on top of it.  To drop a new piece on a
401 square, press mouse button 2 or 3 over the square.  This brings up a
402 menu of black pieces (button 2) or white pieces (button 3).  Additional
403 menu choices let you empty the square or clear the board.  You can set
404 the side to play next by clicking on the Black or White indicator at the
405 top of the screen.
406
407 <DT><SAMP>`Challenge'</SAMP>
408 <DD>
409 allows to make a two display game between two human players.  Enter the
410 display you want to connect to.  If you are allowed to connect, a new
411 board is displayed at the remote display.  Challenge mode can only be
412 stopped by pressing "quit".
413
414 <DT><SAMP>`Select Level'</SAMP>
415 <DD>
416 allows to reset the clocks for both players.  Enter the number of moves
417 and the number of minutes in which the moves should be done.
418
419 <DT><SAMP>`Move NOW'</SAMP>
420 <DD>
421 force computer to stop thinking and to make the current best move.
422
423 <DT><SAMP>`Iconify I, i, C or c'</SAMP>
424 <DD>
425 iconifies xshogi.
426
427 </DL>
428
429 <P>
430 LIMITATIONS
431
432
433 <P>
434 If you press the  Pause  button  during  GNU  Shogi's  turn,
435 xshogi will stop the clocks, but gnushogi will still make a
436 move.
437
438
439 <P>
440 After a mate or draw when playing against gnushogi, if  you
441 back  up  with  the  Backward  button,  the clocks are reset
442 (because gnushogi has exited and must be restarted).
443
444
445 <P>
446 The game parser recognizes only algebraic notation.
447
448
449 <P>
450 AUTHORS
451
452
453 <P>
454 Original authors of XBoard:  Chris Sears and Dan Sears.
455
456
457 <P>
458 Enhancements for XBoard (Version 2.0):  Tim Mann.
459
460
461 <P>
462 Conversion to XShogi (Version 1.1):  Matthias Mutz.
463
464
465 <P>
466 Current maintainer: Mike Vanier.
467
468
469 <P>
470 COPYRIGHT INFORMATION
471
472
473 <P>
474 XShogi borrows its piece bitmaps from CRANES Shogi.
475
476
477 <P>
478 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
479 Enhancements Copyright 1992 Free Software Foundation, Inc.  Enhancements
480 Copyright 1993 Matthias Mutz.  Further enhancements copyright 1999 by
481 Michael Vanier and the Free Software Foundation, Inc.
482
483
484 <P>
485 The following terms apply to Digital Equipment Corporation's copyright
486 interest in XBoard:
487
488
489 <P>
490 All Rights Reserved
491
492
493 <P>
494 Permission to use, copy, modify, and distribute this software and its
495 documentation for any purpose and without fee is hereby granted,
496 provided that the above copyright notice appear in all copies and that
497 both that copyright notice and this permission notice appear in
498 supporting documentation, and that the name of Digital not be used in
499 advertising or publicity pertaining to distribution of the software
500 without specific, written prior permission.
501
502
503 <P>
504 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
505 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
506 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
507 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
508 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
509 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
510 SOFTWARE.
511
512
513 <P>
514 The following terms apply to the enhanced version of XShogi distributed
515 by the Free Software Foundation:
516
517
518 <P>
519 This file is part of XSHOGI.
520
521
522 <P>
523 XSHOGI is distributed in the hope that it will be useful, but WITHOUT
524 ANY WARRANTY.  No author or distributor accepts responsibility to anyone
525 for the consequences of using it or for whether it serves any particular
526 purpose or works at all, unless he says so in writing.  Refer to the
527 XSHOGI General Public License for full details.
528
529
530 <P>
531 Everyone is granted permission to copy, modify and redistribute XSHOGI,
532 but only under the conditions described in the XSHOGI General Public
533 License. A copy of this license is supposed to have been given to you
534 along with XSHOGI so you can know your rights and responsibilities.  It
535 should be in a file named COPYING.  Among other things, the copyright
536 notice and this notice must be preserved on all copies.
537
538
539 <P></P><HR>
540  [<A HREF="gnushogi_toc.html">Contents</A>] &#160; [<A HREF="gnushogi_17.html">Back</A>] &#160; [<A HREF="gnushogi_17.html">Prev</A>] &#160; [<A>Up</A>] &#160; [<A HREF="gnushogi_19.html">Next</A>] &#160; [<A HREF="gnushogi_19.html">Forward</A>] &#160;
541
542 </BODY>
543 </HTML>