Belofte - Manual

This file references belofte versions 0.9.


Belofte is a promising chess program. Belofte is a Flemish word that can be translated as 'a Promise' or 'someone with potential'. In this context, the latter is the intended meaning. The most correct translation would be 'A promising chess program'. It is pronounced as 'b-euh-loft-euh'.

Please refer to License, About, Manual or Todo

Using Belofte

Belofte can be used in different ways.

Using it in a program

This section is far from complete, it just gives some ideas about the possibilities. Please search the internet on xboard/winboard compatible programs to get a full list. A good starting point can be this list, this list and this list.

On Linux

On Windows

On Mac OS X

On the command line

Belofte can be launched without any parameters from a console on any platform. Please refer to the commands section to understand how to play. Please make sure not to double-click in a file explorer but launch from a console. On certain platforms, double-clicking will not open a console but run the application silently.

It is recommended to use bash. If you do use another shell, please make sure to verify the scripts before running.

Command line parameters

Belofte uses positional command line parameters. It is launched with following parameters:

belofte standard -i rcfilename -e epdfile
Position Description Default
0belofte on Linux/Mac, belofte.exe on Windows
1standard or xboard or -xboardstandard
2-i or /i-i
4-e or /e-e

Typical game on the command line

After having started the program, issue the following commands:

belofte> new
belofte> usermove d2d4
  (wait for program to play its move)
belofte> usermove g1f3
  (wait for program to play its move)
belofte> quit

Type help on the command line to have a list of commands.

Supported commands

This section applies for using the program from the command line or when integrating the program with a Xboard, Winboard or UCI compatible application.


WB1: supported on Winboard and Xboard 1
WB2: supported on Winboard and Xboard 2
WB4: Winboard 4.4 specific commands
B4: extended protocol for command line
UCI: UCI protocol (version 04-2006)

xboard (version 1) unimplemented

Following commands are not implemented according to the standard. The implementation allows in any case standard game to be played with an xboard application.

xboard (version 2) unimplemented

Following commands from xboard v2 are not implemented:

uci unimplemented

Universal chess interface. Following UCI commands are not implemented:

belofte (protover 4) additional commands

Following special commands are supported when the command protover 4 is issued.

Belofte (protover 4) command summary

Belofte specific version. Some specific commands (*) are not supported.

List of commands:

help       - show this list of commands
?          - force the computer to move now
about      - tell something about myself
accepted   - a requested feature is implemented
again      - research again from this position
alg        - select algorithm
bd         - display board
both       - set computer to play both
computer   - playing against a computer
debug      - enter debug mode [fenhistory|hashhistory|on|off|filename.ext]
easy       - do not think when not on move *
epd        - load and evaluate an file in EPD format from disk
epdpos     - evaluate epd position
eval       - give evaluation of position
exec       - execute command file
fd         - set fixed search depth mode
force      - computer plays neither side
game       - print current game
go         - computer starts playing
hard       - computer thinks all the time *
info       - get more information
level      - select level to play at
load       - load game in pgn form from disk *
ls         - list directory content
name       - give your name
new        - new game
nopost     - stop outputting search details
otim       - set opponent time
perft      - do a performance test
post       - output search details
protover   - set command interface level
quit       - leave chess program
random     - causes the computer to play randomly
remove     - undo last 2 moves
result     - set result string
save       - save game in PGN format
sd         - set maximum depth for search
st         - set level to time per move
time       - set own clock
setboard   - setup new position
undo       - undo move
usermove   - enter moves in algebraic notation
variant    - set chess variant *


Test commands

Testing scripts

The test directory contains a number of testscripts.

Formats used in the application.

FEN strings

Please refer to the Forsyth-Edwards Notation information on Wikipedia.

RC file

Contains a list of commands in a file. The file can start with a # character to indicate a comment. Comments are ignored. Please refer to the standard belofte.rc file in the distribution, content of which is listed below.
# commands in this file will be executed on lauch of program
# comments need to be preceeded by the hash symbol
# belofte will seek the file belofte.rc located in following
# locations (additive)
# linux, mac: /etc/belofte/belofte.rc, ~/belofte.rc
# all platforms: ./belofte.rc
# when reading a resource file on startup, a new command needs
# to be issued manually, if passed with nobd parameter, the
# board is not printed
protover 4
new nobd

PGN file

All played games will also be stored in a PGN file. The format of this file conforms to the same rules as the above. Use the save command to save the current game in PGN format. When starting a new game with the new command, the current game is automatically saved.

