Experiments In RTS AI

A fascinating little study of Starcraft’s AI by software engineer Shamus Young reveals something you might not have expected from the game:

I’ve been curious about the quirks in the Starcraft AI and I’ve wanted a chance to see them do their thing in a deterministic environment. I learned some surprising things about this ten-year-old gem. While the races themselves are very nearly balanced in the hands of humans, it turns out the AI is a lot better at using some races compared to others.

It turns out, from Shamus’ experiments, the AI are rubbish at playing the Terrans…

The plucky researcher also suspects that Blizzard’s AI might even be a bit cheaty, with responses based on knowing your hotkeys… Anyway, what’s most odd about this is that I was playing a similar game setup with Tim from PC Gamer UK yesterday, only this time in Dawn Of War. We took one team, and then set up a team with three Imperial factions (two Sisters Of Battle and one Space Marine army) and a third Tau team. We had expected the large Imperial faction to cause is the most trouble, having three sets of hero characters at its disposal, but, contrary to our expectations, two of the Imperial factions became near dormant after the initial fights and didn’t venture far beyond their base. The Tau, relatively unharassed, then proceeded to attack en masse, and near wipe me off the map. It was only thanks to Tim’s monolith defense of my ruined base that I managed to rebuild a stronghold and pull through for us to win the game.

All of which made me wonder to what extent the proficiency of the AI is governed by the layout of the map. Perhaps the Tau had simply had a better starting position for the way the AI played, while the massed three-army Imperial side had spacked out because it didn’t know how to proceed without overlapping with itself. Were the Tau actually in a better position simply because they didn’t have any allies to compete with for capture points? Or perhaps Dawn of War’s electronic brain simply finds it easier to build and attack with Tau units. We may never know.

Needless to say, science needs us, and our experiments are continuing. We can now also revealed that playing two humans vs four AI necron armies is about the hardest thing you can imagine…


  1. Homunculus says:

    Soulstorm’s AI isn’t terribly good. In fact, it’s as shoddy as the rest of the new bits; a lot of the abilities possessed by the individual units simply can’t be used by the AI, because certain coding functions OR SOMETHING just weren’t exported for its use.

    Fortunately, as ever, enterprising fans have ameliorated the issue somewhat.

    This should provide a stiffer challenge if you and Tim ever fancy repeating your match.

  2. drunkymonkey says:

    “Ameliorated” is my new favourite word; thanks Hom!

    The thing I find with DoW is that it’s either too hard, or too easy – there’s no middle-ground between Easy and Standard, and this really stops me playing more skirmishes. If the AI reacted to what I did, and challenged me based on my strengths, and didn’t just tank rush my inferior forces, then I’d find the game immensely more playable.

    And the thing is, is that it wasn’t always that difficult. In the original Dawn of War, unpatched, the Standard difficulty was just right. It was superbly challenging, and matches could frequently go either way. If you were controlling a force you didn’t understand, or you were a newcomer to, then it was likely you’d be wiped pretty quickly, but even if you were quite slow to climb the tech-tree, and didn’t have that much skill, you could still win most of the time.

    For some reason, Relic upped the difficulty, and now to play on Standard is to pretty much concede defeat straight away. The enemies amass forces much more quickly, and soon you’re dead.

  3. Mike says:

    It’s not the blow-by-blow dissection I was expecting, but still a pretty interesting read.

  4. Fazer says:

    The link is broken or their server is down. Pitty, it could have been an interesting read.

    It can be read through Google’s copy of the page, although with no pictures – link to Shamus Young starcraft&hl=pl&ct=clnk&cd=2

  5. brog says:

    I’m not really surprised that Protoss AI wins when everyone has unlimited cash. It’s not really a fair test.

  6. Fazer says:

    I can’t edit previous post no more and the link was interpreted by the browser and is shown in a wrong way. Just type “shamus young starcraft” in Google and go to a copy link to the second result.

  7. Man Raised By Puffins says:

    @Fazer: The original link works fine for me.

    @brog: The guy who wrote the article acknowledges that, but it also seems that he gets similar Protoss dominance on normal difficulty where the AI doesn’t have effectively unlimited resources.

    Fairly interesting find this, cheers RPS.

  8. Homunculus says:

    If you’re feeling particularly voyeuristic, you can set up Soulstorm to fight itself. Murder each other for my entertainment, little space men and monsters. *munches grapes*

  9. Belo says:

    DoW is kinda wierd sometimes. I’ve had epic battles at some points, an then I’ve had others where it would seem the AI didn’t do anything except build a dozen power generators…

    There’s a DoW mod I messed around with at some point that makes AI changes, ‘Dawn of Skirmish’ I think it was called. Seemed to make the AI more willing to ‘play’ around with you rather than zerg you as soon as it could.

  10. Andrew Armstrong says:

    The skirmish AI mod is good for DOW.

    And someone actually went and looked at Starcraft’s “AI”? It’s a linear script! It builds the same things whatever the map! It falls down as Terrans because, as units go, they are generally weaker forces used to attack with in their build order! They also suffer where there is less space to build – you need a very neat and tidy mind to spread out the dozens of Terran buildings needed for 200 pop cap (or anywhere close to it).

    (Even basic AI changes to the default Starcraft AI can make it more competitive, to be honest, since the original’s build orders are odd at times).

    I think the “Insane” option performs better only because their build lists are slightly larger (they make more troops before attacking), as far as I remember.

    The main thing the AI does well, as in any game with abilities, is micromanage when to use them automatically. Same with Dawn of War, same with World in Conflict, etc. etc.

    Ahh well, frankly, I hope Starcraft 2’s AI isn’t hardcoded, else it’ll be a similar boring situation of predictable AI attacks. :)

  11. FngKestrel says:

    That’s a good article. While it doesn’t go into detail about what the AI is actually thinking about at a given moment, the overall analysis is interesting.

    @Andrew You’re probably right. I’d like to see the AI perform on a different map that’s more spread out and see if the results are different.

  12. malkav11 says:

    RE: Making the AI fight itself – I used to do that in WCII. It was pretty awesome. I’d edit everything so that it produced almost instantly for basically no resources, then set all the AI players to rescuable allies with one peasant/peon each. For whatever reason, this meant that that one peasant or peon would be rescuable, but everything it built after that would not…and all of the rescuable factions hated each other with an insane passion…but not you, the player. So there were constant streams of units wreaking utter carnage on everything. I always wanted to do likewise with a more interestingly differentiated game, but Starcraft and WC3 defeated my efforts on that count.

  13. Duoae says:

    I used to play DoW with two of my housemates on a team against three or four enemy AI – usually all Ork.
    The thing we discovered was that the AI seemed to concentrate on one or two of the allied factions, using the other two or three to ‘feed’ that major faction resources and space. At least, that’s how it appeared to work.

    I’d go back and check now if i could but (stupidly) Winter Assault deleted and/or made the game incompatible with replays from the original DoW… which was quite annoying.

  14. teo says:

    Good AI isn’t AI that’s not cheating
    Good AI is AI that is fun to play against

  15. Kirsten33Dp says:

    Your fantastic article just about this topic would be free for students, because they want buy thesis service and good dissertations or just thesis title.

  16. EdwardHart says:

    Interesting research! I’ve always been fascinated by AI and everything that’s connected with it so it was great to read this article

    research paper writers