Torom / BotLi

Lichess Bot
GNU Affero General Public License v3.0
44 stars 82 forks source link

Wrong ratings #118

Closed EmptikBest closed 1 year ago

EmptikBest commented 1 year ago

Please read, understand and follow: https://lichess.org/@/thibault/blog/how-to-ask-technical-questions/1HSthDSX

Describe the bug BotLi shows the wrong rating of a challenger. It says ToromBot challenged me to 1+1 in Standard, and its rating was 3028, when ToromBot's highest rating in bullet is 2965 (https://lichess.org/@/ToromBot/perf/bullet). Here is the cmd text:

ID: 56U6wArx     BOT ResoluteBot (2887) ½ - ½ BOT EmptikBot (3028)     Game drawn by threefold repetition.
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Challenging resolutebot ...
Challenge against resolutebot failed due to Lichess rate limit.
Challenge queue cleared due to rate limiting.
________________________________________________________________________________________________________________________________
ID: Htlxb3eq     Challenger: BOT YoBot_v2 (2116)     TC: 2+1     Rated     Color: Random     Variant: Chess960
Variant "chess960" is not allowed according to config.
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
________________________________________________________________________________________________________________________________
ID: mM4me95A     Challenger: BOT YoBot_v2 (2881)     TC: 5+1     Rated     Color: Random     Variant: Standard
Neither bots nor humans are allowed according to config.
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
________________________________________________________________________________________________________________________________
ID: PznFCznn     Challenger: BOT ToromBot (3028)     TC: 1+1     Rated     Color: White     Variant: Standard
Neither bots nor humans are allowed according to config.
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

To Reproduce I have no idea, happened out of nowhere

Expected behavior A clear and concise description of what you expected to happen.

Information:

Config:

token: "Nope, not giving this away"         # Lichess OAuth2 Token.

engine:                                   # Engine settings.
  dir: "F:/EmptikBot/engines"             # Directory containing the engine.
  name: "Stockfish_SL.exe"                # Binary name of the engine to use.
  ponder: true                            # Think on opponent's time.
  silence_stderr: false                   # Suppresses stderr output.
  syzygy:
    enabled: true                         # Activate local syzygy endgame tablebases.
    paths:                                # Paths to local syzygy endgame tablebases.
      - "C:/Users/Vinay Kumar/Documents/Syzygy345"
    max_pieces: 5                         # Count of max pieces in the local syzygy endgame tablebases.
    instant_play: true                    # Whether the bot should play directly from syzygy without engine if possible.
  gaviota:
    enabled: false                        # Activate local gaviota endgame tablebases.
    paths:                                # Paths to local gaviota endgame tablebases.
      - "/path/to/gaviota"
    max_pieces: 5                         # Count of max pieces in the local gaviota endgame tablebases.
  uci_options:                            # Arbitrary UCI options passed to the engine. (Commenting allowed)
    Move Overhead: 500                    # Increase if your bot flags games too often.
    Threads: 30                           # Max CPU threads the engine can use.
    Hash: 8192                            # Max memory (in megabytes) the engine can allocate.
  variants:
    enabled: true                         # Activate seperate engine for other chess variants than standard and chess960.
    dir: "F:/EmptikBot/engines"           # Directory containing the engine.
    name: "fairy-stockfish.exe"           # Binary name of the engine to use.
    ponder: true                          # Think on opponent's time.
    silence_stderr: false                 # Suppresses stderr output.
    uci_options:                          # Arbitrary UCI options passed to the engine. (Commenting allowed)
      Move Overhead: 500                  # Increase if your bot flags games too often.
      Threads: 30                         # Max CPU threads the engine can use.
      Hash: 8192                          # Max memory (in megabytes) the engine can allocate.
      EvalFile: "3check.nnue;antichess.nnue;atomic.nnue;crazyhouse.nnue;horde.nnue;kingofthehill.nnue;racingkings.nnue"
  opening_books:
    enabled: true                         # Activate opening books.
    books:
