Work on my Starcraft 2 bot is still slow going. Mainly because I want to write it in C#, and I am having trouble getting the dotnet SC2 API to work together with the ladder manager and with Starcraft 2 itself. I do still plan to make it work, though. Right now, I want to talk about my plans for the structure of the bot itself. Specifically, I will talk about which parts of my Brood War bot I intend to use for my SC2 bot.
Two main components of my Brood War bot are Tasks and BuildOrders. A Task tries to accomplish a goal using a select set of units. For instance a task may be to attack the opponent with the entire army, or send out a small drop to the enemy. There can also be a task to send out a single worker to scout for the enemy base. There can be multiple tasks active at the same time.
The second component I mentioned was the BuildOrder. The BuildOrder determines what the bot builds and when. Unlike what you would normally consider a build order, it also makes some high level decisions about when to attack, whether it should harass, what kind of units to harass with etc.. It doesn’t control the units for an attack itself, but it uses the Tasks to do this. The BuildOrder gets to turn Tasks on and off as it sees fit, to accomplish the goals it needs.
I put the actual build order together with the high level decisions because they are often related. When I have an aggressive build, I want to attack the opponent much sooner then when I have a macro focused build. If I want to, say, harass the opponent with Zealots, then I need to make sure to build the Zealots in time.
This abstraction of a BuildOrder and a number of Tasks works very well for me. When I create a new build for my Brood War bot I can usually manage with one new BuildOrder, perhaps a few Tasks. I usually need to change very little in the rest of the code. I hope that these will work as well for the Starcraft 2 bot.
One thought on “Plans for SC2 Tyr”