Skip to content

Conversation

@folkertvanheusden
Copy link

Type of pull request:

  • Bug fix
  • Feature
  • Other

Description:

This change allows a developer to enable UCI/XBoard protocol debugging to be enabled. This helps debugging communication problems between lichess-bot and certain chess engines.

Related Issues:

[Reference any related issues that this pull request addresses or closes. Use the syntax Closes #issue_number to automatically close the linked issue upon merging.]

Checklist:

  • I have read and followed the contribution guidelines.
  • I have added necessary documentation (if applicable).
  • The changes pass all existing tests.

Screenshots/logs (if applicable):

@MarkZH
Copy link
Collaborator

MarkZH commented Nov 7, 2025

Good idea. Just fix the errors in the tests. Namely, the Stockfish.__init__() method in test_bot/homemade.py (and all the classes Stockfish inherits from) needs to be changed to take a debug paraemeter.

@folkertvanheusden
Copy link
Author

@MarkZH hi, I made the change. Could not find any other class that Stockfish inherits from. But pytest with the latest fix runs fine and it hangs without the fix so my guess is that it is now good?

engine: # Engine settings.
dir: "./engines/" # Directory containing the engine. This can be an absolute path or one relative to lichess-bot/.
name: "engine_name" # Binary name of the engine to use.
debug: False # Should all commands between Lichess & bot be logged?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really an accurate description. Setting debug: True prints messages about starting and stopping the engine executable. Showing UCI/Xboard communication is controlled by the -v option on the command line.

@MarkZH
Copy link
Collaborator

MarkZH commented Nov 7, 2025

I forgot to mention, please add documentation to the config wiki page: wiki\Configure-lichess-bot.md

@folkertvanheusden
Copy link
Author

I forgot to mention, please add documentation to the config wiki page: wiki\Configure-lichess-bot.md

Done!

@AttackingOrDefending
Copy link
Member

Can you fix the mypy errors?

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

Successfully merging this pull request may close these issues.

3 participants