lichess-bot-devs / lichess-bot

A bridge between Lichess bots and chess engines
GNU Affero General Public License v3.0
764 stars 448 forks source link

lichess-bot stops sending or accepting challenges #1003

Closed JimViebke closed 3 months ago

JimViebke commented 3 months ago

Describe the bug

lichess-bot often sits idle after a game, without creating a challenge or acknowledging most of the incoming challenges (restarting the script manually seems to temporarily resolve this).

The timeline, per the attached recent.log:

To Reproduce

  1. Run lichess-bot 2024.8.6.1 with venv\Scripts\activate and py lichess-bot.py -v, and the config as specified in the attached log.

Desktop:

(I'm not sure if this is related to my previous issue, #991. That thread links to a couple of issues and commits that could be relevant.)

AttackingOrDefending commented 3 months ago

Setting challenge.concurrency to 1 should fix the problem. Matchmaking with challenge.concurrency = 0 has some weird properties.

How the problem was caused: Since you have challenge.concurrency = 0 your bot won't accept any challenge from other players, and your max_games will be set to 0. Then max_games_for_matchmaking will be set to 1. Your game_count was initially 0 because your bot hadn't been challenged, so the matchmaker challenged other bots. After your bot received challenges, game_count became larger than 0, so your bot stopped challenging because game_count >= max_games_for_matchmaking.

AttackingOrDefending commented 3 months ago

Can you try #1004? If you try #1004 without changing concurrency then your bot shouldn't create any challenge. If you change concurrency to 1, then #1004 won't make any difference.

JimViebke commented 3 months ago

On #1004, lichess-bot correctly creates a challenge when concurrency is set to 1, and does not create a challenge when concurrency is 0. The issue appears resolved, thanks!

Should I leave this issue open until #1004 is merged?

AttackingOrDefending commented 3 months ago

You can close it now if you want.