tsito - XiangQi (Chinese Chess)
tsito [-cxboard] [-red] [-blue] [-nobook] [-depth
search-depth] [-ts hash-table-bits]
Tsito plays XiangQi against the user or it referees two players.
It can be used on the console (or an xterm) or can communicate through pipes
to a GUI frontend. If used in a console it uses ASCII characters to display
the board on the screen.
- -cxboard
- Tells tsito that it is communicating to a GUI, not a user. Output is less
user friendly and more pragmatically useful.
- -red
- Tells tsito to play red.
- -blue
- Tells tsito to play blue; the default.
- -nobook
- Tells tsito not to use an opening book.
- -depth
search-depth
- Tells tsito the maximum depth to use for searching the game tree. More
means better play but slower responce.
- -ts
hash-table-bits
- Tells tsito how many bits to use for indexing in the transposition table.
The size of the table will be 2^hash-table-bits elements wide.
- MOVE_TEXT
- Moves can be entered at the prompt in place of commands. These moves are
interpreted as the user's move and are made up of exactly 2 sets of 2
characters without any spaces. Each set of characters represent a square
on the board, with the first set being the origin and the second being the
destination. Ranks are labeled by numbers from 0-9 and files are letters
from a-i; character sets are composed of file followed by rank. Moves are
not case sensitive.
Example: h2e2 - This is the common opening move of red's right
cannon moving to the center of the board.
- cxboard
- Tell tsito to start talking to a GUI.
- console
- Tell tsito to start talking to a human.
- red
- Tell tsito that the human player is red, tsito will play blue.
- blue
- Tell tsito that the human player is blue, tsito will play red.
- force
- Enter force mode; computer plays niether color and only checks entered
moves for legality.
- sd depth
- Use max depth of 'depth' for search tree.
- post
- Display thinking.
- nopost
- Stop displaying thinking.
- vomit
- Prints the starting position, the current position, and entire move
history for the current game to stderr.
- go
- Tell the engine to start playing the side to move.
- force
- Place the engine into 'force' mode. Engine plays neither side but acts as
a referee.
- undo
- Take back the last move. This command is only available in force
mode.
- remove
- Take back the last two moves - in other words take back YOUR last move.
This command can be used in any mode.
- ?
- If the engine is thinking about its next move this command forces it to
make a move right now.
- st seconds
- Sets the count in seconds available for each side to make a single move.
Counter is reset each time a legal move is made. If either side runs out
of time during their move then the game is lost.
- time
- Shows the time available.
- t
- Shorthand for the 'time' command.
- new
- Resets the board to the default starting position and starts a new
game.
- setboard
cfen
- Sets the board based on the supplied 'cfen' notation position description
and starts a new game. The supplied argument must match the 'CFEN'
description below.
- set option value
- Sets engine specific option to value.
- search
value
- Sets the search method to use for finding computer moves. Available values
are: mtd - Very fast but not particularly stable (as in sometimes
makes questionable moves). alphabeta (default)- Slow but very
stable. negascout - Medium speed, questionable stability.
- nullmove
on/off
- If this option is on (default) then the engine will use null moves to
speed up the search.
- verifynull
on/off
- If this option is on (default) then tsito will increase the null move
reduction factor and verify all null move cutoffs. This increases search
stability at some cost to the speed gained by the null move.
- hash on/off
- If this option is on (default) then tsito will use a transposition table
to greately reduce the amount of search nodes that must be evaluated by
saving calculations already made and using those values if the same
position is found again.
- hashadjust
- If this option is on (off by default) then when tsito finds a position
that it has seen before but has not search to the depth it wants to now it
will adjust the alpha-beta window to try and increase cutoffs. This can
cause some conflicts with null moves and is considered an unstable option.
This option has no effect if the search method is mtd.
- iterative
- If this option is on (default) then tsito will search depths incrimentaly
so that moves are ordered better. It is actually faster to search to each
depth up to max depth instead of just searching to max depth the first
time.
CFEN is my own version of the standard FEN notation altered to
represent a chinese chess position. Like FEN it consists first of a string
of characters representing the layout of the board. This string starts at a9
and stops at i0 (blue to red, left to right from red's side). Emty spaces
are represented by integers that count how many consecutive spaces are
empty. Pieces are represented by their respective character, blue is lower
case whereas red is uppercase. Each rank is separated by a '/' character and
space counts do not span multiple ranks. Folowing this layout description is
a space followed by a 'b' or 'r' representing the side to move. Since there
are no castling or en-pasant rights in chinese chess, these are not
implemented. The half move count is also ommited.
Example:
r2Rka1hr/4a4/e3e3c/p1p1C1p1p/9/6P2/P1P1P3P/2H3H1E/3RA4/1cEK1A3 r
Pieces:
Pp - soldier (pawn)
Cc - canon
Rr - cart (rook)
Hh - horse
Ee - elephant
Aa - guard (advisor)
Kk - general (king)
The command set used in tsito is modeled after the xboard protocol
by Tim Mann, which can be viewed at
http://www.tim-mann.org/xboard/engine-intf.html
When using null window search methods like mtd and negascout then
sometimes a null move can end up in the primary line. This happens rather
often and on not so rare occasions it effects the search poorly. The only
way to get rid of the bug is to either not use these search methods or turn
off null move heuristics. I decided to leave that up to you, the user. If
you find that it is often making stupid moves and you are beating it
regularly because of this, try turning null moves off or using alphabeta as
the search method. You may need to lower the search depth if you do this.
Using null move verification does help quite a bit but does not get rid of
the problem all together.
This man page writen by Noah Roberts
The origional tsito XiangQi engine was written by Noah Roberts as
part of his senior project while enroled in the Computer Science department
at St. Martin's College and Abby. The other members of the team, Scott
Christian and Anthony Czyk, contributed related works including a Win32 GUI
and documentation.