Python Chess

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
chrisw
Posts: 1174
Joined: Tue Apr 03, 2012 2:28 pm

Python Chess

Post by chrisw » Sun Feb 17, 2019 12:25 pm

Has anyone got the chess.engine function in Python Chess to work?

Mine gets here: chess.engine.SimpleEngine.popen_uci("stockfish")
finds stockfish in its directory, and then pumps out a load of internal errors and breaks before returning.

Windows 10, VS2017, python-chess 0.25.0

Code: Select all

# code as per Python Chess example code ....
import chess
import chess.engine

engine = chess.engine.SimpleEngine.popen_uci("stockfish")

board = chess.Board()
while not board.is_game_over():
    result = engine.play(board, chess.engine.Limit(time=0.100))
    board.push(result.move)

engine.quit()

Ferdy
Posts: 3712
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Chess

Post by Ferdy » Sun Feb 17, 2019 12:56 pm

chrisw wrote:
Sun Feb 17, 2019 12:25 pm
Has anyone got the chess.engine function in Python Chess to work?

Mine gets here: chess.engine.SimpleEngine.popen_uci("stockfish")
finds stockfish in its directory, and then pumps out a load of internal errors and breaks before returning.

Windows 10, VS2017, python-chess 0.25.0
Upgrade to python-chess 0.25.1

https://python-chess.readthedocs.io/en/ ... gelog.html

chrisw
Posts: 1174
Joined: Tue Apr 03, 2012 2:28 pm

Re: Python Chess

Post by chrisw » Sun Feb 17, 2019 1:07 pm

Ferdy wrote:
Sun Feb 17, 2019 12:56 pm
chrisw wrote:
Sun Feb 17, 2019 12:25 pm
Has anyone got the chess.engine function in Python Chess to work?

Mine gets here: chess.engine.SimpleEngine.popen_uci("stockfish")
finds stockfish in its directory, and then pumps out a load of internal errors and breaks before returning.

Windows 10, VS2017, python-chess 0.25.0
Upgrade to python-chess 0.25.1

https://python-chess.readthedocs.io/en/ ... gelog.html
Thanks, done. Works.

Post Reply