Coder Social home page Coder Social logo

Comments (27)

Torom avatar Torom commented on September 17, 2024 1

You have to give me more information to help you. Maybe post the config.yml you try to use. But delete the token before.

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024
 token: "xxx(token)"    # Lichess OAuth2 Token.
 

 engine:                      # Engine settings.
  dir: "./engines/"          # Directory containing the engine. This can be an absolute path or one relative to lichess-bot/.
  name: "sf.exe"        # Binary name of the engine to use.
  protocol: "uci"            # "uci" or "xboard"
  ponder: true               # Think on opponent's time.                       # Think on opponent's time.
  opening_books:
    enabled: true                      # Activate opening books.
    books:
      white:                              # List of names of books to use as white.
        - "book1.bin"
      black:                              # List of names of books to use as black.
        - "book2.bin"
      standard:                           # List of names of books to use if there is no specific book for white, black or chess960.
        - "book1.bin" 
#     chess960:                           # List of names of books to use for Chess960.
#       - "Chess960Book"
    selection: "weighted_random"          # Move selection is one of "weighted_random", "uniform_random" or "best_move".
  online_moves:
    chessdb:
      enabled: false                      # Activate online moves from https://chessdb.cn/queryc_en/
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    lichess_cloud:
      enabled: false                      # Activate online moves from Lichess cloud eval.
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    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: true                         # 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: 10                 # How many moves in a row the absolute value of the score has to be below the draw value
    min_game_length: 35                   # 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.
  uci_options:                            # Arbitrary UCI options passed to the engine. (Commenting allowed)
    Move Overhead: 10                    # Increase if your bot flags games too often.
    Threads: 4                            # Max CPU threads the engine can use.
    Hash: 512                             # Max memory (in megabytes) the engine can allocate.
    SyzygyPath: "/engines/3-4-5"         # Path to your local syzygy endgame tablebases

  move_overhead_multiplier: 1.0             # 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.
 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: 20                             # Time until a challenge is canceled. 
# min_rating_diff: 0                      # Minimum rating distance to opponent. (Commenting allowed)
# max_rating_diff: 300                    # Maximum rating distance to opponent. (Commenting allowed)

 books:                                    # Names of the opening books (to be used above in the polyglot section) and paths to the polyglot opening books.
 DefaultBook: "/engines/book1.bin"

I edited it for you, for better readability

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

