Belofte - Manual
This file references belofte version 0.9.1 from 19/06/2017 on,
belofte last updated: 27/06/2017
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
Belofte can be used in different ways.
- It can be run from the command line.
- It can be used with a number of programs. The way it integrates
with those programs will depend on the program used.
- It can be run from a script that will launch XBoard using the
- It can be run from a script that will launch XBoard using the zippy
interface and the engine to connect to ICS.
Command line parameters
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.
Belofte uses positional command line parameters.
It is launched with following parameters:
>belofte standard -i rcfilename -e epdfile
|0||belofte on Linux/Mac, belofte.exe on Windows|
|1||standard or xboard or -xboard||standard|
|2||-i or /i||-i|
|4||-e or /e||-e|
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
- xboard: a configuration file is coming soon
- eboard: Belofte can be configured from within the user
interface of eboard.
- arena: Arena comes preconfigured with belofte. The only thing
you need to do is to add the engine using the engine menu of
- Winboard: a configuration file is coming soon
- Arena: Arena comes preconfigured with belofte. The only thing
you need to do is to add the engine using the engine menu of
On Mac OS X
- xboard: Open the package and copy belofte into the
Contents/Resources/bin folder. Edit the
Contents/Resources/etc/xboard.conf file to make reference belofte.
A configuration file is coming soon.
- Sigma chess: On previous versions of Mac OS X (pre 10.6), Sigma
has the ability to configure belofte from within the UI. Just
add belofte to the list of programs.
Untested at this moment.
This section applies for using the program from the command line
or when integrating the program with a Xboard compatible application.
The application supports all standard Xboard commands. Please
refer to the xboard engine interface description for more
details. The most useful commands can be found when giving the
xboard (version 1)
Move now if computer is thinking. If computer is not thinking, no-op.
Set engine to play white, assuming player plays black.
Set computer engine off for both black and white. Turn ponder off.
Set computer engine for current player to move, start thinking.
It will list all sensible commands that can be used in the version of
the interface. Only a few commands are depending on the version
of the interface however. Even if in a certain version of the
interface a certain command is not listed through the help command, it
does not mean that it cannot be used.
The exceptions of the commands that depend on the version of the
interface are listed in the 'protover command' section.
Set player name.
Start a new game. Reset some parameters. If nobd is given,
the board is not printed.
Toggle random mode, off by default.
Undo move twice, computer remains with same colour.
Store game result.
Undo last move. Assumes a preceding force command was received.
Belofte will return an error if force mode is not in effect.
Change to xboard mode. No prompt nor board output.
Please note that this command can be omitted if belofte is
launched with -xboard parameter as explained above.
It is not possible to undo this command.
Set engine to play black, assuming player plays white.
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.
Enter analyze mode. Currently unimplemented.
Show all book moves. Attention, in the specification, bk is
implemented differently. Belofte differs from the standard by not
implementing the standard.
Indicate opponent is a computer. Changes random setting.
Draw offer. Currently unimplemented.
Set pondering off. It is working but pondering is not
being used afterwards.
Start edit mode. Currently unimplemented.
Computer returns hint. Currently unimplemented.
level <n> <n>[:<n>] <n>
Indicates a level. At this moment, the implementation is incomplete.
Turn off pondering output.
Indicates time available to the adversary. Unused at this moment.
Turn on pondering output. At this moment, not much is output.
rating <n> <n>
Set players rating. Not used.
Search to a fixed depth. Not implemented at this moment according
to standard. Sets absolute search depth, except for quiescence
extension that is still possible beyond that.
Search to a maximum time. Not implemented at this moment.
Indicates time avaible to the program for move calculation.
At this moment, this is converted into a sd command with an estimated
depth that will correspond approximately to the time being used.
Beware, on slower machines, this calculation might not be correct.
Protover 1 command summary
This format is here for old winboard/xboard implementations.
It is strongly adviced to use version 2 instead.
Alphabetical list of commands: ?, analyze, bd, black, both,
draw, easy, edit, exit, force, go, hard, help, hint, level, name,
new, nopost, otim, post, protover, quit, random, rating, remove,
result, sd, st, time, uci, variant, white, xboard
winboard version 2 command extension
Set hostname for ics server.
Keepalive message, engine responds with pong <n>.
Set computer engine for opponent player to move, start pondering.
Accepts parameters 1, 2, 4. The list of commands below available
depends on which protover is selected. By default, protover 1 is
active. Winboard/xboard will issue the protover 2 command
when initialising the engine.
Initialise the board with a FEN position. Please refer to the
specific section on FEN strings for more information.
Move is in position notation. e.g. e2e4, e1g1
Protover 2 command summary
Default format for Winboard/xboard. Not implemented in full
at this moment but work is in progress. Please note that some commands
of version one have been dropped. e.g. analyze, edit, ...
Following commands from v1 and v2 are supported:
?, accepted, bd, both,
computer, easy, force, go, hard, help, ics, level, name, new,
nopost, otim, pause, ping, playother, post, protover, quit,
random, rejected, remove, result, resume, sd, st, time,
setboard, uci, undo, usermove, variant,
belofte commands (protover 4)
Read and execute all commands from file in parameter. Please note
that passing -i inputfilename.rc when launching the application
will have the same effect.
Please note the space before the parameter. It is mandatory.
This command will create an opening book based on the pgn file
supplied. Please refer to the section on opening books for more
Evaluate the previous position again and see if the same result is
obtained. Most useful is issuing this command when there are
multiple moves that can be selected because they are all considered
equal. Possibly another move will be selected.
Another use is when analysing the game, to make sure that a search is
performed with different parameters that can be set before issuing
It is an equivalent for: 'undo' and 'go'.
Show the static position evaluation of the current position.
Show the game history on the command line.
It will list all files except hidden files in current folder. When
given an extension, will list all files matching the extension. No
wildcards supported. The matching pattern is litteral.
eg. ls .epd
Parse an epd file. Please refer to the section on epd files for
It will save the file as a pgn file until the current position.
eg. save mybestgame.pgn
Protover 4 command summary
Belofte specific version. Some specific commands are not supported.
Default protocol if running in debug mode.
Alphabetical list of commands: ?, @, about, accepted, again,
alg, bd, bk, both, computer, createbook, eval, force, game, go, help,
info, level, load, loadbook, ls, name, new, nopost, post,
protover, quit, remove, result, save, sd, st, setboard,
Following commands are currently not implemented or
not present at all.
Formats used in the application.
Please refer to the FEN manual. ... more to come soon ...
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 .belofterc 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/belofte.rc
# all platforms: .belofterc
# 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
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
Please refer to the PGN
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.
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:
- Each position starts with a FEN string excluding the last ply
- On each next line, the SAN move is listed, together with its
statistics. All data is separated by a space. The
statistics are in following order:
- The number of times this move is played, the number of times
the number of times black won, the number of times a draw was
concluded, the number of total moves after this move in the games
- When there are no more opening moves available, there is a blank
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 notation needs to be very strict. Only correct
abbreviated SAN notation is supported. This is the SAN export
notation. There must not be any from field character added when
this is not required. Please refer to the SAN manual for more
information on this notation.
- The game tag needs to have a header tag with the result filled
in. If the result is not filled in, the game is skipped and the
next game is read.
- The game must not have annotations.
- The space in between the move number and the move itself is
optional. (In order to allow the GNUchess book 1.00 to be read.)
The program will create a cache version of the opening book.
This version will be used if available instead of the ASCII book for
Opening book cache format
To be completed...
About EPD files
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
Using EPD files
From within the command line option, enter epd followed with 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.
Belofte supports comments started with the hash '#' and
semi-column ';' character.
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 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.
//end of manual