Console Mode Commands Summary


Console mode commands are partitioned into these groups:


Below is a summary of the commands available in Console Mode.  They are grouped by functionalities for easier referencing.  Command and parameters are not case-sensitive.

  Command Alias Parameters Short Description

Playing a game

auto Lets the chess engine play both colours until end of game.
go Lets the chess engine make one move for the side to move.
new variant ["normal" | "suicide" | "atomic" | "crazyhouse" | "losers"] Starts a new chess game in the specified variant.
suicide Starts a new suicide chess game.
atomic Starts a new atomic chess game.
crazy crazyhouse Starts a crazyhouse chess game.
losers Starts a losers chess games.
white Sets engine to play white.
black Sets engine to play black.
none neither Sets engine to play no colour.

Display Options

verbose post ["on" | "off" | "+" | "-" |  "?"] Sets or toggles verbose mode.  "?" shows current setting.
board Displays (one time) the current chess board.
show ["on" | "off" | "+" | "-" | "?"] Sets or toggles the automatic showing of the chess board.  "?" shows the current setting.
tags Displays the games' PGN tags
notation nota ["san" | "short" | "long" | "xboard" | "?"] Changes or displays the move's notation format.
details ["high" | "low" | "+" | "-" | "?"] Sets or toggles the opening moves' statistic details for rarely played moves.  "?" shows the current setting.
highlight hilite ["on" | "off" | "+" | "-" | "?"] Sets or toggles the colour highlighting of console display.
colour color ["on" | "off" | "+" | "-" | "?"] Aliases to "highlight"

Search Control

depth sd [N] Sets the maximum search depth to N.
time st [N] Sets the average think time to N seconds.
abwin [N] Sets the alpha-beta search window to ±N.
extend ext ["threat" | "promote" | "pawnpush" | "recap" | "forced" | "nonpv" | "sacrifice" |
"limit" ] <N>

["?"]
Sets or displays the search extension for normal chess.  <N> can be fractional.
intiterate ["on" | "off" | "+" | "-" | "?"] Sets or toggles internal iterative deepening during search.
razoring ["on" | "off" | "+" | "-" | "?"] Sets or toggles razoring/futility pruning during search.
probebook ["on" | "off" | "+" | "-" | "?"] Sets or toggles opening book probing during search.  See configuration item of the same name for details.

Moves Browsing

list Shows the moves made so far
back - [N] Goes back N moves.
forward + [N] Goes forward N moves.
first << Goes to start of game (or the initial position).
last >> Goes to end of move list.

Crazyhouse Specific

holding Shows the pieces being held by both sides.
promoted Shows which squares that contain a promoted piece.

Hints

hints [N] Evaluates all moves to depth N and display the sorted results.
examine exam <MOVE> Evaluates a single move until think time's up or set depth reached.

Position Information

legal List all legal moves from the current position.
score Display a simple material + positional score.  The score is only meaningful in normal/wild chess games.
eval = Performs a static evaluation of the position.  Can be used for all variants.
pawns Displays information about the pawn structure.
attackers attk <S> Displays all legal attackers on square S.
eco Displays the ECO code and name of the current position.

Game Annotation

anno annotate <outfile> [N] ["append"] Performs game annotation from the current position to move number [N] or the end of game if [N] is not specified.

If "append" is specified then the output is appended to the output file instead of creating a new one.  The output is an ASCII text file.
xmlanno xanno <outfile> [N] ["append"] Similar to "anno" above but output is an XML formatted file.

Opening Books

book ["on" | "off" | "+" | "-" | "?"] Sets or toggles the use of opening book.  "?" shows the current setting.
ratio ["on" | "off" | "+" | "-" | "?"] Sets or toggles the use of win/lose ratio when selecting an opening book move.  "?" shows the current setting.
estimate <file> Estimates the amount of memory needed to create an opening book from the PGN formatted games in <file>.
makebook book> <file> [N] Creates an uncompressed opening book (for the current variant) from a PGN formatted game file, accepting the first N moves only.  An index file will be generated also if the book file is large.
reindex bkidx [N] Creates an index file ("Opening.idx") from the current book file by examining every N records.  The index file is required for books that are large.  Re-indexing works on compressed book files also.
mergebook +book <src1> <src2> <dest> Merge two uncompressed book files into a single one.
trimbook -book <src> <dest> [N] Removes positions in the source book file <src> that appeared in less than N games.  The result is written as <dest>.  Only uncompressed are supported.
bookcomp bkc Compresses the currently active opening book of the current variant.
bookdecomp bkd Decompresses the currently active opening book of the current variant.
reload ["on" | "off" | "+" | "-" | "?"] Enables, disables or toggles the reloading of the opening book after each game.

Endgame Tablebases

egtb ["on" | "off" | "+" | "-" | "?"] Sets or toggles the use of EGTBs.  "?" shows the current setting.
egtbgen <name> | "2" | "3" | "4" | "5" | "all" ["comp"] Generates EGTB file(s) for the specified pieces or generates 2, 3, 4 or all the EGTB files automatically.  Output are saved according the the EGTB file structure with the base directory specified in a configuration item.  Existing files are NOT overwritten.  Specify "comp" if only compressed files are to be generated.
egtbcomp egtbc <name> | "2" | "3" | "4" | "5" | "all"

<pattern> ["2" | "3" | "4" | "5"]
Compresses the specific (or all) the EGTB files.  The uncompressed files are NOT deleted.

