We provide guidelines for how a human plays against TStarBot-X. Please follow the instructions of this page which is self contained (You don't need care the training code when running the human-machine test). Note, currently it only plays zerg-vs-zerg on the map "KairosJunction". SC2 version 4.10.0 is required.
You need TWO machines for the human-machine test.
Machine A: the machine used by a human player. Windows or MacOS. Have the SC2 game installed. Version 4.10.0 game core is required, which can be ensured by opening an arbitrary 4.10.0 replay file (for example, here) that the auto-downloading will be triggered when necessary. We've tested for MacOS where the SC2 game is downloaded from https://starcraft2.com/.
Machine B: the machine where TStarBot-X deploys. Ubuntu is required. Using a GPU is recommended (otherwise the NN forward-pass can be slow, causing high delay and degraded performance). TStarBot-X has been tested on a laptop with GTX 1650 and ubuntu 18.04.
Here are the step-by-step instructions.
- Make sure that machine A can connect to machine B via passwordless ssh.
- One can google for how to do the passwordless ssh setup, e.g.,
here.
In summary, one generates the public and private keys on machine A,
then copy (e.g, using
scp
for remote copying) the private key to the folder~/.ssh
under machine B. Make sure thesshd
service has started on machine B. - Verify the passwordless setup by connecting to B from A and see whether it succeeds.
- One can google for how to do the passwordless ssh setup, e.g.,
here.
In summary, one generates the public and private keys on machine A,
then copy (e.g, using
- On machine B, install the two packages
DistLadder3
,pysc2 (Tencent Extension)
. See the section below for downloading. Just cd to the corresponding folder and typingpip install -e .
to complete the installation. The Linux SC2 binary version 4.10.0 is required, see the link here and here. Then install the main packageSC2AgentsZoo2
(see the section below for downloading) for TStarBot-X as follows:- To let TStarBot-X use GPU, you need install
cudnn
andcuda
- Have
virtualenv
installed. You can dopip install virtualenv
- Have ssh server started. You can do
apt-get install openssh-server
- cd to the folder
SC2AgentsZoo2/agent_TLeagueFormal14
, run the commandbash install_virtualenv3.sh
to complete the installation.
- To let TStarBot-X use GPU, you need install
- On machine A, install
DistLadder3
,pysc2 (Tencent Extension)
as aforementioned. Install also ther commercial SC2 on this machine.
Here is how to start the human-machine test.
On machine A, run the command:
python3 -m distladder3.bin.play_vs_remote_agent \
--human \
--port 6789 \
--remote <machine-B-usr-name@machine-B-ip-address> \
--replay_dir /Users/your-name/Desktop \
--map KairosJunction \
--game_version 4.10.0 \
--replay_name xxx-A-machine.SC2Replay
which starts a game UI that a human can play SC2 with mouse and keyboard.
For the --remote
arg,
if machine A and B happen to have the same user name,
you can also omit the user name and simply write --remote <machine-B-ip-address>
.
Examples: --remote [email protected]
or --remote 192.168.0.5
.
On machine B, run the command:
python3 -m distladder3.bin.play_vs_remote_agent \
--port 6789 \
--replay_dir /Users/your-name/Desktop \
--map KairosJunction \
--game_version 4.10.0 \
--replay_name xxx-B-machine.SC2Replay \
--player_name_path_config "TStarBot-X,/your/path/to/SC2AgentsZoo2/agent_TLeagueFormal14/,/your/path/to/the/config/file.ini"
to start the AI,
where the arg --player_name_path_config
determines an agent by its name (TStarBotX),
path (/your/path/to/SC2AgentsZoo2/agent_TLeagueFormal14/
),
and config (/your/path/to/the/config/file.ini
) in comma separated value.
The *.ini
config file specifies more detailed args for the agent,
e.g.,
whether to use GPU,
the NN model path,
the zstat path (a folder),
the zstat category,
probability for zeroing the zstat,
etc.,
as shown in the snippet below:
[config]
use_gpu_id=-1
;-1 for not using GPU, 0 means using GPU #0, 1 for GPU #1, etc.
...
chkpoints_root_dir=/Users/usr-name/tstarbotx/data
model_filename=TStarBot-X-33days.model
...
zstat_zeroing_prob=0.0
zstat_category=Normal174
...
tleague_interface_config.zstat_data_src=/Users/usr-name/tstarbotx/data/rp2124-mv8-victory-selected-Misc
...
We've prepared several agent config .ini
files,
as well as the corresponding NN models and zstat files (in a folder),
see the section below.
DistLadder3
Google Drive or Tencent Weiyunpysc2 (Tencent Extension)
Google Drive or Tencent WeiyunSC2AgentsZoo2
Google Drive or Tencent Weiyun
- zstat files (
rp2124-mv8-victory-selected-Misc
, a folder) used by the 8/25/33 days model Google Drive or Tencent Weiyun - Main Agent 8 days:
ini
config Google Drive or Tencent Weiyun- NN model Google Drive or Tencent Weiyun
- Main Agent 25 days:
ini
config Google Drive or Tencent Weiyun- NN model Google Drive or Tencent Weiyun
- Main Agent 33 days:
ini
config Google Drive or Tencent Weiyun- NN model Google Drive or Tencent Weiyun