lichess-bot-devs / lichess-bot

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

`lichess_opening_explorer` with `move_quality: "good"` picks up losing opening lines #954

Closed eduherminio closed 2 months ago

eduherminio commented 2 months ago

Describe the bug

lichess_opening_explorer with move_quality: "good" picks up losing opening lines. I'm just trying to make it pick up random, good lines.

Config

    lichess_opening_explorer:
      enabled: true
      min_time: 55
      move_quality: "good"
      source: "lichess"            # One of "lichess", "masters", "player"
      player_name: ""              # The lichess username. Leave empty for the bot's username to be used. Used only when source is "player".
      # sort: "winrate"              # One of "winrate", "games_played"
      min_games: 10                # Minimum number of times a move must have been played to be chosen.

Adding max_score_difference: 50 doesn't help, BTW

Logs

[05/08/24 08:38:13] INFO     Accept Blitz rated challenge     lichess-bot.py:424
                             from La_Beau_Montagne (1915?)
                             (trUX7P05)
                    INFO     --- Process Queued. Count: 3.    lichess-bot.py:257
                             IDs: {'trUX7P05', 'hOfq5nvb',
                             'ujs0QTmC'}
                    INFO     --- Process Used. Count: 3. IDs: lichess-bot.py:257
                             {'trUX7P05', 'hOfq5nvb',
                             'ujs0QTmC'}
[05/08/24 08:38:14] INFO     +++                              lichess-bot.py:584
                             https://lichess.org/trUX7P05/bla
                             ck Blitz vs La_Beau_Montagne
                             (1915?) (trUX7P05)
[05/08/24 08:38:15] INFO     ***                              conversation.py:83
                             https://lichess.org/trUX7P05/bla
                             ck [player] Lynx_BOT: Hey
                             La_Beau_Montagne, I'm Lynx_BOT.
                             gl! Type !help for supported
                             commands
                    INFO     ***                              conversation.py:83
                             https://lichess.org/trUX7P05/bla
                             ck [spectator] Lynx_BOT: Hey,
                             I'm Lynx_BOT. Type !help for
                             supported commands
                    INFO                                      lichess-bot.py:691
                    INFO     move: 1                          lichess-bot.py:692
                    INFO     Got move b8a6 from lichess    engine_wrapper.py:916
                             opening explorer (winrate:
                             0.6408777682782821) for game
                             trUX7P05
                    INFO     Source: Lichess Opening       engine_wrapper.py:297
                             Explorer (Lichess)
                    INFO     ***                              conversation.py:42
                             https://lichess.org/trUX7P05/bla
                             ck [player] Lynx_BOT: Hey
                             La_Beau_Montagne, I'm Lynx_BOT.
                             gl! Type !help for supported
                             commands
                    INFO     ***                              conversation.py:42
                             https://lichess.org/trUX7P05/bla
                             ck [spectator] Lynx_BOT: Hey,
                             I'm Lynx_BOT. Type !help for
                             supported commands
[05/08/24 08:38:16] INFO                                      lichess-bot.py:691
                    INFO     move: 2                          lichess-bot.py:692
                    INFO     Got move g7g5 from lichess    engine_wrapper.py:916
                             opening explorer (winrate:
                             0.8444976076555024) for game
                             trUX7P05
                    INFO     Source: Lichess Opening       engine_wrapper.py:297
                             Explorer (Lichess)
[05/08/24 08:38:17] INFO                                      lichess-bot.py:691
                    INFO     move: 3                          lichess-bot.py:692
                    INFO     Got move h7h6 from lichess    engine_wrapper.py:916
                             opening explorer (winrate:
                             1.0) for game trUX7P05
                    INFO     Source: Lichess Opening       engine_wrapper.py:297
                             Explorer (Lichess)
[05/08/24 08:38:18] INFO     La_Beau_Montagne won!            lichess-bot.py:791
                    INFO     Game won by checkmate.           lichess-bot.py:802
                    INFO     ***                              conversation.py:83
                             https://lichess.org/trUX7P05/bla
                             ck [player] Lynx_BOT: gg
                    INFO     ***                              conversation.py:83
                             https://lichess.org/trUX7P05/bla
                             ck [spectator] Lynx_BOT: Thx for
                             watching!

Desktop (please complete the following information):

Additional context Add any other context about the problem here.