Compresses the files that has matching EGTB name pattern for a given piece count.  Pattern matching is the same as those used by "dir".
egtbdecomp egtbd <name> | "2" | "3" | "4" | "5" | "all"

<pattern> ["2" | "3" | "4" | "5"]
Decompresses the specific (or all) the EGTB files.  The uncompressed files are NOT deleted.

Decompresses the files that has matching EGTB name pattern for a given piece count.  Pattern matching is the same as those used by "dir".
egtbconv Converts all uncompressed V2.5.13 EGTB files into V2.5.14 ones.  The old files are overwritten with the new ones.  Only the files for the current variant will be changed.
egtbinfo <name> Displays information on an EGTB file.
egtbcache [N ["MB" | "KB"] | "file" | "mem"] Selects the use of temporary file or in memory EGTB generation method, sets the file cache size or displays the current settings.
egtbcheck egtbchk <name> Verifies the given EGTB file.
cacheegtb cacheegtbfiles ["on" | "off" | "+" | "-" | "?"] Sets or toggles the caching of recently used EGTB files during EGTB generation.  Needs a lot of memory (>128MB).

Hash Tables

hash # ["clear"] Displays hash table information or clears the hash tables.
poshash [N ["MB" | "KB"]] Displays or sets the positional hash table sizes.
pawnhash [N ["MB" | "KB"]] Displays or sets the pawn structure hash table sizes.
learnhash [N ["MB" | "KB"]] Displays or sets the learning hash table sizes.

Configuration

mkdirs Creates the default directory structures used for opening books, EGTBs, saved games and learned files.
showconfig config Displays the values of the configuration items.
saveconfig config> Saves the current setting into a configuration file "KKFChess.cfg".
loadconfig config< Reads the configuration file "KKFChess.cfg" to set the configuration items' values.

PGN Files

save pgn> <file> ["append"] Creates or appends to a PGN formatted game from the moves made so far.
load pgn< <file> [N] Loads the N'th PGN game from the given file.
chkpgn checkpgn <src> [<dest>] Validates a PGN file's games and write the valid ones to the file <dest> if required.
pgnsort <src> Creates files "WhiteWon.pgn", "BlackWon.pgn", "Drawn.pgn" and "Unknown.pgn" from the <src> PGN file by examining the "Result" tag.  The output files are stored in the current directory.
pgnsplit <src> <dest1> <dest2> Splits the <src> file into two files, each containing about half the number of games of the source.
loadnext load+ [N] Loads the next game or the N'th game after the current one in the last read PGN file.
loadprev load- [N] Loads the previous game or the N'th game before the current one in last read PGN file.

FEN / EPD Files

fen [FEN] Displays the current position in FEN string or converts a FEN string into a position.
fensave fen> <file> ["append"] Creates a FEN string from the current position then saves as or appends to the specified file.
fenload fen< <file> [N] Loads the N'th position from a file.
epd <file> [S] [N] Solves <N> positions in the EPD file, starting at the <S>'th position.  Defaults are from the first position to the last position.
epdmatches <N> Sets the number of consecutive best move matches that is required before an EPD position is solved.
chkcastle checkcastling ["on" | "off" | "+" | "-" | "?"] Enables, disables or toggles the checking of castling rights.

Piece Values

values Displays the current pieces' values.
knight [N] Displays or sets the knight's value.
bishop [N] Displays or sets the bishop's value.
rook [N] Displays or sets the rook's value.
queen [N] Displays or sets the queen's value.

Learning

learn "white" | "black" | "both" | "opt" | "clean" Learns the moves for the specified colour(s) from the current game.  If "opt" is specified then the learned files are optimised written to the current directory.

The "clean" option is used to delete the learned files for the currently selected chess game type.

Logging

log ["on" | "off" | "+" | "-" | "clear" | "?"] Sets, toggles the logging option or clears the log file.  "?" shows the current setting.

Others

fritz Used for interfacing with Fritz 6's GUI with a winboard adaptor.
xboard Enters Winboard mode.
uci Enters UCI mode.
bench benchmark "all" | "pseudo" | "legal" | "moves" | "eval" | "search" | "comp" | "nocomp" Performs simple benchmarks on pseudo legal moves generation, legal moves generation, making and unmaking of moves, position evaluation, tree search and compression/decompression.  The option "nocomp" will run all the benchmarks except compression/decompression.
help ? [TOPIC] Displays this HTML help page or the console base help file.
quit exit Terminates the program.
version Displays version information with some compile-time options.
prime <N> Finds the largest prime that is less than or equals to N.
8queens 8qs Solves the 8 queens problem.  The solutions will be displayed on the screen and also logged to the log file (if logging is enabled).
compress comp <src> <dest> Compresses the <src> file into <dest>.  As with many compression techniques, the compressed file many be LARGER than the uncompressed one if the source data is fairly random.
decompress decomp <src> <dest> Decompresses a file.
compidx ["on" | "off" | "+" | "-" | "?"] Sets, toggles or displays the creation and use of indexing blocks for compressed files.
compblksz [N] | "min" | "max" Sets or displays the blocking size to be used for file compression.
bell sound ["on" | "off" | "+" | "-" | "?"] Sets or toggles the beeping after the engine has made a move.
beep ["on" | "off" | "+" | "-" | "?"] Another alias for bell.
! <cmd> Executes the DOS / shell command <cmd>.
$ <file> Executes the commands in a script file.  Script files should not have additional '$' commands.