Spaces:
Sleeping
Sleeping
Methan commited on
Commit ·
006ddcf
1
Parent(s): 01d7774
Grammar Updates To Readme.md
Browse files
README.md
CHANGED
|
@@ -25,15 +25,15 @@ python3 -m pip install -r requirements.txt
|
|
| 25 |
### Windows:
|
| 26 |
- **NOTE: Only Python 3.7 or later is supported!**
|
| 27 |
- If you don't have Python, you may download it [here](https://www.python.org/downloads/). When installing it, enable `add Python to PATH`, then go to custom installation (this may be not necessary, but on some computers it won't work otherwise) and enable all options (especially `install for all users`), except the last . It's better to install Python in a path without spaces, like `C:\Python\`.
|
| 28 |
-
- To type commands it's better to use PowerShell. Go to Start menu and type `PowerShell` (you may use `cmd` too, but sometimes it may not work).
|
| 29 |
- Then you may need to upgrade pip. Execute `python3 -m pip install --upgrade pip` in PowerShell.
|
| 30 |
- Download the repo into Lishogi-Bot directory.
|
| 31 |
-
- Navigate to the directory in PowerShell: `cd [folder's
|
| 32 |
- Install virtualenv: `pip install virtualenv`.
|
| 33 |
- Setup virtualenv:
|
| 34 |
```python
|
| 35 |
python3 -m venv .venv # if this fails you probably need to add Python3 to your PATH.
|
| 36 |
-
./.venv/Scripts/Activate.ps1 # `.\.venv\Scripts\activate.bat` should work in cmd in
|
| 37 |
pip install -r requirements.txt
|
| 38 |
```
|
| 39 |
- Copy `config.yml.default` to `config.yml`.
|
|
@@ -118,7 +118,7 @@ Any of the names following `option name` can be listed in `usi_options` in order
|
|
| 118 |
NetworkDelay: 100
|
| 119 |
Skill Level: 10
|
| 120 |
```
|
| 121 |
-
The
|
| 122 |
|
| 123 |
One last option is `go_commands`. Beneath this option, arguments to the USI `go` command can be passed. For example,
|
| 124 |
```yml
|
|
@@ -131,7 +131,7 @@ will append `nodes 1 depth 5 movetime 1000` to the command to start thinking of
|
|
| 131 |
|
| 132 |
- `abort_time`: How many seconds to wait before aborting a game due to opponent inaction. This only applies during the first six moves of the game.
|
| 133 |
- `fake_think_time`: Artificially slow down the engine to simulate a person thinking about a move. The amount of thinking time decreases as the game goes on.
|
| 134 |
-
- `rate_limiting_delay`: For extremely fast games, the [lishogi.org](https://lishogi.org) servers may respond with an error if too many moves are played
|
| 135 |
- `move_overhead`: To prevent losing on time due to network lag, subtract this many milliseconds from the time to think on each move.
|
| 136 |
|
| 137 |
- `correspondence` These options control how the engine behaves during correspondence games.
|
|
@@ -166,7 +166,7 @@ will append `nodes 1 depth 5 movetime 1000` to the command to start thinking of
|
|
| 166 |
- blitz
|
| 167 |
- rapid
|
| 168 |
- classical
|
| 169 |
-
-
|
| 170 |
```
|
| 171 |
- `modes`: An indented list of acceptable game modes (`rated` and/or `casual`).
|
| 172 |
```yml
|
|
@@ -175,8 +175,8 @@ will append `nodes 1 depth 5 movetime 1000` to the command to start thinking of
|
|
| 175 |
- casual
|
| 176 |
```
|
| 177 |
- `greeting`: Send messages via chat to the bot's opponent. The string `{me}` will be replaced by the bot's lishogi account name. The string `{opponent}` will be replaced by the opponent's lishogi account name. Any other word between curly brackets will be removed. If you want to put a curly bracket in the message, use two: `{{` or `}}`.
|
| 178 |
-
- `hello`: Message to send to opponent before the bot makes its first move.
|
| 179 |
-
- `goodbye`: Message to send to opponent once the game is over.
|
| 180 |
```yml
|
| 181 |
greeting:
|
| 182 |
hello: Hi, {opponent}! I'm {me}. Good luck!
|
|
@@ -204,7 +204,7 @@ python3 lishogi-bot.py -v
|
|
| 204 |
- It may take some time to quit.
|
| 205 |
|
| 206 |
## Creating a homemade bot
|
| 207 |
-
As an alternative to creating an entire chess engine and implementing one of the
|
| 208 |
|
| 209 |
Steps to create a homemade bot:
|
| 210 |
1. Do all the steps mentioned in [How to Install](#how-to-install).
|
|
|
|
| 25 |
### Windows:
|
| 26 |
- **NOTE: Only Python 3.7 or later is supported!**
|
| 27 |
- If you don't have Python, you may download it [here](https://www.python.org/downloads/). When installing it, enable `add Python to PATH`, then go to custom installation (this may be not necessary, but on some computers it won't work otherwise) and enable all options (especially `install for all users`), except the last . It's better to install Python in a path without spaces, like `C:\Python\`.
|
| 28 |
+
- To type commands it's better to use PowerShell. Go to the Start menu and type `PowerShell` (you may use `cmd` too, but sometimes it may not work).
|
| 29 |
- Then you may need to upgrade pip. Execute `python3 -m pip install --upgrade pip` in PowerShell.
|
| 30 |
- Download the repo into Lishogi-Bot directory.
|
| 31 |
+
- Navigate to the directory in PowerShell: `cd [folder's address]` (example, `cd C:\shogi\lishogi-bot`).
|
| 32 |
- Install virtualenv: `pip install virtualenv`.
|
| 33 |
- Setup virtualenv:
|
| 34 |
```python
|
| 35 |
python3 -m venv .venv # if this fails you probably need to add Python3 to your PATH.
|
| 36 |
+
./.venv/Scripts/Activate.ps1 # `.\.venv\Scripts\activate.bat` should work in cmd in administrator mode. This may not work on Windows, and in this case you need to execute "Set-ExecutionPolicy RemoteSigned" first and choose "Y" there (you may need to run Powershell as administrator). After you execute the script, change execution policy back with "Set-ExecutionPolicy Restricted" and pressing "Y".
|
| 37 |
pip install -r requirements.txt
|
| 38 |
```
|
| 39 |
- Copy `config.yml.default` to `config.yml`.
|
|
|
|
| 118 |
NetworkDelay: 100
|
| 119 |
Skill Level: 10
|
| 120 |
```
|
| 121 |
+
The exceptions to this are the options `Threads`, `USI_Ponder` and `MultiPv`. These will be handled by Lishogi-Bot after a game starts and should not be listed in the `config.yml` file. Also, if an option is listed under `usi_options` that is not in the list printed by the engine, it will cause an error when the engine starts because the engine won't understand the option. The word after `type` indicates the expected type of the options: `string` for a text string, `spin` for a numeric value, `check` for a boolean True/False value.
|
| 122 |
|
| 123 |
One last option is `go_commands`. Beneath this option, arguments to the USI `go` command can be passed. For example,
|
| 124 |
```yml
|
|
|
|
| 131 |
|
| 132 |
- `abort_time`: How many seconds to wait before aborting a game due to opponent inaction. This only applies during the first six moves of the game.
|
| 133 |
- `fake_think_time`: Artificially slow down the engine to simulate a person thinking about a move. The amount of thinking time decreases as the game goes on.
|
| 134 |
+
- `rate_limiting_delay`: For extremely fast games, the [lishogi.org](https://lishogi.org) servers may respond with an error if too many moves are played too quickly. This option avoids this problem by pausing for a specified number of milliseconds after submitting a move before making the next move.
|
| 135 |
- `move_overhead`: To prevent losing on time due to network lag, subtract this many milliseconds from the time to think on each move.
|
| 136 |
|
| 137 |
- `correspondence` These options control how the engine behaves during correspondence games.
|
|
|
|
| 166 |
- blitz
|
| 167 |
- rapid
|
| 168 |
- classical
|
| 169 |
+
- correspondence
|
| 170 |
```
|
| 171 |
- `modes`: An indented list of acceptable game modes (`rated` and/or `casual`).
|
| 172 |
```yml
|
|
|
|
| 175 |
- casual
|
| 176 |
```
|
| 177 |
- `greeting`: Send messages via chat to the bot's opponent. The string `{me}` will be replaced by the bot's lishogi account name. The string `{opponent}` will be replaced by the opponent's lishogi account name. Any other word between curly brackets will be removed. If you want to put a curly bracket in the message, use two: `{{` or `}}`.
|
| 178 |
+
- `hello`: Message to send to the opponent before the bot makes its first move.
|
| 179 |
+
- `goodbye`: Message to send to the opponent once the game is over.
|
| 180 |
```yml
|
| 181 |
greeting:
|
| 182 |
hello: Hi, {opponent}! I'm {me}. Good luck!
|
|
|
|
| 204 |
- It may take some time to quit.
|
| 205 |
|
| 206 |
## Creating a homemade bot
|
| 207 |
+
As an alternative to creating an entire chess engine and implementing one of the communication protocols (USI), a bot can also be created by writing a single class with a single method. The `search()` method in this new class takes the current board and the game clock as arguments and should return a move based on whatever criteria you desires.
|
| 208 |
|
| 209 |
Steps to create a homemade bot:
|
| 210 |
1. Do all the steps mentioned in [How to Install](#how-to-install).
|