TorchCraft is a library that enables AI research on real-time strategy (RTS) games such as StarCraft: Brood War. It makes it easier to control RTS games from machine learning frameworks through a client / server architecture, and enables researchers to serialize whole game states.

Machine learning research for RTS games

TorchCraft is a Brood War API (BWAPI) module that sends StarCraft data out over a ZMQ connection, allowing researchers to parse StarCraft data and interact with BWAPI from C++, Python (PyTorch-friendly), and Lua (Torch-friendlfriendly).

Get Started


  • Install StarCraft: Brood War (you will need to get a license), enter the game, and create a character.

  • 3

  • Follow the TorchCraft installation directions to copy common prerequisites, add the AIModule and AIClient, and develop the TorchCraft Server.

  • 4

  • (Optional) Install the Torch client or PyTorch, and start using examples.

  • More Tools


    ELF is a platform for game research that allows developers to train and test their algorithms in various game environments.

    Join Us

    Tackle the world's most complex technology challenges

    Join Our Team

    Latest News

    Visit the AI Blog for updates on recent publications, new tools, and more.

    Visit Blog