Description
BWAPI, the Brood War API, is a free and open-source C++ framework for writing artificial intelligence agents that play the real-time strategy game StarCraft: Brood War. It is used by students, researchers and hobbyists who want to build bots that control units, read the game state and test real-time AI algorithms in a commercial game environment. By default BWAPI only shows an AI the parts of the map it can currently see, so units that have moved into the fog of war are hidden, and it blocks user input so a person cannot take control of units while the AI is playing. These defaults can be changed for flexibility, unless a tournament module enforces them, and any change is announced when a match starts. The framework lets a bot read all relevant game state, get detailed information about unit types, upgrades and technologies, and analyse replays frame by frame to find build orders and common strategies. Bots can be written in C++ directly, or in Java through a separate tutorial. 1 copy of StarCraft: Brood War and BWAPI itself, building the example AI module, and running games with the Chaoslauncher tool. The project is hosted on GitHub.…
Highlights
- C++ framework for StarCraft: Brood War bots
- Reads game state and unit information
- Frame-by-frame replay analysis
- Fog of war and input rules by default
- Example AI module and quick start guide
Ratings & Reviews
No ratings yet
Be the first to rate Bwapi.
People also visit
Bwapi FAQ
What is BWAPI?
A free, open-source C++ framework for building AI agents that play StarCraft: Brood War.
Is it free?
Yes. The project describes itself as free and open source, and the code is on GitHub.
What do I need to use it?
A copy of StarCraft: Brood War updated to version 1.16.1, Visual Studio 2017 and the BWAPI install.
Can I write bots in Java?
Yes. The project has a separate tutorial for Java bots, and C++ bots use the latest release.
Does a bot see the whole map?
No. By default it sees only the visible parts of the game state, and the README says this keeps AIs on partial information.
Can a human control units during a bot match?
Not by default. BWAPI blocks user input unless the defaults are changed.
What are the best Bwapi alternatives?
Popular alternatives to Bwapi include BOT-MMORPG-AI, Openkore and Leek Wars. See all Bwapi alternatives