#     white:                              # List of names of books to use as white.
#       - "WhiteBook"
#     black:                              # List of names of books to use as black.
#       - "BlackBook"
      standard:                           # List of names of books to use if there is no specific book for white, black or chess960.
        - "OlisFish"
        - "OlisFish2"
        - "Perfect2023"
        - "Perfect2021"
        - "Perfect2017"
        - "Perfect2019"
        - "Book1"
        - "Book2"
        - "Solista-Testing-260822"
        - "Solista-260822"
        - "perfect1"
        - "Mustafacanseven"
        - "komodo"
        - "HCanFree-Upd"
        - "cute"
        - "Cevdet-X"
        - "cani"
        - "BRAIN"
        - "book"
        - "OPTIMUS2"
        - "StudentChess"
        - "Titans"
        - "Cerebellum"
        - "book-mb3m45"
        - "EmptikBook1"
        - "fruit"
        - "OPTIMUS32"
        - "stockfish-211-book"
        - "Ranomi_170527"
        - "HannibalBookSmall"
        - "Deuterium"
        - "chiron15"
        - "Cerebellum_Light_Poly"
        - "Leschats17052023"
        - "ST_Mix"
        - "xXx"
        - "OPTIMUS1"
        - "SCCT-10.1"
        - "SENTINEL"
        - "SF-SE"
        - "SF15f"
        - "LesChats30062023"
        - "Mini_Mighty"
        - "Chucaro4upd2"
        - "Cacho"
        - "Chucaro4"
        - "cumulated"
        - "DarkGalactus"
        - "Bigfoot"
        - "BNX_3741_44"
        - "Anand"
        - "Botvinnik"
        - "Carlsen"
        - "Fischer"
        - "Karpov"
        - "Kasparov"
        - "NebulaBlue110"
        - "NebulaRing101"
        - "NebulaRing120"
        - "NebulaRing156"
        - "NebulaRing168"
        - "NebulaRing178"
        - "Spassky"
        - "Tal"
        - "Hubble33"
        - "callmeX"
        - "MANTIS-DH2"
        - "MANTIS-X3"
        - "MANTIS-X5"
        - "SF14h"
        - "SolistaAttackv3"
        - "Solista-010622"
        - "Solista"
        - "Thunderwizard"
        - "HeroV1.15c"
        - "emptikbot-09-07-23"
#     chess960:                           # List of names of books to use for chess960.
#       - "Chess960Book"
#     Use the same pattern for 'antichess', 'atomic', 'crazyhouse', 'horde', 'kingofthehill', 'racingkings' and '3check' as well.
    selection: "weighted_random"          # Move selection is one of "weighted_random", "uniform_random" or "best_move".
#   max_depth: 16                         # Half move max depth. (Comment this line for max depth)
  online_moves:
    opening_explorer:
      enabled: false                      # Activate online moves from Lichess opening explorer. The move that has performed best for this bot is played.
      use_for_variants: false             # Whether the Lichess opening explorer should be used for other variants than standard and chess960.
      min_time: 20                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
      min_games: 5                        # Minimum number of games in which the position must have occurred.
      only_with_wins: false               # Whether to play only moves that have won before.
      selection: "performance"            # Move selection is "performance" or "win_rate".
      anti: false                         # Whether to play the moves in which the opponent performs the worst.
#     max_depth: 16                       # Half move max depth. (Comment this line for max depth)
#     max_moves: 1                        # Max number of moves played from Lichess opening explorer. (Comment this line for max moves)
    chessdb:
      enabled: false                      # Activate online moves from https://chessdb.cn/queryc_en/
      min_eval_depth: 10                  # Minimum evaluation depth.
      min_time: 20                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
#     max_depth: 16                       # Half move max depth. (Comment this line for max depth)
#     max_moves: 1                        # Max number of moves played from chessdb. (Comment this line for max moves)
    lichess_cloud:
      enabled: false                      # Activate online moves from Lichess cloud eval.
      only_without_book: false            # Whether the cloud should only be used if there is no matching book.
      min_eval_depth: 10                  # Minimum evaluation depth.
      min_time: 20                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
