geohot / battlechess

A distributed decentralized chess tournament

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

only plays one game before crashing

AndrewYatzkan opened this issue · comments

same error on python 3.6.5/macos and 3.7.2/centos with latest version of docker and both requirements installed at recommended versions

<UciProtocol (pid=2702)>: stderr >> Traceback (most recent call last):
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 84, in
<UciProtocol (pid=2702)>: stderr >> move = get_move(board, limit=int(cmd[2]))
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 60, in get_move
<UciProtocol (pid=2702)>: stderr >> (best_move, best_score, _) = move_optimality(board, 2)
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 48, in move_optimality
<UciProtocol (pid=2702)>: stderr >> move_score = move_optimality(test_board_2, max_depth - 1)[2]
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 48, in move_optimality
<UciProtocol (pid=2702)>: stderr >> move_score = move_optimality(test_board_2, max_depth - 1)[2]
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 50, in move_optimality
<UciProtocol (pid=2702)>: stderr >> move_score = evaluate(test_board)
<UciProtocol (pid=2702)>: stderr >> File "/tmp/battlechess/engine.py", line 10, in evaluate
<UciProtocol (pid=2702)>: stderr >> result = list(map(float, board.result.split("-")))
<UciProtocol (pid=2702)>: stderr >> AttributeError: 'function' object has no attribute 'split'
Traceback (most recent call last):
File "play.py", line 46, in
result = loop.run_until_complete(main())
File "/usr/lib64/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "play.py", line 41, in main
await battle(u1, u2)
File "play.py", line 24, in battle
result = await engine2.play(board, chess.engine.Limit(time=0.01))
File "/usr/local/lib/python3.7/site-packages/chess/engine.py", line 1226, in play
return (yield from self.communicate(Command))
File "/usr/local/lib/python3.7/site-packages/chess/engine.py", line 656, in communicate
return (yield from command.result)
chess.engine.EngineTerminatedError: engine process died unexpectedly (exit code: 1)

That was a bug with my engine, I fixed it now.

And meta engine bugs should be fixed too. Crash of engine is now treated as a forfeit.