python-chess
python-chess copied to clipboard
A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine comm...
```py import chess print(chess.__version__) board = chess.Board() board.set_fen('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1') board.push_san('e4') print(board.fen()) ``` output: 1.10.0 rnbqkbnr/pppppppp/8/8/4P3/8/PPP1PPPP/RNBQKBNR b KQkq - 0 1 the en passant sqare is not...
hello, I got a remotely running UCI chess engine (inside a docker container), however I have no idea how to communicate with it using the code snippet provided in the...
When I set a black piece on a square, I'm getting no legal and no pseudo moves. Is there a reason for this? See here below ```python def GetPieceMoves(piece_symbol, square_str,...
I’m working with checkmate patterns, so one thing is to enumerate the defenders of the adjacent-winning-color-pieces in the pattern. In the test case below, the losing king would escape checkmate...
I am trying to parse a largeish (7,000,000 games) pgn using `read_headers`. However, I only managed to scan 84,039 games before it stopped as if it finished (no error message)....
> I think only the last non-bound score and the last score (which already carries information on it being upper or lower bound) matters. > so any non-bound score supercedes...
You introduced the efficient BinaryFen in this [blog post](https://lichess.org/@/revoof/blog/adapting-nnue-pytorchs-binary-position-format-for-lichess/cpeeAMeY) on Lichess. My question is whether it would be possible to implement this in python-chess. I guess python-chess is used by...
I want to use custom SVGs for chess pieces in my project with python-chess, but I couldn't find clear documentation on how to implement this. Does the library support using...
Just click on my username and go to Mockfish. Thanks!
Can anyone add the new Stockfish 17 Win-Draw-Loss model? https://github.com/official-stockfish/WDL_model