Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recent regression with uci engine #850

Closed
jdart1 opened this issue Oct 2, 2023 · 6 comments
Closed

recent regression with uci engine #850

jdart1 opened this issue Oct 2, 2023 · 6 comments

Comments

@jdart1
Copy link

jdart1 commented Oct 2, 2023

Describe the bug
after updating to the HEAD, lichess-bot fails on startup with an exception. This appears to be a recent behavior change: If I revert back to commit 616dd81, it works. Note I have filed a similar issue with python-chess (niklasf/python-chess#1049) but I believe this is a different problem, because it occurs without debug output enabled.

To Reproduce
Steps to reproduce the behavior:

  1. python3 lichess-bot.py --logfile lichess.log -v with Arasan as the engine

Expected behavior
startup of engine, no exception

Logs

lichess.log

Desktop (please complete the following information):

  • OS: Windows 11
  • Python Version 3.10.11
@AttackingOrDefending
Copy link
Member

AttackingOrDefending commented Oct 2, 2023

lichess-bot processes debug output even if it isn't enabled, because it stores it in a file inside the lichess_bot_auto_logs folder. It just doesn't print it to the console. I couldn't reproduce this issue, probably because I didn't get the line info string out of do_all_pending, list size=0. What should I do for the engine to print this line?

What version of python-chess are you using while running HEAD and 616dd81?

@MarkZH
Copy link
Collaborator

MarkZH commented Oct 2, 2023

The commit you revert to is before commit 26732d1. That commit causes lichess-bot to try to start the chess engine on startup as a quick check that the engine is configured correctly. When you revert to the older commit, can your engine actually play a game, or does it exit with an error?

@jdart1
Copy link
Author

jdart1 commented Oct 3, 2023

I spoke too soon: no, it doesn't actually play a game, despite not putting out any debug info (any in the log would be from an earlier run). python-chess version is 1.9.4: maybe that is the issue?

@MarkZH
Copy link
Collaborator

MarkZH commented Oct 3, 2023

In your configuration file:

  uci_options:
    Threads: 8
    Hash: 32768
    SyzygyTbPath: /home/jdart/chess/syzygy:/home/jdart/chess/syzygy-6man/wdl:/home/jdart/chess/syzygy-6man/dtz
    debug: true

The option debug is not listed as a possible option in your engine.

 option name Hash type spin default 64 min 4 max 64000
 option name Ponder type check default true
 option name Contempt type spin default 0 min -200 max 200
 option name Use tablebases type check default true
 option name SyzygyTbPath type string default /home/jdart/chess/syzygy:/home/jdart/chess/syzygy-6man/wdl:/home/jdart/chess/syzygy-6man/dtz
 option name SyzygyUse50MoveRule type check default true
 option name SyzygyProbeDepth type spin default 4 min 0 max 64
 option name MultiPV type spin default 1 min 1 max 10
 option name OwnBook type check default true
 option name Favor frequent book moves type spin default 50 min 0 max 100
 option name Favor best book moves type spin default 50 min 0 max 100
 option name Favor high-weighted book moves type spin default 100 min 0 max 100
 option name Randomize book moves type spin default 50 min 0 max 100
 option name Threads type spin default 1 min 1 max 256
 option name UCI_LimitStrength type check default false
 option name UCI_Elo type spin default 3300 min 1000 max 3300
 option name Use NNUE type check default true
 option name NNUE file type string default arasan-d9-SFv4-20230728.nnue
 option name Move overhead type spin default 30 min 0 max 1000

The error happens because your engine does not know what to do with a debug option.

@MarkZH
Copy link
Collaborator

MarkZH commented Oct 3, 2023

This error is from line 392 of the log you posted:

chess.engine.EngineError: engine does not support option debug (available options: Hash, Ponder, Contempt, Use tablebases, SyzygyTbPath, SyzygyUse50MoveRule, SyzygyProbeDepth, MultiPV, OwnBook, Favor frequent book moves, Favor best book moves, Favor high-weighted book moves, Randomize book moves, Threads, UCI_LimitStrength, UCI_Elo, Use NNUE, NNUE file, Move overhead)

@jdart1
Copy link
Author

jdart1 commented Oct 3, 2023

Ok, thanks.

@jdart1 jdart1 closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants