Closed IbaiBuR closed 11 months ago
I also get this kind of warnings / errors which also seem to be related to the usage of the experience file:
ERROR:asyncio:Exception in callback Protocol._line_received('info string ...BlackHole.exp')
handle: <Handle Protocol._line_received('info string ...BlackHole.exp')>
Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/ibaibur/.local/lib/python3.10/site-packages/chess/engine.py", line 1093, in _line_received
self.command._line_received(self, line)
File "/home/ibaibur/.local/lib/python3.10/site-packages/chess/engine.py", line 1384, in _line_received
assert self.state in [CommandState.ACTIVE, CommandState.CANCELLING]
AssertionError
python-chess warns that the engine produces unexpected output. Looking at the output it is also kind of strange, these are all legal moves from the starting position with their respective evaluation, I guess the engine does this to inform about the information from the experience file?
On which engine is your "mod" based?
I also get this kind of warnings / errors which also seem to be related to the usage of the experience file:
ERROR:asyncio:Exception in callback Protocol._line_received('info string ...BlackHole.exp') handle: <Handle Protocol._line_received('info string ...BlackHole.exp')> Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/home/ibaibur/.local/lib/python3.10/site-packages/chess/engine.py", line 1093, in _line_received self.command._line_received(self, line) File "/home/ibaibur/.local/lib/python3.10/site-packages/chess/engine.py", line 1384, in _line_received assert self.state in [CommandState.ACTIVE, CommandState.CANCELLING] AssertionError
No, this error is not related to that. It occurs at occasional intervals and does not seem to have any negative effects.
python-chess warns that the engine produces unexpected output. Looking at the output it is also kind of strange, these are all legal moves from the starting position with their respective evaluation, I guess the engine does this to inform about the information from the experience file?
On which engine is your "mod" based?
It is based on latest Stockfish-Dev.
Yes, the engine sends the moves to the GUI / cli or whatever to give some information about the available moves in the experience file, obviously, the NPS, TBHits and time are sent as 0 because the engine does not really "think". This is the part of code that sends the info:
//Provide some info to the GUI about available exp moves
int expCount = 0;
for (auto it = quality.rbegin(); it != quality.rend(); ++it)
{
++expCount;
sync_cout
<< " info "
<< " depth " << it->first->depth
<< " seldepth " << it->first->depth
<< " multipv 1"
<< " score " << UCI::value(it->first->value)
<< " nodes " << expCount
<< " nps 0"
<< " tbhits 0"
<< " time 0"
<< " pv " << UCI::move(it->first->move, rootPos.is_chess960())
<< sync_endl;
}
I tried to hardcode it and send different values to avoid the warnings but it did not work either.
If the assertionerror does not have negative effects then no problem. The warnings dont seem to have negative effects either but it is a bit annoying that they pop up continously in the terminal.
Thanks for answering. If you need more information just tell me.
It is based on latest Stockfish-Dev.
Sorry I didn't expect you to have actually added the experience file yourself.
What I wonder, why is there a space before info
an info output normally looks like this: info depth 4 seldepth 2 multipv 1 score cp 51 nodes 110 nps 55000 hashfull 0 tbhits 0 time 2 pv e2e4
. Maybe this is already part of the problem?
That could be the problem...
Let me remove it, recompile, and try...
Maybe that eliminates the warnings.
You were right!
Thanks a lot!
Please read, understand and follow: https://lichess.org/@/thibault/blog/how-to-ask-technical-questions/1HSthDSX
Describe the bug Since this commit: https://github.com/Torom/BotLi/commit/97ecdf1501a9e656b3e2f6bc0563b7164bb5ff68 BotLi makes a little test of the engines at startup to verify everything is working correctly, but, on my side, I get a bunch of warnings. The same warnings are shown during game play too.
To Reproduce Steps to reproduce the behavior:
Expected behavior Instead of showing the warnings it should just say "OK"
Information:
Config: Paste your config.yml here REMOVE YOUR TOKEN:
Additional context It is worth noting that this only happens with engines with self-learning and when Experience Book is enabled. I'll try to explain further. My Stockfish Mod is able to store data and learn from the games it plays. When you enable Experience Book, you are telling the engine to play directly from the experience file (where all the learning data is stored) as if it was a book. I know this case is very specific and probably the warnings are not even made by BotLi but from python-chess instead, but I would like to not see the warnings continously even if they dont affect the bot's performance.
Example of the warnings I am getting: