Spaces:
Sleeping
Sleeping
Shail Choksi commited on
Commit ·
88d0fae
1
Parent(s): e911711
Updated README with config details
Browse files- README.md +23 -10
- config.yml +2 -2
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
# lichess-uci-bot
|
| 2 |
-
A bridge between Lichess API and UCI bots. Makes use of python-chess.
|
|
|
|
| 3 |
|
| 4 |
## How to Install
|
| 5 |
- Download the repo into lichess-uci-bot directory
|
| 6 |
- run `pip install -r requirements.txt`
|
| 7 |
|
|
|
|
| 8 |
## Lichess OAuth
|
| 9 |
- Create an account for your bot on Lichess.org
|
| 10 |
- NOTE: If you have previously played games on an existing account, you will not be able to use it as a bot account
|
|
@@ -14,23 +16,34 @@ A bridge between Lichess API and UCI bots. Makes use of python-chess.
|
|
| 14 |
- A {token} e.g. `stEstTokenLicHeSs` will be displayed. Store this.
|
| 15 |
- NOTE: You won't see this token again.
|
| 16 |
|
| 17 |
-
## Lichess Upgrade to Bot Account
|
| 18 |
-
This is irreversible. [Read more about upgrading to bot account](https://lichess.org/api#operation/botAccountUpgrade).
|
| 19 |
-
- run `python main.py {token} -u`
|
| 20 |
|
| 21 |
## Setup Engine
|
| 22 |
- create a `engines` directory in the lichess-uci-bot directory
|
| 23 |
- place your engine(s) in this directory
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## Time to Play!
|
| 26 |
- Start a game in Lichess. Get the {game_id} from the Url e.g. "https://lichess.org/5ekNlPWn" -> `5ekNlPWn` is the game_id
|
| 27 |
-
-
|
| 28 |
- Have fun!
|
| 29 |
|
| 30 |
-
|
|
|
|
| 31 |
- Download the weights for the id you want to play from here: http://lczero.org/networks
|
|
|
|
| 32 |
- Download the lczero binary from here: https://github.com/glinscott/leela-chess/releases
|
| 33 |
-
-
|
| 34 |
-
-
|
| 35 |
-
-
|
| 36 |
-
- e.g. `python main.py
|
|
|
|
| 1 |
# lichess-uci-bot
|
| 2 |
+
A bridge between Lichess API and UCI bots. Makes use of python-chess: https://github.com/niklasf/python-chess
|
| 3 |
+
|
| 4 |
|
| 5 |
## How to Install
|
| 6 |
- Download the repo into lichess-uci-bot directory
|
| 7 |
- run `pip install -r requirements.txt`
|
| 8 |
|
| 9 |
+
|
| 10 |
## Lichess OAuth
|
| 11 |
- Create an account for your bot on Lichess.org
|
| 12 |
- NOTE: If you have previously played games on an existing account, you will not be able to use it as a bot account
|
|
|
|
| 16 |
- A {token} e.g. `stEstTokenLicHeSs` will be displayed. Store this.
|
| 17 |
- NOTE: You won't see this token again.
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Setup Engine
|
| 21 |
- create a `engines` directory in the lichess-uci-bot directory
|
| 22 |
- place your engine(s) in this directory
|
| 23 |
|
| 24 |
+
|
| 25 |
+
## Config
|
| 26 |
+
- Edit the config.yml file and update the token field with your token
|
| 27 |
+
- In the `engine` field, enter the binary name
|
| 28 |
+
- Leave the `weights` field empty or see LeelaChessZero section for Neural Nets
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Lichess Upgrade to Bot Account
|
| 32 |
+
This is irreversible. [Read more about upgrading to bot account](https://lichess.org/api#operation/botAccountUpgrade).
|
| 33 |
+
- run `python main.py -u`
|
| 34 |
+
|
| 35 |
+
|
| 36 |
## Time to Play!
|
| 37 |
- Start a game in Lichess. Get the {game_id} from the Url e.g. "https://lichess.org/5ekNlPWn" -> `5ekNlPWn` is the game_id
|
| 38 |
+
- To start: `python main.py -g {game_id}` e.g. `python main.py -g 5ekNlPWn`
|
| 39 |
- Have fun!
|
| 40 |
|
| 41 |
+
|
| 42 |
+
## LeelaChessZero
|
| 43 |
- Download the weights for the id you want to play from here: http://lczero.org/networks
|
| 44 |
+
- Extract the weights from the zip archive and rename it to `latest.txt`
|
| 45 |
- Download the lczero binary from here: https://github.com/glinscott/leela-chess/releases
|
| 46 |
+
- Copy both the files into the `engines` directory
|
| 47 |
+
- Change the `engine` and `weights` keys in config.yml to `lczero` and `latest.txt`
|
| 48 |
+
- To start: `python main.py -g {game_id}`
|
| 49 |
+
- e.g. `python main.py -g 5ekNlPWn`
|
config.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
token: "
|
| 2 |
-
url: "https://
|
| 3 |
engines_dir: "./engines/"
|
| 4 |
engine: "lczero"
|
| 5 |
weights: "latest.txt"
|
|
|
|
| 1 |
+
token: "someTestKey"
|
| 2 |
+
url: "https://lichess.org/"
|
| 3 |
engines_dir: "./engines/"
|
| 4 |
engine: "lczero"
|
| 5 |
weights: "latest.txt"
|