Please refer to the PGN specification (1, 2) for full details.

Reading PGN files

Lines starting with the % character are ignored.

Writing PGN files

Belofte will write at the end of each game the game in a PGN file. In case of protover 1 & 2, only tags from the STR will be written. (see specification) In protover 4, additional tags will be used.
When issueing the command save, the program will save the game immediately according to specification.
When issuing the command game, the program will print the game to screen, it will not print the tags.

Opening book

Belofte will try to read an opening book when starting a game. Only one opening book can be used at any time.

The opening book is an ASCII file with following data:

Only the first 10 moves will be read from the opening book. All other moves will be skipped. The book generation process is a slow process. Please reserve sufficient time to create your books.

Creating a book

Please refer to the createbook command for the PGN format of the file needed for creating the opening book. If you have a PGN file with all your games, you can use it to create a customized opening book.

The pgn file needs to be conform to some pgn standards:

The program will create a cache version of the opening book. This version will be used if available instead of the ASCII book for speed reasons.

A script for creating a book is included in the test folder. The script will convert the included file fide_wch_2001.pgn into an opening book compatible with the program.

Alternatively, run following command from the belofte prompt.
belofte> @createbook.rc

Opening book cache format

To be completed...

EPD files

Extended Position Description (EPD) files can best be compared to computer readable files of chess problems as printed in the press. EPD files contain a number of test positions and their expected results. The result for each test position is listed next to the problem. The format of the file is very well defined. Not all options might be implemented. The format of the file is as such that if a certain option is not implemented, the option will be ignorable. It depends on the implementation whether this unsupported option will be ignored. A missing option might render an EPD test file worthless for the given implementation.
Using EPD files

From within the command line option, enter epd followed by the fully qualified filename including extension.

belofte> epd testset1.epd

The current folder will be used if no path information is presented. The path information should be compatible with the platform the program is run on. The program will output for each test in the EPD file whether a result has been found or not. The normal log-levels of the program will be used during the parsing of the file. At the end of the test, the total number of correct results and the total number of tests will be printed.

Supported options

Belofte supports comments started with the hash '#' and semi-column ';' character at the beginning of a line. The op-codes 'id', 'bm' and 'am' are being supported. All other opcodes are being ignored.

EPD files and test results

Given the result is stored with the test, EPD files are not suited for human tests. They are very well suited to computerised tests, given the program does not cheat by reading the result. Given most programs implement epd when they want to integrate an automated test suite, we can assume programs do not cheat but use the EPD test suite to measure itself against predefined tests.

EPD result interpretation

Belofte will parse the EPD file given with the current level setting. Given belofte does not support level or time indicators in EPD files, not all EPD files are usable for belofte. Belofte will output the number of solutions found and the total number of test positions scanned. Most test-sets are based around a certain level and a score of a certain % can be translated into a certain elo level.

Using EPD positions

From within the command line option, enter epdpos followed by a single EPD position line.

belofte> epdpos EPD-position

The program will validate a single EPD position. It should not contain a hash '#' or semi-column ';' character at the start as it will ignore the rest of the line.

Other information


Please refer to file.


Term Description
CR LF Carriage return and linefeed character. Represented as hexadecimal characters 0x13 0x10.
EARS Engine Analysis Reliability Score
EPD Extended Position Description
ELO The Elo rating system is a method for calculating the relative skill of players.
FEN Forsyth-Edwards Notation
FICS Free Internet Chess Server
ICS Internet Chess Server
PERFT PERFormance Test, move path enumeration
PGN Portable Game Notation
SAN Standard Algebraic Notation
SIGINT The SIGINT signal is sent to a process by its controlling terminal when a user wishes to interrupt the process.
SIGTERM The SIGTERM signal is sent to a process to request its termination.
UCI Universal chess interface. Interface being used on most modern chess engines such as Stockfish and Fruit.

Alternative chesspiece identifier letters

Currently listed for information only, not implemented.

Language     Piece letters (pawn knight bishop rook queen king)
----------   --------------------------------------------------
Czech        P J S V D K
Danish       B S L T D K
Dutch        - P L T D K
English      P N B R Q K
Estonian     P R O V L K
Finnish      P R L T D K
French       P C F T D R
German       B S L T D K
Hungarian    G H F B V K
Icelandic    P R B H D K
Italian      P C A T D R
Norwegian    B S L T D K
Polish       P S G W H K
Portuguese   P C B T D R
Romanian     P C N T D R
Spanish      P C A T D R
Swedish      B S L T D K
//end of manual