Skip to content

Latest commit

 

History

History
116 lines (80 loc) · 4.44 KB

starcraft_in_windows.md

File metadata and controls

116 lines (80 loc) · 4.44 KB

Installing TorchCraft

TorchCraft is split in two different parts:

  • Server
    • process that runs along with StarCraft (that is where we instantiate a ZMQ server).
  • Client
    • TorchCraft object in lua / c++ / python, which consumes data (state) from the server and sends commands (actions).

Installation of TorchCraft is based on your platform, and whether you are using AIClient or AIModule.

NOTA BENE: StarCraft 1.18 is currently not supported - see bwapi/bwapi#710.

Windows Server

System Requirements

  • Windows 7 (XP and 8.1 are unsupported but should work, 10 did not in our last test)
  • Visual Studio 2013 (for developpers / contributors only, the Community edition is sufficient)
  • Starcraft (See below for installation instructions)
  • BWAPI (See below for installation instructions)

Installation

StarCraft (1.16.1)

BWAPI

TorchCraft, common prerequisites:

  • Copy $STARCRAFT/TorchCraft/config/bwapi.ini in $STARCRAFT/bwapi-data/bwapi.ini.
  • Copy $STARCRAFT/TorchCraft/config/torchcraft.ini in $STARCRAFT/bwapi-data/torchcraft.ini.
  • Copy $STARCRAFT/TorchCraft/BWEnv/bin/*.dll into $STARCRAFT/.
  • Copy $STARCRAFT/TorchCraft/maps/* into $STARCRAFT/Maps/BroodWar.

TorchCraft AIModule (DLL) for users:

  • Extract BWEnv.dll from the latest archive in the release page and put it in $STARCRAFT
  • Run $STARCRAFT/BWAPI/ChaosLauncher/Chaoslauncher - MultiInstance.exe as administrator.
  • Check the “RELEASE” box from BWAPI.
  • Click Start.

TorchCraft AIClient (EXE) for users (EXPERIMENTAL)

If you need support, please start an issue. The last time this was tested was 1.3.0.

Developing the TorchCraft Server:

  • Install Visual Studio 2013. The Community/Express version of Visual Studio is fine.

  • Clone TorchCraft into $STARCRAFT/TorchCraft.

    We recommend Git Bash for windows: https://git-for-windows.github.io/).

  • Set the BWAPI_DIR environment variable:

    • Right click on My Computer -> Properties -> Advanced System Settings -> Environment Variables. Add BWAPI_DIR to be where you installed it, likely something like C:\StarCraft\BWAPI.
    • Restart the OS to apply the variable to the system.
  • Open $STARCRAFT/TorchCraft/BWEnv/VisualStudio/BWEnv.sln and start hacking.

  • Compile in Release mode for the AIClient (you will get a BWEnv.exe ) and in DLL-Release mode for the AIModule (you will get a BWEnv.dll ).

Installing the Torch client (Linux)

Torch

(From http://torch.ch/docs/getting-started.html)

In a terminal or CLI, type:

$ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
$ git clone https://github.com/torch/distro.git ~/torch --recursive
$ cd ~/torch; ./install.sh

TorchCraft

$ git clone [email protected]:torchcraft/torchcraft.git --recursive
$ cd torchcraft
$ luarocks make *.rockspec
$ cd examples/
$ th simple_{exe|dll}.lua -t $server_ip # depending on if you launched the exe or dll