Interface to Engine

cxboard VERSION

This command is sent immediately upon starting the engine and opening a communication port. The version is the highest version number of the protocol that the GUI understands.


Enter forced mode.

In forced mode the engine will not make any moves without being told to, will check all moves for legality, will not ponder until told to, will stop and ignore its own internal clocks, will begin responding to the "go" command.


Only valid in force mode. Start calculating on the current position.

There are a number of commands that can follow this command, all will be sent on the same string. If a command is not sent its value should be assumed as to not influence the search.

* searchmoves <move1> ... <movei>

Restrict the search to only these moves.

* ponder

Begin searching in ponder mode. Switch to standard search mode upon recieving the next move command.

* rtime <X>

Red has X msec left on the clock.

* btime <X>

Black has X msec left on the clock.

* mtime <X>

Moves must be limited to X msec in time.

* otime <X>

The is X msec on the overtime clock.

* movestogo <X>

There are X moves left until the next time control. If you don't get this then clocks are game clocks.

* depth <X>

Limit the search to X ply not including quescence.

* nodes <X>

Limit the search to X nodes.

* mate <X>

Search for a mate in X moves

* movetime <X>

Search for exactly X mseconds

* infinite

Search until the "stop" command. Do not exit the search without being told to in this mode.


Leave force mode if in it, set the engine to play the color that is on move, associate the engine's clock with the color that is on move, associate the opponent's clock with the color not on move, start the engine's clock, start thinking and eventually make a move.


Leave force mode if in it, set the engine to play the color not on move, associate the engine's clock with the color not on move, associate the oppenent's clock with the clock on move, start the opponent's clock, if pondering is available begin pondering, when a move is recieved begin thinking and eventually make a move.

move MOVE

Check the supplied move for legality and make the move on the internal board if legal to do so. Stop the clock on move, begin the clock not on move, switch color to move. If new color to move in the engine's color, and not in force mode, begin thinking and eventually make a move. If new color is opponent's color and not in force mode then take move back and reply with error (you can check this before making the move).


Stop thinking and make a move immediately.


Only valid in force mode. Stop calculating as soon as possible, reply with a bestmove command.


This is used to synchronize the engine and GUI. When the GUI has sent a series of commands that may take some time to complete this command can be used to wait for the engine to be ready again or to ping the engine to see if it is still living. This command must always be answered with "readyok".

setoption name <id> [value <X>]

This command is sent to the engine when the user wishes to change its internal parameters. For the "Button" type no value is needed. One string will be sent for each parameter and this will only be sent when the engine is waiting. The name of the option in <id> must not be case sensitive.

position [cfen <fenstring> | startpos ] moves <move1> ... <movei>

Set up the position described and make the moves on the internal chess board. If the game was played from the starting position the string "startpos" will be sent.

debug [ on | off ]

Switch the debug mode on/off in the engine. In debug mode the engine should send additional infos to the GUI. This mode should be switched off by default and this command can be sent at any time.


The engine's opponent offers the engine a draw. To accept the draw, send "offer draw". To decline, ignore the offer (that is, send nothing). Continue playing until the interface tells you the game is over. See also "offer draw" below.


After the end of each game, the interface must send the engine this command. RESULT is either 1-0, 0-1, 1/2-1/2, or * to indicate if the game was won by red, by black, a draw, or not finished.


request a hint from the engine, the engine should respond with "info hint xxxx" where xxxx is the recommended move, or it should ignore the command if there is no hint to make or if the command is not implemented.


back up one move. The interface must always put the engine in force mode before sending this command. It is recommended that this command be denied if not in force mode.


retract the last move made by the color on move. In other words undo the last 2 moves, one for each player. This command can be used in any mode.


Tell engine it's opponent's name.


Tells the engine that it is playing another engine and not a human. Engines will often drop expensive strategic evaluation in favor of speed and depth when playing another engine.

pause, resume

in pause mode the engine must not think, ponder, or otherwise consume significant CPU time. The current thinking or pondering is is suspended and both player's clocks are stopped. The only command that can be sent in this state is the resume command; the engine resumes in the same state it was in when it entered pause mode.


The engine should reply with an info command representing it's score of the current position.


Set the clocks of both players. GAMECLOCK is the total time available for the game for each side, MOVECLOCK is the maximum amount of time that can be used for a single move, and OVERTIME is the amount of time available to make each move after the GAMECLOCK has run out. Times are in minutes or minutes and seconds.

Examples: "clock 60 1 :30" - 5 minutes to play, 1 minute to move, 30 second overtime