Torom / BotLi

Lichess Bot
GNU Affero General Public License v3.0
44 stars 82 forks source link

Fairy-Stockfish NNUE #96

Closed EmptikBest closed 1 year ago

EmptikBest commented 1 year ago

Hello, after I installed the Fairy-Stockfish NNUE, between a game, I got this: ERROR:asyncio:Exception in callback Protocol._line_received('info depth 2...6f6 e2e4 b7d7') handle: <Handle Protocol._line_received('info depth 2...6f6 e2e4 b7d7')> Traceback (most recent call last): File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1054, in _line_received self.command._line_received(self, line) File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1303, in _line_received assert self.state in [CommandState.ACTIVE, CommandState.CANCELLING] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError After that, the game continued normally.

But, the next game, at the start, I got this message and the game just kept at the start, no time going down, no abort: `ID: 8TxFqNAn BOT EmptikVariantsBot (1570?) - BOT SimplerEval (1577?) TC: 1+1 Rated Variant: Horde ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ HTTPSConnectionPool(host='lichess.org', port=443): Read timed out. (read timeout=1.0) HTTPSConnectionPool(host='lichess.org', port=443): Read timed out. (read timeout=1.0) Exception in thread Thread-14: Traceback (most recent call last): File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Users\Aryan\Documents\EmptikVariantsBot\game.py", line 44, in run self._make_move() File "C:\Users\Aryan\Documents\EmptikVariantsBot\game.py", line 99, in _make_move uci_move, offer_draw, resign = self.lichess_game.make_move() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\Documents\EmptikVariantsBot\lichess_game.py", line 81, in make_move move, info = self._make_engine_move() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\Documents\EmptikVariantsBot\lichess_game.py", line 599, in _make_engine_move result = self.engine.play(self.board, limit, info=chess.engine.INFO_ALL, ponder=ponder) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 2795, in play return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 456, in result return self.get_result() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 401, in get_result raise self._exception File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\asyncio\tasks.py", line 479, in wait_for return fut.result() ^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1685, in play return await self.communicate(UciPlayCommand) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1094, in communicate return await command.result ^^^^^^^^^^^^^^^^^^^^ chess.engine.EngineTerminatedError: engine process died unexpectedly (exit code: 1) SimplerEval will not be challenged to a new game pair before 2023-05-28 18:07:13.

ID: 8TxFqNAn BOT EmptikVariantsBot (1570?) - BOT SimplerEval (1577?) TC: 1+1 Rated Variant: Horde ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ Exception in thread Thread-16: Traceback (most recent call last): File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Users\Aryan\Documents\EmptikVariantsBot\game.py", line 44, in run self._make_move() File "C:\Users\Aryan\Documents\EmptikVariantsBot\game.py", line 99, in _make_move uci_move, offer_draw, resign = self.lichess_game.make_move() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\Documents\EmptikVariantsBot\lichess_game.py", line 81, in make_move move, info = self._make_engine_move() ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\Documents\EmptikVariantsBot\lichess_game.py", line 599, in _make_engine_move result = self.engine.play(self.board, limit, info=chess.engine.INFO_ALL, ponder=ponder) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 2795, in play return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 456, in result return self.get_result() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 401, in get_result raise self._exception File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\asyncio\tasks.py", line 479, in wait_for return fut.result() ^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1685, in play return await self.communicate(UciPlayCommand) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Aryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\chess\engine.py", line 1094, in communicate return await command.result ^^^^^^^^^^^^^^^^^^^^ chess.engine.EngineTerminatedError: engine process died unexpectedly (exit code: 1)`

Any ideas how to fix this? I'm running Python 3.11 on Windows 10 Home.

Also, this problem doesn't occur in standard, only in variants.

Any help would be appreciated

EmptikBest commented 1 year ago

I also get that the chess engine (Fairy-Stockfish 14) crashed, but I dont understand why.

This problem did not occur before I installed NNUE.

Torom commented 1 year ago

You need Fairy-Stockfish 14.0.1 to use NNUEs for all variants if I remember correctly. In general it is better to test the engine without BotLi first, the problem is usually not with BotLi when the engine crashes, so if the engine works correctly without BotLi, there should be no problems with BotLi.

EmptikBest commented 1 year ago

Thank you, it worked! Will know for sure after it plays a few games