Skip to content

Commit af3992b

Browse files
committed
Add README for hlt_client
1 parent c3030f0 commit af3992b

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

tools/hlt_client/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Halite Client
2+
3+
## Installation
4+
Download the tool from our [downloads page](https://halite.io/learn-programming-challenge/downloads). Run `python setup.py install` to install the client.
5+
6+
* If you have multiple Python installations, make sure to install using Python 3. You may also need to invoke `hlt` commands with `python3 -m hlt_client` if `hlt` throws errors.
7+
* You may have to `sudo` or use an admin shell.
8+
9+
## Usage
10+
The Halite Client will let you interface with our game servers and play games locally using the command line.
11+
12+
**Authorize your client**
13+
14+
Before you can use most features of the client, you'll need to authenticate your account. Run `hlt auth` and follow the directions to connect your Halite account with your local client.
15+
16+
`hlt auth`
17+
18+
19+
**Upload a bot**
20+
21+
Uploads the specified bot onto the Halite game servers.
22+
23+
`hlt bot -b [PATH_TO_ZIP] upload`
24+
25+
26+
**Download current bot**
27+
28+
Downloads your currently-playing bot into a zip archive.
29+
30+
`hlt bot -b [NAME].zip download`
31+
32+
33+
**Run any number of games**
34+
35+
This command runs the number of games you specify, creating save logs and replays as normal, and tells you the win ratio as games are played.
36+
37+
`hlt play -r [BOT_COMMAND] -r [BOT_COMMAND] -b [PATH_TO_HALITE.EXE] --output-dir [OUTPUT_LOCATION] -i [NUMBER_OF_ITERATIONS]`
38+
39+
* You may give two or four `-r [BOT_COMMAND]` parameters to run two or four player games.
40+
* `[BOT_COMMAND]` allows you to specify how to run a bot. The command defaults to Python 3; if only a path is given, the client will run the bot assuming it is a Python bot. You may also mix and match: `hlt play -r "python3 Halite3_Py/MyBot.py" -r "ruby Halite3_Ruby/MyBot.py" ...` allows you to compare bots in different languages.
41+
* The halite.exe game binary is required to play games. Specify the path after the -b (--binary) parameter: `-b Halite3_Py/halite`
42+
* If you'd like to specify the game map size, you can add `-W [WIDTH] -H [HEIGHT]` parameters. Game maps are 32x32, 40x40, 48x48, 56x56, or 64x64 in width and height.
43+
44+
45+
**Download replays**
46+
47+
* By user: `hlt replay user -i [USER_ID] -l [NUMBER_OF_FILES_WANTED] -d [DOWNLOAD_LOCATION]`
48+
This command will download .hlt replay files of a user by id.
49+
50+
* By date: `hlt replay date -t [DATE] -d [DOWNLOAD_LOCATION]`
51+
52+
This command will download .hlt replay files of all gold ranked games on the given date. The date format is eight numbers YYYYMMDD.
53+
54+
Adding the `-a` flag will include silver replays as well.
55+
56+
Adding the `--decompress` flag to the end of any replay download command will download .json instead of .hlt replay files.

0 commit comments

Comments
 (0)