The origins of this little chess engine date back to 16th October 2002 and it has just recently risen from the grave. It plays well enough for scholastic chess and to demonstrate that most often the way to win is not making really good moves, but just avoiding bad ones :)
About
This is a basic chess engine (in C) that is able to play game from console and via CECP (XBoard) protocol. It should perform on the level suitable mostly for scholastic chess -- always looking only 4 plys ahead and without extensions it can be beaten in the opening, middle game and end-game :). It supports randomization (e.g. CECP ``random`` that is sent by default when new game starts) for varying play.
It is monstrous only so far as it has risen from the grave, not with regard to its monstrous playing "quality". Its origins date back to 16th October 2002 when I started writing it -- however it was thrown out after about a half-month of messing with it as my C-code ran into obscure crashes and memory errors that I was not able to trace back at the time. I was reminded of that program by a friend and I managed to locate its source code and went in to make a "quick bug fix". First errors I truly located easily with better tools of 2020, but one mysterious crash took long to track down and then I was already hooked in trying to make "simple" fixes to the program, which contained pretty much every error and oversight that can occur when writing chess engine from scratch:
* It strongly preferred stalemating to checkmating -- as the king capture was initially allowed and stalemate situations resulted in better material position.
* When it was ahead by too much and pretty much nothing threatened it, it never moved towards actual win -- plan was totally missing and principal variation remembrance badly desired.
* Since it was totally deterministic, it managed to end up in positions with 4 queens and 2 rooks vs single king and still not being able to checkmate.
* While king capture was allowed, it managed to do totally mysterious move choices due to the fact that apparently it internally quite often managed to find situations where both kings were taken off the board and then the rest of the material battled on.
So all in all much more time was spent on this than planned :), and now the Monchester is unleashed upon the world.
This is a basic chess engine (in C) that is able to play game from console and via CECP (XBoard) protocol. It should perform on the level suitable mostly for scholastic chess -- always looking only 4 plys ahead and without extensions it can be beaten in the opening, middle game and end-game :). It supports randomization (e.g. CECP ``random`` that is sent by default when new game starts) for varying play.
It is monstrous only so far as it has risen from the grave, not with regard to its monstrous playing "quality". Its origins date back to 16th October 2002 when I started writing it -- however it was thrown out after about a half-month of messing with it as my C-code ran into obscure crashes and memory errors that I was not able to trace back at the time. I was reminded of that program by a friend and I managed to locate its source code and went in to make a "quick bug fix". First errors I truly located easily with better tools of 2020, but one mysterious crash took long to track down and then I was already hooked in trying to make "simple" fixes to the program, which contained pretty much every error and oversight that can occur when writing chess engine from scratch:
* It strongly preferred stalemating to checkmating -- as the king capture was initially allowed and stalemate situations resulted in better material position.
* When it was ahead by too much and pretty much nothing threatened it, it never moved towards actual win -- plan was totally missing and principal variation remembrance badly desired.
* Since it was totally deterministic, it managed to end up in positions with 4 queens and 2 rooks vs single king and still not being able to checkmate.
* While king capture was allowed, it managed to do totally mysterious move choices due to the fact that apparently it internally quite often managed to find situations where both kings were taken off the board and then the rest of the material battled on.
So all in all much more time was spent on this than planned :), and now the Monchester is unleashed upon the world.
Usage
If used from console, ``new`` command starts new game, ``resign`` resigns and moves must be entered in full algebraic coordinates, e.g. ``e2e4``, promotions
must be denoted by following lowercase letter, e.g. ``e7e8q``.
If used as engine via CECP (XBoard) protocol, the standard engine installation
procedures should apply. In case of XBoard, it can also used from command line
with ``xboard -fcp location-of-monchester-binary``.
If used from console, ``new`` command starts new game, ``resign`` resigns and moves must be entered in full algebraic coordinates, e.g. ``e2e4``, promotions
must be denoted by following lowercase letter, e.g. ``e7e8q``.
If used as engine via CECP (XBoard) protocol, the standard engine installation
procedures should apply. In case of XBoard, it can also used from command line
with ``xboard -fcp location-of-monchester-binary``.
Compilation
The program should compile under Linux and Mac OS X, most likely under Windows too, but I have not had a chance to test it. Precondition is presence of ``make`` and ``gcc`` C-compiler or compatible compiler symlinked as ``gcc`` (clang) -- in all my computer clang produces MUCH faster binary than ``gcc``.
### Build (likely) fastest binary
* ``make CC=clang clean release``
### Build with simplest command line
* ``make clean release``
## Non-Features
Since reading around, I get a feel that every chess engine must have a long list of features, so here I present a long list of non-features:
This engine does not use, feature or support:
* Alpha-Beta
* Attack Tables
* Bitboards (rotated, magic, black magic or any other kind)
* Iterative Deepening
* Null-Move Heuristics
* Late Move Reductions
* Hash
* Razoring
* Threads
* Tablebases
* Transposition Tables
* Opening books
* NNUE
* UCI
* LMP
* NMP
* FMP
* Probcut
* SE
* SEE
* Many other things that I have forgotten or never known :)
## Compilation options
### Defines
Randomization of play can be disabled by defining:
* ```DISABLE_SCORE_RANDOMIZATION```
at build time, e.g.
```
make EXTFLAGS="-DDISABLE_SCORE_RANDOMIZATION"
```
but this is not recommended, as non-deterministic play actually gives Monchester much better chances in converting totally won endgames with major pieces, that it otherwise would draw with deterministic play. There are couple more possible defines, those interested can probably easily find out their purpose:
* ```SCORE_RANDOM_BITS```
* ```EXTRA_VERSION```
The program should compile under Linux and Mac OS X, most likely under Windows too, but I have not had a chance to test it. Precondition is presence of ``make`` and ``gcc`` C-compiler or compatible compiler symlinked as ``gcc`` (clang) -- in all my computer clang produces MUCH faster binary than ``gcc``.
### Build (likely) fastest binary
* ``make CC=clang clean release``
### Build with simplest command line
* ``make clean release``
## Non-Features
Since reading around, I get a feel that every chess engine must have a long list of features, so here I present a long list of non-features:
This engine does not use, feature or support:
* Alpha-Beta
* Attack Tables
* Bitboards (rotated, magic, black magic or any other kind)
* Iterative Deepening
* Null-Move Heuristics
* Late Move Reductions
* Hash
* Razoring
* Threads
* Tablebases
* Transposition Tables
* Opening books
* NNUE
* UCI
* LMP
* NMP
* FMP
* Probcut
* SE
* SEE
* Many other things that I have forgotten or never known :)
## Compilation options
### Defines
Randomization of play can be disabled by defining:
* ```DISABLE_SCORE_RANDOMIZATION```
at build time, e.g.
```
make EXTFLAGS="-DDISABLE_SCORE_RANDOMIZATION"
```
but this is not recommended, as non-deterministic play actually gives Monchester much better chances in converting totally won endgames with major pieces, that it otherwise would draw with deterministic play. There are couple more possible defines, those interested can probably easily find out their purpose:
* ```SCORE_RANDOM_BITS```
* ```EXTRA_VERSION```
Monchester 0.99 download
All files (games, tables and engines) - download from page
Comments
Post a Comment