Torom / BotLi

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

Explaination #102

Closed EmptikBest closed 1 year ago

EmptikBest commented 1 year ago

Please explain this:

blacklist chessfyBOT
Added chessfyBOT to the blacklist.
Challenging chessfyBOT (+6) as white to bullet ...
Challenge against chessfyBOT has timed out.
chessfyBOT will not be challenged to a new game pair before 2023-06-02 19:25:45.
Challenging chessfyBOT (+6) as white to bullet ...
Challenge against chessfyBOT has timed out.
chessfyBOT will not be challenged to a new game pair before 2023-06-02 19:27:26.

I have also blacklisted chessfyBOT in the config,yml

Torom commented 1 year ago

Can you post the relevant section from the config please.

The temporary blacklist in the user interface has a delay in matchmaking until the next time the online bots are downloaded. So maximum 30 minutes until the blocked is no longer challenged. For challenges from him, the blacklist takes effect immediately.

But what's going on there anyway? Is this the complete output of BotLi without any lines removed? The opponent should not be challenged twice in a row, when the challenge has expired.

EmptikBest commented 1 year ago

Yes, it is the complete output.. One time it kept doing this 22 times in a row until some other bot challenged it. Here is the relevant section from the config:

  blacklist:                              # List of users who are not challenged and whose challenges are declined.
  - ElmiChess
  - actual_magnus
  - Annie_archy
  - chessfyBOT
Torom commented 1 year ago

Ah, you run matchmaking with multiple variants, don't you? Then of course this can happen. Then the only question is why your blacklist from the config doesn't work.

EmptikBest commented 1 year ago

No, I don't run matchmaking with multiple variants, here is the relevant section from the config:

matchmaking:
  initial_time: 60                        # Initial time for matchmaking mode.
  increment: 1                            # 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: 70                               # Time in seconds the bot must be idle before a new challenge is started.
  multiplier: 0                           # Multiplier for calculating timeouts in matchmaking. Higher values lead to a wider range of opponents.
Torom commented 1 year ago
multiplier: 0

is the problem. If you set a multiplier to zero, you of course break the whole timeout calculation. I will check this in the future and not allow it below 1.

Torom commented 1 year ago

Done with b8296fc

The question remains why the blacklist from your config was ignored. Have you already written the blacklist before the start of BotLi? Changes to the config while BotLi is running are only taken into account after the next restart.

EmptikBest commented 1 year ago

Yes, I wrote the blacklist before starting BotLi... I'm changing the multiplier to one

Torom commented 1 year ago

Can you please post your complete config without the token?

EmptikBest commented 1 year ago

here is the config:

token: "got to remove this"         # Lichess OAuth2 Token.

engine:                                   # Engine settings.
  dir: "F:/EmptikBotLc0"                  # Directory containing the engine.
  name: "lc0.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.
      - "F:/Syzygy"
    max_pieces: 6                         # 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)
    MoveOverheadMs: 1000                  # Increase if your bot flags games too often.
    Threads: 1                            # Max CPU threads the engine can use.
    RamLimitMb: 8192                      # Max memory (in megabytes) the engine can allocate.
    WeightsFile: F:/EmptikBotLc0/t1-768x15x24h-swa-3905000.pb.gz
    Backend: cuda-auto
  variants:
    enabled: true                         # Activate seperate engine for other chess variants than standard and chess960.
    dir: "F:/EmptikBotLc0"                # 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: 1000                 # Increase if your bot flags games too often.
      Threads: 28                         # 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"
#     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: 3                        # 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: false                      # Activate online endgame tablebases from Lichess.
      min_time: 10                        # Time the bot must have at least to use the online move.
      timeout: 3                          # 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: true        # Whether bullet games against BOTs should only be accepted with increment.
# min_increment: 0                        # Minimum amount of increment to accept a challenge.
# max_increment: 180                      # Maximum amount of increment to accept a challenge.
# min_initial: 0                          # Minimum amount of initial time to accept a challenge.
# max_initial: 315360000                  # 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: 60                        # Initial time for matchmaking mode.
  increment: 1                            # 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: 70                               # 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 {engine} on an RTX 3080 10GB 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, see you next time."                                             # Message sent to the opponent after the end of a game.
  greeting_spectators: "Hey, I'm running {engine} on an RTX 3080 10GB 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."                                           # Message sent to the spectators after the end of a game.

  blacklist:                              # List of users who are not challenged and whose challenges are declined.
  - ElmiChess
  - actual_magnus
  - Annie_archy
  - chessfyBOT

books:                                    # Names of the opening books (to be used above in the opening_books section) and paths to the opening books.
  OlisFish: "F:/EmptikBot/OlisFish-220523.bin"
Torom commented 1 year ago

You got the indentation wrong. The blacklist must not be indented:

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 {engine} on an RTX 3080 10GB 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, see you next time."                                             # Message sent to the opponent after the end of a game.
  greeting_spectators: "Hey, I'm running {engine} on an RTX 3080 10GB 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."                                           # Message sent to the spectators after the end of a game.

blacklist:                                # List of users who are not challenged and whose challenges are declined.
  - ElmiChess
  - actual_magnus
  - Annie_archy
  - chessfyBOT

books:                                    # Names of the opening books (to be used above in the opening_books section) and paths to the opening books.
  OlisFish: "F:/EmptikBot/OlisFish-220523.bin"
EmptikBest commented 1 year ago

Ok, thanks.