#     max_depth: 16                       # Half move max depth. (Comment this line for max depth)
#     max_moves: 1                        # Max number of moves played from Lichess cloud eval. (Comment this line for max moves)
    online_egtb:
      enabled: true                       # Activate online endgame tablebases from Lichess.
      min_time: 10                        # Time the bot must have at least to use the online move.
      timeout: 2                          # Time the server has to respond.
  offer_draw:
    enabled: false                        # Activate whether the bot should offer draw.
    score: 10                             # If the absolute value of the score is less than or equal to this value, the bot offers/accepts draw (in cp)
    consecutive_moves: 40                 # How many moves in a row the absolute value of the score has to be below the draw value
    min_game_length: 50                   # Earliest move in which draw is offered.
  resign:
    enabled: false                        # Activate whether the bot should resign games.
    score: -1000                          # If the score is less than or equal to this value, the bot resigns (in cp).
    consecutive_moves: 5                  # How many moves in a row the score has to be below the resign value.

move_overhead_multiplier: 1.1             # Increase if your bot flags games too often. Default move overhead is 1 second per 1 minute initital time.

challenge:                                # Incoming challenges. (Commenting allowed)
  concurrency: 1                          # Number of games to play simultaneously.
  bullet_with_increment_only: false       # Whether bullet games against BOTs should only be accepted with increment.
  min_increment: 0                        # Minimum amount of increment to accept a challenge.
  max_increment: 0                        # Maximum amount of increment to accept a challenge.
  min_initial: 45                         # Minimum amount of initial time to accept a challenge.
  max_initial: 60                         # Maximum amount of initial time to accept a challenge.
  variants:                               # Chess variants to accept (https://lichess.org/variant).
    - standard
#   - chess960
#   - fromPosition
#   - antichess
#   - atomic
#   - crazyhouse
#   - horde
#   - kingOfTheHill
#   - racingKings
#   - threeCheck
  time_controls:                          # Time controls to accept.
    - bullet
#   - blitz
#   - rapid
#   - classical
  bot_modes:                              # Game modes to accept against BOTs.
#   - casual                              # Unrated games.
#   - rated                               # Rated games
  human_modes:                            # Game modes to accept against humans.
#   - casual                              # Unrated games.
#   - rated                               # Rated games

matchmaking:
  initial_time: 45                        # Initial time for matchmaking mode.
  increment: 0                            # Increment time for matchmaking mode.
  rated: true                             # Activate rated games in matchmaking mode.
  timeout: 30                             # Time until a challenge is canceled.
  variants:                               # Chess variants (https://lichess.org/variant) to challenge.
    - standard
#   - chess960
#   - antichess
#   - atomic
#   - crazyhouse
#   - horde
#   - kingOfTheHill
#   - racingKings
#   - threeCheck
# min_rating_diff: 0                      # Minimum rating distance to opponent. (Commenting allowed)
# max_rating_diff: 300                    # Maximum rating distance to opponent. (Commenting allowed)
  delay: 20                               # Time in seconds the bot must be idle before a new challenge is started.
  multiplier: 1                           # Multiplier for calculating timeouts in matchmaking. Higher values lead to a wider range of opponents.

messages:
  # Optional substitution keywords (include curly braces):
  #   {opponent} to insert the opponent's name
  #   {me} to insert our name
  #   {engine} to insert engine name
  #   {cpu} to insert CPU information
  #   {ram} to insert RAM size
  # Any other words in curly braces will be removed.
  greeting: "Hey, I'm running Stockfish Dev on an AMD Ryzen 5950X (30 threads used) and 8GiB of RAM. Good luck! Type !help for a list of commands." # Message sent to the opponent at the beginning of a game.
  goodbye: "Good game, well played. See you next time!"                                             # Message sent to the opponent after the end of a game.
  greeting_spectators: "Hey, I'm running Stockfish Dev on an AMD Ryzen 5950X (30 threads used) and 8GiB of RAM. Type !help for a list of commands." # Message sent to the spectators at the beginning of a game.
  goodbye_spectators: "Thanks for watching EmptikBot vs {opponent}!"                                           # Message sent to the spectators after the end of a game.

# whitelist:                            # List of users whose challenges are always accepted.
# - EmptikBotEman

