miguel-ambrona / deadpos

A tool for analyzing chess compositions based on dead reckoning
GNU General Public License v3.0
2 stars 0 forks source link

Deadpos Analyzer 2

C/C++ CI

Tool for designing, analyzing and solving chess compositions based on dead reckoning.

Installation

Make sure you have opam and python-chess, which you can install with:

Then, after cloning the repository and from the src/ directory:

  1. Run make get-stockfish to download and compile Stockfish. Then install Stockfish with sudo make install-stockfish.

  2. Run make get-cha to download and compile CHA. Then install CHA with sudo make install-cha.

  3. Run make get-sherlock to download and build our retraction and legality engine.

  4. Compile the tool with make. (You may need to enable shared libraries with sudo /sbin/ldconfig -v first.)

  5. Make sure everything worked fine by running make test.

Usage

After completing the installation steps, run the tool with python3 deadpos.py from the src/ directory. This will start a process which waits for queries from stdin. A query must be a valid FEN, followed by a list of commands separated by >>=. (Input lines starting with // are ignored.)

The following commands are supported. They are all functions applied to a position, which return a list of objects (typically, positions).

For example:

// Julio Sunyer, 1923 (The Chess Amateur)
>>> 4k3/8/8/7K/8/8/8/8 b - - >>= r >>= r >>= h#1
↶Kg6xRh5 ↶Rh8xQh5 O-O Qh5-h7# 5rk1/8/6K1/7Q/8/8/8/8 w - - 1 2
nsols 1

// Andrew Buchanan, 2001 (1 Retros mailing list 24th Jan)
>>> k7/8/2K5/8/8/8/8/8 ? >>= legal >>= turn
b
nsols 1

Further details

Feedback

Please, open an issue if you have any suggestions.

Enjoy!