5

I am looking for a Python chess engine package. It must be fully contained in Python, I don't want to download separate files for the engine itself and link them up somehow.

All I want it to be able to do is take a FEN and provide best move. It should obviously be a strong engine, at least 2500 rating.

Rewan Demontay
  • 16,942
  • 4
  • 65
  • 109
Fourth
  • 51
  • 2
  • Possible duplicate of [Returning scores for all possible moves from a chess engine](https://chess.stackexchange.com/questions/15723/returning-scores-for-all-possible-moves-from-a-chess-engine) – Ellie Dec 04 '18 at 12:43
  • 1
    @Phonon I don't think it's a duplicate because the other answer uses Stockfish, which is not written in Python and so it is explicitly forbidden by this question. – Federico Poloni Dec 04 '18 at 13:45

2 Answers2

3

I have experience with only SunFish, but I doubt it's 2500+ level.

http://talkchess.com/forum3/viewtopic.php?f=2&t=67025

This link should help you. If you're not happy with the folks at talkchess, you probably won't find a better answer anywhere else.

ABCD
  • 22,419
  • 2
  • 43
  • 82
1

An alternative to Sunfish is PyChess: http://pychess.org/ (or https://github.com/pychess/pychess)

It's stronger than sunfish (has 2100 bullet rating on lichess: https://lichess.org/@/PyChessBot ) and also allows playing chess variants, such as antichess or fisher random.

It has a lot more code than sunfish though, so pulling it out as a separate library takes a bit more work. See also http://talkchess.com/forum3/viewtopic.php?t=67025

Thomas Ahle
  • 881
  • 9
  • 8