Getting Started

There are a number a libraries you can select to begin writing your bot. Click here to get started.

Set up Bot vs Bot locally

You can also play against publicly available bots for testing or personal amusement by using the following application [1.0 MB] . Developed by Cryptious for SC2ai, you can load bots from various sources (see Downloadable Bots). Follow the ReadMe for instructions and troubleshooting. May requirement additional setup for bots outside of your framework.

Downloadable Bots

  • AI Arena
    -- House Bots: Most of the house bots were originally written by Infy & Merfolk for testing their own bots. They have kindly donated them to the community for use in testing.
    -- Authors: You can search bots by author and check if their bots are downloadable or by searching by Bots directly.

  • Starcraft 2 AI
    -- You can find and check for downloadable bots within their links from home page or by recent matches

  • ProBots
    -- 2020 Season 3
    -- 2020 Season 2

Viewing Bot matches

Machine Learning

Extra resources


A standalone plugin for python SC2 api maintained by EladYaniv.

Bot Memory - The Data folder

Bots can save files to a local data folder and these files will persist between matches. This is a good way to remember what worked and what didn't.

Recognizing opponents - The Opponent ID

A unique ID for each opponent is provided as a way for bots to recognize opponents. The ID is specified when starting the bot as a command-line argument after a --OpponentId flag.
bot.exe --OpponentId 29381a9a-d299-4fb6-b225-cd455c9cc38b
This ID can be saved in your bot's data folder if desired. wiki

ESChamp - Bits of Code

Misc notes below - yet to be structured

How do I know which of my units has been targeted by a Cyclone/Widowmine/etc?

The targeted unit will gain the relevant buff. e.g. for the Cyclone lock, it will gain the LOCKON buff as is listed here:

Increasing mineral gathering rates

Copy-paste, as written by ImpulseCloud (Holtan) in the sc2ai discord, starting at this message:

To see how to get the fastest minerals: He made one for SC2 too also, and I made some improvements to it, but haven't made any stats visualization for it can get a 10% speedup doing sock-folding and a couple of other tricks
I gave up before publishing anything. I did work with @yanntm(YoBot) to try to merge them into his bot. You can see some of that in It does manual ReturnCargo and Harvest actions to avoid the builtin 4-5 frame delay after the actions are done before the next action is queued. It also takes advantage of the trick of "exiting" mineral-walk will 'bump' the workers away from each other due to collision-physics, so if you have two workers that are mineral-walking thru each other, you have them exit mineral-walk as they pass their center-points, and then they get 'pushed' in their path-directions faster. and then also the 'magic-spot' trick where you have the worker sprinting to a point right in front of the mineral, so it doesn't take 2-3 extra frames to slow down before reaching (if in 'Harvest' action)
the one problem is that since it exits mineral-walk often, it will get screwed up by units (yours or enemy) walking thru the mineral-line, so you'd want to check for non-mineral-workers closeby whenever exiting mineral-walk. oh, using these tricks, you can also get that last load from a MULE the speedups actually 'oversaturate' close-minerals with just 2 workers, so if you don't force-pair on the mineral, one of the two will eventually end up waiting too long and leave the mineral you can even saturate far-minerals with just 2 workers if you use 2 speedlings to push/escort the workers back and forth (like pushing a merging-archon) but that would get too-crowded to do for all workers, especially with the other tricks, there'd be too many collisions
but it would immensely speedup long-distance-mining, at speedling speed ( the push/escort only works if the pushed/escorted unit doesn't have a Move command tho)