You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
########################################### a very simple tournment between two uci engines##########################################importchessimportchess.uciimportchess.pgnboard=chess.Board()
engine=chess.uci.popen_engine("stockfish")
engine.uci()
whileTrue:
board.reset()
# Create a game and set headers.game=chess.pgn.Game()
game.headers["White"] =engine.namegame.headers["Black"] =engine.namegame.setup(board) # Not required for the standard# starting position.node=gamewhilenotboard.is_game_over():
engine.position(board)
bestmove, ponder=engine.go(movetime=100)
printbestmoveboard.push(bestmove)
node=node.add_variation(bestmove) # Add game nodeprintboardprintboard.fen()
printboard.result()
game.headers["Result"] =board.result()
printgame
I developed an adjudication procedure, but once the game is stopped, I can edit the game header but cannot bring the outcome into the board or game. When I save the results to a file, the game ends with "*".
Is it possible to assign the results to the board even if the game could continue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using the library python-chess for games between engines. I define a board and a game, according to:
#63
I developed an adjudication procedure, but once the game is stopped, I can edit the game header but cannot bring the outcome into the board or game. When I save the results to a file, the game ends with "*".
Is it possible to assign the results to the board even if the game could continue?
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions