A C++ StarCraft II bot playing Protoss. Built from scratch using cpp-sc2.
Table of Contents
Aeolus is a modern StarCraft II bot framework written in C++, inspired by the modular and scalable design principles of ares-sc2. Named after the Greek keeper of the winds, Aeolus is built to dominate the dynamic environment of StarCraft II with swift decision-making, strategic precision, and efficient resource management.
-
Behavior-Driven Architecture
Aeolus employs a behavior executor system to handle core bot actions such as mining, unit production, and combat. This modular approach simplifies development and encourages clean, reusable code. -
Advanced Unit Handling
Implements algorithms for unit prioritization, distance sorting, and effective micro-management during combat. -
Manager Pattern Design
Core functionalities are structured around a manager pattern, with every manager implementing theProcessRequest
interface for consistent, scalable logic. -
Utility Toolkit
A comprehensive set of utility functions for common tasks like sorting units by distance, pathfinding, and filtering.
This project uses the following third-party library:
-
nanoflann:
A lightweight C++ library for KDTree-based nearest neighbor search.
Licensed under the BSD 2-Clause License. See thethirdparty/nanoflann/LICENSE.txt
file for details. -
Eigen:
A C++ template library for linear algebra, including matrices, vectors, numerical solvers, and related algorithms.
Licensed under the Mozilla Public License 2.0. See theCOPYING.MPL2
file or visit Eigen's GitHub repository for more details.
Aeolus draws inspiration from ares-sc2, an excellent framework by Rasper. Special thanks to the ares-sc2 project for setting the bar for StarCraft II bot development and serving as a foundation for learning and innovation.
This project requires a compiler with C++17 support.
-
Before proceeding further download the actual map pack.
-
Put the downloaded maps into the
Maps
folder (create it if the folder doesn't exist):- Windows:
C:\Program Files\StarCraft II\Maps
- OS X:
/Applications/StarCraft II/Maps
- Linux: anywhere.
- Windows:
-
Install CMake.
-
Download and install Visual Studio (2017 or newer).
-
Get the project.
git clone git@github.com:hammer-hao/aeolus.git
-
Enter the working directory.
cd aeolus
-
Create Visual Studio project files in the directory "build". E.g. for Visual Studio 2022:
cmake -B build -G "Visual Studio 17 2022"
-
Build the project using Visual Studio.
start build\Aeolus.sln
-
Launch the bot with the specified path to a SC2 map, e.g:
build\bin\Debug\Aeolus.exe Ladder2019Season3/AcropolisLE.SC2Map
-
Install CMake.
-
Install XCode.
-
Install XCode command-line tools.
-
Clone the project.
git clone [email protected]:hammer-hao/aeolus.git && cd Aeolus
-
Generate CMake build tree.
cmake -B build
-
Build the project.
cmake --build build --parallel $(nproc)
-
Launch the bot with the specified absolute path to a SC2 map, e.g.:
./build/bin/Aeolus "/home/alkurbatov/Ladder2019Season3/AcropolisLE.SC2Map"
-
Install CMake.
-
Install
gcc-c++
. -
Install the
make
utility. -
Get the project.
git clone [email protected]:hammer-hao/aeolus.git && cd aeolus
-
Generate CMake build tree.
cmake -B build
-
Build the project.
cmake --build build --parallel $(nproc)
-
Launch the bot with the specified absolute path to a SC2 map, e.g.:
./build/bin/Aeolus "/home/alkurbatov/Ladder2019Season3/AcropolisLE.SC2Map"
By default, the API assumes the latest version of the game client. The assumed version can be found in cmake's output, e.g.:
$ cmake -B build grep 'SC2 version'
Target SC2 version: 5.0.5
...
However, sometimes one may need to compile with an older version of the game, e.g. to play with a Linux build which is always behind the Windows version. It is possible by specifying the game version manually, e.g.:
cmake -B build -DSC2_VERSION=4.10.0
To compile a bot capable to play on the AIArena ladder, configure the project in the following way:
cmake -B build -DBUILD_FOR_LADDER=ON -DSC2_VERSION=4.10.0
Licensed under the MIT license.