![]() |
LaMoSca v0.03The WinBoard interface |
Objective
This means that command input has to be changed so that game input can come not only from the computer console but also through the interface's protocol. In addition, the software must be able to generate moves on its own in order to start playing chess, even if with limited abilities. Using the programConfiguring WinBoardThe engines that WinBoard can use are described in the file "winboard.ini". If the software has been compiled in the directory "C:\Programmi\LaMoSca\" of the computer, the configuration file will have to be updated with entries like these:
/firstChessProgramNames={GNUChess Running from the command lineYou can write a batch file that runs WinBoard and passes the engine information as parameters. A command for batch execution could look like this: C:\Programmi\Winboard\Winboard -debug /cp /fcp="wcrafty-18.10.exe log=off" /fd="C:\Programmi\Crafty" /scp="LaMoSca" /sd="C:\LaMosca\" Note the "-debug" parameter, which makes WinBoard write the file "winboard.debug", containing all the information exchanged during the game through the protocol between the interface and the chess programs. The codeThe WinBoard protocolThe information exchanged between WinBoard and the engines follows a protocol that defines the allowed commands and their format. The protocol has several versions, but the program uses the first one, which is the simplest. The main sequence of commands is the one that starts the engine at the beginning of the game:
During the game the opponent's moves (a human or a second engine) are passed by the interface as coordinates (e.g. "e2e4"), while the engine sends its own moves with the move command (e.g. "move e2e4"). |
|
edit |
Another useful instruction for debugging is the edit command, which sets up the board in a specific position, typically to reproduce game situations in which errors occurred. With WinBoard, positions stored in ".fen" files can be loaded from the menu "File" - "Load Position ...". For the position shown in the picture, the output sent to the chess program, which can be read in the file "winboard.debug", is shown alongside. The same sequence of commands can also be passed to the software from the computer console (without WinBoard), either by typing it or by copying and pasting it. |
Generating the program's movesUntil an evaluation function is written to choose the most suitable move according to the position of the pieces on the board, the chess program's moves are for now chosen at random among the possible pseudo-legal ones. |
DownloadTo be completed
To do
|
Links |
| Back | Index | Next |