Chess engine: Monchester 1.0.1-26
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``.
Monchester 1.0.1-26-g271a034 compiled (for avx2/bmi2 and sse4.2/pop) from Monchester 1.0 dev branch compiled 2025-02-01 with clang 19.1.6 + gcc 14.2.0
for const. depth 5 for modern hardware (instead old default 4)
All files (games, tables and engines) - download from page
github: https://github.com/unserializable/monchester
Comments
Post a Comment