Spaces:
Sleeping
Sleeping
gbtami commited on
Commit ·
e165407
1
Parent(s): 98ac6dd
Remove the _book suffix.
Browse files- config.yml.default +8 -8
- lichess-bot.py +3 -3
config.yml.default
CHANGED
|
@@ -7,14 +7,14 @@ engine: # engine settings
|
|
| 7 |
protocol: "uci" # "uci" or "xboard"
|
| 8 |
polyglot:
|
| 9 |
enabled: false # activate polyglot book
|
| 10 |
-
|
| 11 |
-
#
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
#
|
| 15 |
-
#
|
| 16 |
-
#
|
| 17 |
-
#
|
| 18 |
max_depth: 8 # half move max depth
|
| 19 |
min_weight: 1 # selects move with highest weight but not below this value
|
| 20 |
selection: "weighted_random" # move slection is one of "weighted_random", "uniform_random" or "best_move" (but not below the min_weight in 2. and 3. case)
|
|
|
|
| 7 |
protocol: "uci" # "uci" or "xboard"
|
| 8 |
polyglot:
|
| 9 |
enabled: false # activate polyglot book
|
| 10 |
+
standard: "engines/book.bin" # book file path of standard chess
|
| 11 |
+
# atomic: "atomic book path"
|
| 12 |
+
# giveaway: "antichess book path"
|
| 13 |
+
# crazyhouse: "crazyhouse book path"
|
| 14 |
+
# horde: "horde book path"
|
| 15 |
+
# kingofthehill: "kingOfTheHill book path"
|
| 16 |
+
# racingkings: "racingKings book path"
|
| 17 |
+
# 3check: "threeCheck book path"
|
| 18 |
max_depth: 8 # half move max depth
|
| 19 |
min_weight: 1 # selects move with highest weight but not below this value
|
| 20 |
selection: "weighted_random" # move slection is one of "weighted_random", "uniform_random" or "best_move" (but not below the min_weight in 2. and 3. case)
|
lichess-bot.py
CHANGED
|
@@ -188,10 +188,10 @@ def play_first_book_move(game, engine, board, li, config):
|
|
| 188 |
|
| 189 |
def get_book_move(board, config):
|
| 190 |
if board.uci_variant == "chess":
|
| 191 |
-
book = config["
|
| 192 |
else:
|
| 193 |
-
if config.get("{}
|
| 194 |
-
book = config["{}
|
| 195 |
else:
|
| 196 |
return None
|
| 197 |
|
|
|
|
| 188 |
|
| 189 |
def get_book_move(board, config):
|
| 190 |
if board.uci_variant == "chess":
|
| 191 |
+
book = config["standard"]
|
| 192 |
else:
|
| 193 |
+
if config.get("{}".format(board.uci_variant)):
|
| 194 |
+
book = config["{}".format(board.uci_variant)]
|
| 195 |
else:
|
| 196 |
return None
|
| 197 |
|