blacklist:                              # List of users who are not challenged and whose challenges are declined.
  - ElmiChess
  - actual_magnus
  - Annie_archy
  - chessfyBOT
  - ProteusSF-Open
  - ProteusSF-Turbo
  - ResoluteBot
  - VariantsBot
  - AshNostromo
  - chat_bot
  - Zagreus_engine
  - caissa-test
  - caissa-ai
  - StreamerVSChat
  - zulu_bot
  - HistoryExplorer
  - bekbot
  - OldStockfish
  - dark_angel_777
  - ProteusSF
  - ProteusSF-Lite
  - EmptikBotLc0

books:                                    # Names of the opening books (to be used above in the opening_books section) and paths to the opening books.
  OlisFish: "F:/EmptikBot/engines/OlisFish-220523.bin"
  OlisFish2: "F:/EmptikBot/engines/OlisFish180623.bin"
  Perfect2017: "F:/EmptikBot/engines/Perfect2017.bin"
  Perfect2019: "F:/EmptikBot/engines/Perfect2019.bin"
  Perfect2021: "F:/EmptikBot/engines/Perfect2021.bin"
  Perfect2023: "F:/EmptikBot/engines/Perfect2023.bin"
  Book1: "F:/EmptikBot/engines/Book1.bin"
  Book2: "F:/EmptikBot/engines/Book2.bin"
  Solista-Testing-260822: "F:/EmptikBot/engines/Solista-Testing-260822.bin"
  Solista-260822: "F:/EmptikBot/engines/Solista-260822.bin"
  perfect1: "F:/EmptikBot/engines/perfect1.bin"
  Mustafacanseven: "F:/EmptikBot/engines/Mustafacanseven.bin"
  komodo: "F:/EmptikBot/engines/komodo.bin"
  HCanFree-Upd: "F:/EmptikBot/engines/HCanFree-Upd.bin"
  cute: "F:/EmptikBot/engines/cute.bin"
  Cevdet-X: "F:/EmptikBot/engines/Cevdet-X.bin"
  cani: "F:/EmptikBot/engines/cani.bin"
  BRAIN: "F:/EmptikBot/engines/BRAIN.bin"
  book: "F:/EmptikBot/engines/book.bin"
  OPTIMUS2: "F:/EmptikBot/engines/OPTIMUS2.bin"
  StudentChess: "F:/EmptikBot/engines/StudentChess.bin"
  Titans: "F:/EmptikBot/engines/Titans.bin"
  Cerebellum: "F:/EmptikBot/engines/Cerebellum3Merge.bin"
  book-mb3m45: "F:/EmptikBot/engines/book-mb3m45.bin"
  EmptikBook1: "F:/EmptikBot/engines/EmptikBook1.bin"
  fruit: "F:/EmptikBot/engines/fruit.bin"
  OPTIMUS32: "F:/EmptikBot/engines/OPTIMUS32.bin"
  stockfish-211-book: "F:/EmptikBot/engines/stockfish-211-book.bin"
  Ranomi_170527: "F:/EmptikBot/engines/Ranomi_170527.bin"
  HannibalBookSmall: "F:/EmptikBot/engines/HannibalBookSmall.bin"
  Deuterium: "F:/EmptikBot/engines/Deuterium.bin"
  chiron15: "F:/EmptikBot/engines/chiron15.bin"
  Cerebellum_Light_Poly: "F:/EmptikBot/engines/Cerebellum_Light_Poly.bin"
  Leschats17052023: "F:/EmptikBot/engines/Leschats17052023.bin"
  ST_Mix: "F:/EmptikBot/engines/ST_Mix.bin"
  xXx: "F:/EmptikBot/engines/xXx.bin"
  OPTIMUS1: "F:/EmptikBot/engines/OPTIMUS1.bin"
  SCCT-10.1: "F:/EmptikBot/engines/SCCT-10.1.bin"
  SENTINEL: "F:/EmptikBot/engines/SENTINEL.bin"
  SF-SE: "F:/EmptikBot/engines/SF-SE.bin"
  SF15f: "F:/EmptikBot/engines/SF15f.bin"
  LesChats30062023: "F:/EmptikBot/engines/LesChats30062023.bin"
  Mini_Mighty: "F:/EmptikBot/engines/Mini_Mighty.bin"
  Chucaro4upd2: "F:/EmptikBot/engines/Chucaro4upd2.bin"
  Cacho: "F:/EmptikBot/engines/Cacho.bin"
  Chucaro4: "F:/EmptikBot/engines/Chucaro4.bin"
  cumulated: "F:/EmptikBot/engines/cumulated.bin"
  DarkGalactus: "F:/EmptikBot/engines/DarkGalactus.bin"
  Bigfoot: "F:/EmptikBot/engines/Bigfoot.bin"
  BNX_3741_44: "F:/EmptikBot/engines/BNX_3741_44.bin"
  Anand: "F:/EmptikBot/engines/Anand.bin"
  Botvinnik: "F:/EmptikBot/engines/Botvinnik.bin"
  Carlsen: "F:/EmptikBot/engines/Carlsen.bin"
  Fischer: "F:/EmptikBot/engines/Fischer.bin"
  Karpov: "F:/EmptikBot/engines/Karpov.bin"
  Kasparov: "F:/EmptikBot/engines/Kasparov.bin"
  NebulaBlue110: "F:/EmptikBot/engines/NebulaBlue110.bin"
  NebulaRing101: "F:/EmptikBot/engines/NebulaRing101.bin"
  NebulaRing120: "F:/EmptikBot/engines/NebulaRing120.bin"
  NebulaRing156: "F:/EmptikBot/engines/NebulaRing156.bin"
  NebulaRing168: "F:/EmptikBot/engines/NebulaRing168.bin"
  NebulaRing178: "F:/EmptikBot/engines/NebulaRing178.bin"
  Spassky: "F:/EmptikBot/engines/Spassky.bin"
  Tal: "F:/EmptikBot/engines/Tal.bin"
  Hubble33: "F:/EmptikBot/engines/Hubble33.bin"
  callmeX: "F:/EmptikBot/engines/callmeX.bin"
  MANTIS-DH2: "F:/EmptikBot/engines/MANTIS-DH2.bin"
  MANTIS-X3: "F:/EmptikBot/engines/MANTIS-X3.bin"
  MANTIS-X5: "F:/EmptikBot/engines/MANTIS-X5.bin"
  SF14h: "F:/EmptikBot/engines/SF14h.bin"
  SolistaAttackv3: "F:/EmptikBot/engines/SolistaAttackv3.bin"
  Solista-010622: "F:/EmptikBot/engines/Solista-010622.bin"
  Solista: "F:/EmptikBot/engines/Solista.bin"
  Thunderwizard: "F:/EmptikBot/engines/Thunderwizard.bin"
  HeroV1.15c: "F:/EmptikBot/engines/HeroV1.15c.bin"
  emptikbot-09-07-23: "F:/EmptikBot/engines/emptikbot-09-07-23.bin"

Additional context Nope, except this happened 1-2 times before. image

Torom commented 1 year ago

I have no idea. I take this value directly from the challenge event from the API. So this value must come from Lichess.

EmptikBest commented 1 year ago

Okay, thanks for your response. If you think that this cannot be fixed, feel free to close this issue as not planned :)

EmptikBest commented 1 year ago

Also, another good point, at that time @EmptikBot (the one who got challenged) was rated 3028... This error happened again with RaspFish, EmptikBot247 got challenged by RaspFish (2918) around 3 minutes ago, and coincidentially (or not) EmptikBot247 was 2918??? Maybe that helps solve the issue @Torom

EmptikBest commented 1 year ago

Actually this all makes sense now @Torom! The ratings displayed in the challenges are actually the rating of the bot that is getting CHALLENGED in that variant.... I think you made it get the wrong rating/the rating of the bot that is GETTING challenged and not the bot that is challenging

Torom commented 1 year ago

You're right, I see the error now too.

Torom commented 1 year ago

Fixed by https://github.com/lichess-org/lila/commit/08ad6fa570f3b32e420bc655964542314426d9f0, will be applied at the next Lichess deploy.

Thanks for reporting.