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

Use a trivial engine for tests #1066

Merged

Conversation

MarkZH
Copy link
Collaborator

@MarkZH MarkZH commented Jan 4, 2025

Type of pull request:

  • Bug fix
  • Feature
  • Other

Description:

Instead of a hobbled stockfish engine for game tests, use a trivial engine that just picks the first legal move on a board. This should avoid the random timeouts in tests when games go on too long due to the hobbled test engine still making reasonable moves. Plus, it should cut down the amount of logging done during tests.

Related Issues:

N/A

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):

N/A

MarkZH added 4 commits January 3, 2025 00:26
Instead of a hobbled stockfish engine for game tests, use a trivial
engine that just picks the first legal move on a board. This should
avoid the random timeouts in tests when games go on too long due to the
hobbled test engine still making reasonable moves.
@MarkZH
Copy link
Collaborator Author

MarkZH commented Jan 4, 2025

I'm not actually sure if this will solve the timeout problem since it happens so seldomly. But the only thing I can think of that would lead to a timeout error is the test game going too long. The various engines are cached, so there's no time taken to download them.

@AttackingOrDefending
Copy link
Member

I think it's worth the try if this will solve the random timeouts.

@AttackingOrDefending AttackingOrDefending merged commit 9f82d28 into lichess-bot-devs:master Jan 4, 2025
23 checks passed
@MarkZH MarkZH deleted the deterministic-game-tests branch January 5, 2025 00:08
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.

2 participants