Skip to content

Commit

Permalink
Merge branch 'syzygy', fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Mar 14, 2015
2 parents 3efd4de + 4e20dcb commit a789b34
Show file tree
Hide file tree
Showing 76 changed files with 2,000 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,22 @@ Features
>>> first_game.headers["Result"]
'0-1'
* Probe Syzygy endgame tablebases.

.. code:: python
>>> import chess.syzygy
>>> tablebases = chess.syzygy.Tablebases("data/syzygy")
>>> # Black to move is losing in 53 half moves (distance to zero) in this
>>> # KNBvK endgame.
>>> board = chess.Bitboard("8/2K5/4B3/3N4/8/8/4k3/8 b - - 0 1")
>>> tablebases.probe_dtz(board)
-53
>>> tablebases.close()
* Communicate with an UCI engine.

.. code:: python
Expand Down Expand Up @@ -287,3 +303,7 @@ full copyright and license information.

Thanks to the developers of http://chessx.sourceforge.net/. Some of the core
bitboard move generation parts are ported from there.

Thanks to Ronald de Man for his
[Syzygy endgame tablebases](https://github.com/syzygy1/tb). The probing code in
python-chess is very directly ported from his C probing code.

0 comments on commit a789b34

Please sign in to comment.