now, it says Exception: Section challenge must be a dictionary with indented keys followed by colons.. even though everything is fine , i tried everything , even removing and adding colons but it doesnt work when i start the bot ... =(

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

so , can i paste the config u edited?

from botli.

Torom avatar Torom commented on September 17, 2024

The problem is the indentation in the challenge section. You have to keep it indented like it is in the default config:

challenge:                                # Incoming challenges. (Commenting allowed)
  concurrency: 1                          # Number of games to play simultaneously.
# 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

Also your book configuration will fail after you fix the indentation. You have to declare the books in the books section like this:

 books:                                    # Names of the opening books (to be used above in the polyglot section) and paths to the polyglot opening books.
  book1.bin: "/engines/book1.bin"
  book2.bin: "/engines/book2.bin"

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

ah , okay

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

yaml.parser.ParserError: expected '', but found ''
in "config.yml", line 53, column 1
:( if i leave the space there it says it needs colon , if i dont , it says parse error because of the blocking :(

from botli.

Torom avatar Torom commented on September 17, 2024

Can you post the config you now try to use?

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024
 token: "
"    # Lichess OAuth2 Token.
 url: "https://lichess.org/"  # Lichess base URL.

 engine:                      # Engine settings.
  dir: "./engines/"          # Directory containing the engine. This can be an absolute path or one relative to lichess-bot/.
  name: "sf.exe"        # Binary name of the engine to use.
  protocol: "uci"            # "uci" or "xboard"
  ponder: true               # Think on opponent's time.                       # Think on opponent's time.
  opening_books:
    enabled: true                      # Activate opening books.
    books:
      white:                              # List of names of books to use as white.
        - "book1.bin"
      black:                              # List of names of books to use as black.
        - "book2.bin"
      standard:                           # List of names of books to use if there is no specific book for white, black or chess960.
        - "book1.bin" 
#     chess960:                           # List of names of books to use for Chess960.
#       - "Chess960Book"
    selection: "weighted_random"          # Move selection is one of "weighted_random", "uniform_random" or "best_move".
  online_moves:
    chessdb:
      enabled: false                      # Activate online moves from https://chessdb.cn/queryc_en/
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    lichess_cloud:
      enabled: false                      # Activate online moves from Lichess cloud eval.
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    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: true                         # 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: 10                 # How many moves in a row the absolute value of the score has to be below the draw value
    min_game_length: 35                   # 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.
  uci_options:                            # Arbitrary UCI options passed to the engine. (Commenting allowed)
    Move Overhead: 10                    # Increase if your bot flags games too often.
    Threads: 4                            # Max CPU threads the engine can use.
    Hash: 512                             # Max memory (in megabytes) the engine can allocate.
    SyzygyPath: "/engines/3-4-5"         # Path to your local syzygy endgame tablebases

  move_overhead_multiplier: 1.0             # 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.
# 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
    
  books:                                    # Names of the opening books (to be used above in the polyglot section) and paths to the polyglot opening books.
  book1.bin: "/engines/book1.bin"
  book2.bin: "/engines/book2.bin"

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

the same one which you sent a few minutes ago

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

ah forgot to remove the token

from botli.

Torom avatar Torom commented on September 17, 2024

It seems like you not used my default config as a starting point, because the url field is one that doesn't exist in my bot. I think it is the best for you, to take my default config. copy it to config.yml and make only the changes you want. Try to don't change the indentation. You just have to insert an whitespace where you delte an #.

You also miss the complete matchmaking section that is needed by my bot.

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

oh , my bad , one of my friends gave me the config to improve the bot

from botli.

Torom avatar Torom commented on September 17, 2024

? Do you even use BotLi?

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

yes

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

lock_mapping_key
raise ParserError("while parsing a block mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a block mapping
in "config.yml", line 10, column 6
expected , but found ''
in "config.yml", line 14, column 7

default config , just edited the token and where books should be used and syzygy, still shows the error

from botli.

Torom avatar Torom commented on September 17, 2024

Yes. Because you did something wrong in the opening_books section

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

opening_books:
enabled: true # Activate opening books.
books:
white: # List of names of books to use as white.
- "book1.bin"
black: # List of names of books to use as black.
- "book2.bin"
standard: # List of names of books to use if there is no specific book for white, black or chess960.
- "book1.bin"

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024
raise ParserError("while parsing a block mapping", self.marks[-1],

yaml.parser.ParserError: while parsing a block mapping
in "config.yml", line 4, column 3
expected , but found ''
in "config.yml", line 47, column 4
here it comes again :(

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

line 4 is the directoryone and 47 is syzygy

from botli.

Torom avatar Torom commented on September 17, 2024
  opening_books:
    enabled: true                       # Activate opening books.
    books:
      white:                              # List of names of books to use as white.
        - "book1.bin"
      black:                              # List of names of books to use as black.
        - "book2.bin"
      standard:                           # List of names of books to use if there is no specific book for white, black or chess960.
        - "book1.bin" 
#     chess960:                           # List of names of books to use for Chess960.
#       - "Chess960Book"
    selection: "weighted_random"          # Move selection is one of "weighted_random", "uniform_random" or "best_move".

This should work.

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024
raise ParserError("while parsing a block mapping", self.marks[-1],

yaml.parser.ParserError: while parsing a block mapping in "config.yml", line 4, column 3 expected , but found '' in "config.yml", line 47, column 4 here it comes again :(

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

okay , its working right now but i had to remove book1 as it said book1.bin doesnt exist in engines folder

from botli.

Torom avatar Torom commented on September 17, 2024
token: "XXXXXXXXXXXXXXXXXXXXXXXX"         # Lichess OAuth2 Token.

engine:                                   # Engine settings.
  dir: "./engines"                        # Directory containing the engine.
  name: "sf.exe"                      # Binary name of the engine to use.
  ponder: true                            # Think on opponent's time.
  opening_books:
    enabled: true                       # Activate opening books.
    books:
      white:                              # List of names of books to use as white.
        - "book1.bin"
      black:                              # List of names of books to use as black.
        - "book2.bin"
      standard:                           # List of names of books to use if there is no specific book for white, black or chess960.
        - "book1.bin" 
#     chess960:                           # List of names of books to use for Chess960.
#       - "Chess960Book"
    selection: "weighted_random"          # Move selection is one of "weighted_random", "uniform_random" or "best_move".
  online_moves:
    chessdb:
      enabled: false                      # Activate online moves from https://chessdb.cn/queryc_en/
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    lichess_cloud:
      enabled: false                      # Activate online moves from Lichess cloud eval.
      min_depth: 10                       # Minimum evaluation depth.
      min_time: 40                        # Time the bot must have at least to use the online move.
      timeout: 5                          # Time the server has to respond.
    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: true                         # 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: 10                 # How many moves in a row the absolute value of the score has to be below the draw value
    min_game_length: 35                   # 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.
  uci_options:                            # Arbitrary UCI options passed to the engine. (Commenting allowed)
    Move Overhead: 10                    # Increase if your bot flags games too often.
    Threads: 4                            # Max CPU threads the engine can use.
    Hash: 512                             # Max memory (in megabytes) the engine can allocate.
    SyzygyPath: "/engines/3-4-5"         # Path to your local syzygy endgame tablebases

move_overhead_multiplier: 1.0             # 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.
# 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: 20                             # Time until a challenge is canceled. 
# min_rating_diff: 0                      # Minimum rating distance to opponent. (Commenting allowed)
# max_rating_diff: 300                    # Maximum rating distance to opponent. (Commenting allowed)

books:                                    # Names of the opening books (to be used above in the polyglot section) and paths to the polyglot opening books.
  book1.bin: "/engines/book1.bin"
  book2.bin: "/engines/book2.bin"

Just copy and paste this. This should work.

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

okay

from botli.

trial-boy-bots avatar trial-boy-bots commented on September 17, 2024

its working , thank you so much for your time

from botli.

Torom avatar Torom commented on September 17, 2024

You are welcome.

from botli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.