Table of Contents


bishbosh - Plays Chess


bishbosh [OPTIONS]


A chess-game which can be rendered natively in a terminal (emulator) using raw ASCII, or used as a chess-engine by a separate GUI (xboard).

It permits:

It features:


Some understanding of the algorithm used to automatically select moves, is useful either when configuring this application or when interpreting the esoteric feedback available after move-selection (given "--verbosity=Deafening"). The algorithm first compares the position with those in the referenced PGN-databases; a looser criterion than whether a matching move-sequence exists. It then partitions all matching archived positions, based on whether the current side was ultimately victorious. The next move will be selected randomly from the subset of victorious matching positions, in preference to the non-victorious subset.

On failure to match the position with an archived game, the tree of all possible moves until the end of the game, is constructed & statically sorted to advance the subsequent evaluation of capture-moves, using either or . On each move, this tree’s non-capture moves are dynamically sorted using the & the .
This tree is then searched using a algorithm with pruning, over a constant configurable number of plies, to find the optimal move according to the weighted-mean of various criteria described in section-5 of the man-pages.
Shortcuts in the search for the optimal move are taken on encountering either in the move-sequence, or transpositions ( of sibling games.



-i File-path, --inputConfigFilePath=File-path; there is no default.
Read the mandatory configuration from the specified XML-file,


-r[Int], --randomSeed[=Int]
Optionally takes an argument with which to seed the single pseudo-random number-generator used for all random operations. See "randomSeed" in section-5 of the man-pages.
In the absence of the whole field, the random-number generator will be seeded unpredictably from the operating-system. In the absence of just the argument, "0" will be inferred.
N.B.: this application only makes significant use of the random-generator when selecting a move from any configured PGN-databases (see "pgnOptions" in section-5 of the man-pages); move-selection is otherwise deterministic.


--verbosity=(Silent|Normal|Verbose|Deafening), defaulting to "Normal".
Defines the quantity of ancillary output required. See "verbosity" in section-5 of the man-pages.
Print the tree of all possible moves in the configured notation, each annotated by a fitness-evaluation for the resulting position, truncated to the specified number of plies; see section-5 of the man-pages for details.

Generic Program-information

-v, --version
Outputs version-information & then exits.
-?, --help
Displays a usage-message & then exits.


Command-line Interpreter

This application understands a simple command-language, consisting of:



0 on success, & >0 if an error occurs.


bishbosh --verbosity=Verbose -i ~/.cabal/share/*/bishbosh-*/config/Raw/bishbosh_white.xml

bishbosh --verbosity=Deafening -i ~/.cabal/share/*/bishbosh-*/config/Raw/bishbosh_black.xml
+RTS -N -H100M -RTS

xboard -fcp "bishbosh -i $HOME/.cabal/share/x86_64-linux-ghc-8.0.2/bishbosh-"


bishbosh.svgA module-dependency graph for this application.
config/{CECP,Raw}/*.xmlSample configuration-files.
man/man5/bishbosh.5Section-5 of the man-pages for this product, describing the configuration-file format.
pgn/*.pgnSample PGN-databases; .
~/.bishbosh/*.txtPersisted games, stored in a user-specific directory. A GUI for chess-engines.


Written by Dr. Alistair Ward.


Reporting Bugs

Report bugs to "".


Copyright © 2018 Dr. Alistair Ward

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .

See Also

Table of Contents