Starcraft: Bot Fight

By Shamus Posted Wednesday Apr 9, 2008

Filed under: Game Reviews 140 comments

I’m not sure who will find this interesting. This is an AI analysis of a ten year old videogame. This entire endeavor will sound absurd to people familiar with the game in question, and hopelessly esoteric to those that aren’t. Still, I’m putting this up in case there is someone else out there who is just as peculiar as I am, in that I find this sort of thing intensely compelling.

About a month ago I wrote a Starcraft scenario which allowed you to observe a game between AI players. 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.

This is a very pixelated map of The Hunters.  The map has eight starting locations, marked by the colored squares.  Players are randomly placed on the map, with one random spot left empty.
This is a very pixelated map of The Hunters. The map has eight starting locations, marked by the colored squares. Players are randomly placed on the map, with one random spot left empty.
The setup is this: Seven AI players. Randomized start locations. Using the Broodwar expansion. The last “player” is the human observer, who controls no units but who can see the entire map. The script in question runs on the map “The Hunters”, although it could easily be exported to other maps. There are two Protoss players, two Zerg players, and three Terran Players. The computer players are all set to “insane” level difficulty, informed that all other players are their enemy, and told to go at it. Mayhem ensues.

I’d usually let the game run overnight and check on the results in the morning. (Yes! This was my solution for being too busy to play computer games, I programmed a game to play itself for me!) A game normally takes a couple of hours, although rarely one will end in an hour, and several became endless stalemates.

At first I just set the difficulty to “normal”, but I found that the computer players were far too likely to consume all the resources on the map, go broke, and then just sit there. I’d start a game before going to bed, and when I came back in the morning I’d find the battle was down to three sides who couldn’t make any fighting units. I changed the difficulty to “Insane”, which auto-cheats by giving itself 2,000 minerals and gas anytime it goes broke, meaning the thing is always rolling in resources. This made sure that most battles came to a proper conclusion. Although this made battles larger, more spectacular, and a little more chaotic, it didn’t seem to affect who won. I ran many overnight battles with both AI setups, and while higher difficulty made for inflated scores, over many games the results painted a clear picture.

A note about the AI difficulty settings. Skip to the end if you just want to read about how it turned out.

I dislike this auto-cheat for a number of reasons, mostly because it negates a lot of the strategy in the game. None of the players can go broke, but the AI still plays as though resources were important. The only true way to knock a player out of the game is to annihilate their core base with all the critical buildings in it. Expansion bases are (mostly) worthless in a game like this. Yet the computer still builds and defends expansions (because that’s what it’s programmed to do) and still wastes time attacking enemy expansion bases. This introduces a bit of luck into the game: Who wins depends a lot on positioning. The AI tends to attack the nearest base, not the most important one. Sometimes the nearest base is the core base. Sometimes the nearest is an expansion which is pointlessly destroyed and rebuilt over and over again.

Like I said, in the long run it didn’t really change the fact that one race continually came out on top.

Anatomy of an AI battle

Without the unpredictable actions of a human involved in the match, the AI fights like clockwork. Games have a perceptible rhythm to them. They all build their first couple of buildings within a few seconds of each other. Even these variations are probably the result of minor changes in the layout of each base. If the bases were somehow shaped the same, the players would probably all build in perfect unison.

They build an initial attack force. On insane difficulty this attack force is huge – probably sixteen or so zealots or the given race equivalent. On normal difficulty the force is smaller, but the behavior is the same. They all leave the base at about the same time, and (as far as I can tell) attack a foe totally at random. Sometimes this foe will be a neighbor, and sometimes it will be someone all the way across the map.

This is the most chaotic and unpredictable part of the game, and it’s basically a crapshoot. Usually one or two players get taken out. Nobody has any defenses at this point, so when an enemy comes knocking, their survival is a matter of luck: The defender has an attack force elsewhere on the map. Is that force still intact, and can it be recalled before the place is destroyed? Are there enough of them left to save the place? A player can also do really well if they are attacked by two people at exactly the same time – the attackers end up wiping each other out and leaving the buildings alone.

The AI seems to wait until this initial attack force is nearly all dead before entering the next phase: It builds defenses and another attack force. Again, this force is sent out. Once gone, the AI begins trying to build its first expansion base.

The rest of the game is a series of escalating attack waves. As they add more buildings onto their main base they work their way up to air units, and this is where you start seeing some differences in how well the computer handles the different races.

The Different Races

If you’ve never played Starcraft, you’re probably not even bothering to read this, but just in case:

The Zerg are a bug-like race. Think H. R. Giger Aliens or Starship Trooper aliens. Their units are usually cheap, plentiful, and weak. They are made to be mass-produced and sent to their deaths. The Protoss are highly advanced aliens with lots of fancy technology. Their units are very expensive but very durable. Their units are usually less numerous. Their shield technology encourages you to try and make sure they survive a battle so you can recharge their shields and send them off to fight again. They are not intended to be disposable units. The Terrans are the humans and fall somewhere between these two extremes in terms of cost vs. unit lifespan. It’s actually far more complex than this, but that’s the general, high-level, broad, big-picture overview. Volumes have been written on these three races and we can’t begin to cover it all here. Just remember: Zerg = cheap and weak, Protoss = expensive and tough, Terrans = Somewhere in-between.

I expected the AI to excel at using the Zerg, since their intended usage fits nicely with how the computer behaves: Churn out masses of units and fling them at the enemy without regard to casualties. I expected Protoss to be the worst, since the send-them-to-die policy of the AI would end up squandering a lot of very expensive units.

The Results

Without a doubt, the AI is far better as using the Protoss. It’s not even a contest. The only time a Protoss would get wiped out would be if they had a stroke of bad luck in the initial first-wave attack, which is always a game of Russian Roulette. Assuming they survive that, a Protoss AI is probably going to go the distance. The only foe they have to really worry about is the other Protoss. In the dozens of games I ran, only once did I see a game where the top spot wasn’t occupied by a Protoss. Most of the time two protoss players occupy the top two slots in terms of scoring.

This is the outcome of a very typical battle.  Protoss kicking butt. Zerg coming in second.  Terrans going extinct in some kinda hurry.
This is the outcome of a very typical battle. Protoss kicking butt. Zerg coming in second. Terrans going extinct in some kinda hurry.

The Terrans were unquestionably the worst in the hands of the AI. Despite the fact that there were (usually) three Terran players, thus slanting the odds in favor of a Terran-dominated game, they never got above third place, and often the Terran players would occupy three of the bottom four slots. They were more likely than the other races to get wiped out in the first rush, and if they survived they had a terrible time doing real damage to their foes. Despite the fearsome power of the Terran Battlecruiser, the AI was very shy about building them. Even with limitless resources, it never built more than a few and it never used them very well. Even late in the game it was building Wraiths, and it would not quit making them no matter how absurdly poorly they performed. The Terrans seemed to maintain a smaller force. It used Siege Tanks poorly, sent Marines to fight without Medics, and generally fought like a complete tool.

The computer did alright with the Zerg, although it was moronic with its mix of air units. Guardians were often sent in with too little support, making them easy fodder for enemy defenders. If it used Defilers, it was likely as not going to hit its own units when using plague.

Other Notes

A familiar battle: Siege Tank vs. Mutalisk.  Also popular is the Valkyrie vs. Dragoon fight.  The Terran AI always seems to have the wrong unit, at the wrong time, in the wrong place, doing the wrong thing, and not nearly enough of them.
A familiar battle: Siege Tank vs. Mutalisk. Also popular is the Valkyrie vs. Dragoon fight. The Terran AI always seems to have the wrong unit, at the wrong time, in the wrong place, doing the wrong thing, and not nearly enough of them.
When I fight the AI Protoss, it uses the Templar Psi Storm with murderous efficiency. I’ll have a tight group of units moving into its base when a Templar will appear in juuuust the right spot, drop a Psi Storm on my guys, and dart away before I can punish him for it. With a couple of Templar available he’ll play hit-and-run with me all day, and do tremendous, infuriating damage to my forces.

Against other AI, the Templar are bumbling comic goofs. They will drop Psi Storm on single enemy units and hit a bunch of their own guys in the process. They will blunder through fortified territory attempting to reach a unit deep inside, and get cut down before they even get close.

I’ve come to suspect that the AI cheats a bit and detects clusters of units which have been grouped by hotkey by human players. This is very naughty if it’s true. What’s worse is that peeking at how my hotkeys are set up seems to be central to its decision making. Deprived of that bit of cheating info, the Templar is helplessly stupid. Boo.

I’m note sure why the thing is so bad at utilizing Terrans. Aside from the issues I mention above, it just seems less aggressive overall. It also has a penchant for building base defenses (bunkers, towers) in places where a base should go, effectively rendering a viable expansion useless. It will attempt to lunch nukes without bothering to cloak the Ghost first. It will risk the painfully expensive Science Vessel in order to irradiate something of very low strategic value. It makes small numbers of all units instead of focusing on a few and using them well.

Still, this was an amusing experiment. If you have the Broodwar expansion for Starcraft you can try it out yourself. You can get the map here:

Exhibition-TheHunters.zip(73k)

You DO remember where your Starcraft disks are, don’t you?

 


From The Archives:
 

140 thoughts on “Starcraft: Bot Fight

  1. What gives the Protoss the edge here? Is it just that their control of the Humans and Zerg are hopelessly stupid, or it is that the AI’s favourite tactics (ie. Zealot rushes) are more effective with Protoss units? I’m assuming the Protoss AI is still a bit stupid, but its stupidity doesn’t hurt it as much?

  2. Shamus says:

    Darcy: Well, it is terrible at playing the Terrans. But when it comes to Protoss vs. Zerg, I think you’re right: It’s stupidity isn’t as harmful (to itself) when using Protoss units. Blindly flinging Guardians at an enemy base is just a waste, but you can fling carriers at an enemey base and do quite well because they are a little more able to defend themselves.

    And yes, the Zealot rush is just horrifying.

  3. krellen says:

    Given unlimited resources, the Protoss are sure to dominate. The usual way the Protoss go down is losing all their resources. Otherwise, being able to continue to pump out troops will inevitably make them win.

  4. Shamus says:

    I should add that Protoss dominate even without infinite resources. It’s just that The last two protoss are usually too broke to finish each other off. :)

  5. Doesn’t surprise me that much. The Terrans always struck me as having capabilities that need to be fiddled with to work. Basically, where Protoss technologies for the most part are elegant and Just Work, which makes them fairly easy to get decent use out of, Terrans have more what I’d describe as a “bag of tricks”. They can be effective, but you have to be clever enough to use the tricks. This is true from the unit types (which have to be carefully deployed to support each other to really shine, as opposed to say Dragoons which pound for pound can take on most foes, ground or air, fairly well) to the special abilities (which tend to require thought as to setting up their use, when to turn them on and off so as to maximize their usefulness and not get caught empty and so on). Even the brutal Terran tanks are deeply vulnerable to air power, cloaked things and so forth, and don’t steamroll the enemy unless you are effective at switching to and from siege mode. So they need support and moderately careful handling.

    So I’m not surprised. Terrans can work effectively, but they require a bit more care and feeding to reach half decent effectiveness levels, and not via the brute-force maximizations that AIs are decent at.

    Not to say Protoss and Zerg don’t have tricks. But they don’t depend on them as much. A not-too-bright AI can operate them effectively without using the tricks well.

  6. Maniakes says:

    Hmmm, before reading the last section I was assuming that Protoss were better because the AI made better use of their special ability units than Humans can — I hardly ever used Templars despite their theoretical value because I can’t click fast enough to take full advantage. Human pros are much better at fast clicking than I am, but the computer theoretically should be better still. But you’ve already looked at this and found it not to be the case.

    The major limitation I’ve seen to the Protoss in human vs. human games I’ve played is that the Protoss hit the supply limit much earlier than other races (unless, of course, you mind control other races’ worker units to build whole slave bases with independant supply pools, but that only works on high-resource maps against players who give you plenty of time to develop). If the attack waves are timed close enough, then the Terran and Zerg advantage of being stronger when supply is maxed out is eliminated.

  7. Galaxian says:

    Shamus, you are not alone in your AI curiosity. I recall doing something similar when Age of Empires came out, and, even further back, falling asleep while my Sinclair ZX Spectrum (48k!) went multi-wizard on itself with the mid-80s turn-based strategy game ‘Chaos’… just so I could see how it was ‘thinking’. Man, I miss that game.

  8. As to supply limit, to me it depends how you play the Protoss. Personally, I never build carriers, for instance. I put together a little test scenario and found that two dragoons (2! Count them!) can take out a carrier which costs way more and has to pay for all those little blighters on top of it, and replace them when they die. Equal weight in scouts takes them out, too. They’re inefficient.

    Thing about Protoss is, if you play them fairly conservatively, even defensively, you can be effective on relatively low resources. The goal in an engagement with Protoss is low casualties. You shouldn’t have to go around replacing Protoss units very often.
    Dark Templar are amazing for this. Put a couple of Dark Templar on the *defensive*, right by your base and your laser batteries (not all by themselves, obviously). Shoot anything that comes near that can spot cloaked things, and watch the Dark Templars kill everything else that moves with no hope of retaliation. So sweet.
    As base defenses go, Protoss laser batteries are very efficient. Other races have stuff that can hit air and stuff that can hit ground, so you have to build some of each. Laser batteries hit both, so on any given attacker you can concentrate double the firepower. And they aren’t actually that expensive.

    Sure, Zerglings and Marines are cheap–but after you get a dozen of them shredded while the Protoss lost nothing, which was cheaper?

  9. Alenuska says:

    Interesting. However star craft is rather old I admit id be rather impressed if you had tried this experiment with somthing a bit more current like Dawn of war or the newest command and conquer or possibly compared the results from three different games.

  10. riodoro says:

    geiger = false
    giger = true

  11. Shamus says:

    Giger: Fixed. Thanks.

  12. I remember playing the campaign missions when you’re playing the Terrans and fighting other Terrans. It got hilarious when they got nukes, because I was always careful to keep my base surrounded by detecting towers. So the ghost would carefully sneak up to the very first tower and nuke *just that tower*. By the time they had another nuke ready, I’d built the tower again.

    I played some scenarios where the enemy Terrans nuked the same tower six times and never got any further into my base.

  13. Shandrunn says:

    You’re wondering who would find this interesting? Are you kidding me? I LOVE this sort of thing!

  14. GamerCow says:

    I’ve never played Starcraft. But I’m geek enough to recognize the terms and whatnot used in this post, and I found it fascinating. Of course, I also used to watch the Borg Bot on angband for long stretches of time.

  15. bkw says:

    One of the things about the StarCraft AI is that it doesn’t handle carriers very well at all — the targets you are attacking with a carrier views the *interceptors* as dangerous, and will attack them, and not necessairly the carrier itself.

    For example: when a carrier attacks a missile tower, the tower fires at the interceptors, not the carrier (unless the carrier moves into range before launching interceptors). Marines and hydralisks *also* will attack interceptors. If interceptors are deployed, the interceptors will be taking damage — not the carriers themselves.

    The balancing limiter of the Protoss was always that their units were terribly expensive: on a large map with unlimited resources, the protoss should always win, unless they are killed in the opening gambits.

    I think if you were to run this simulation on, say, Bloodbath (mod for 5 players, with the 5th being an impartial observer on its own island), your results would probably be very different. I would suspect the Zerg would have an advantage, but … hmm. I think I’ll run some tests myself tonight! ^_^

    A protoss rush isn’t that difficult to defeat; it just requires a very specific build order, and that build order will gimp the rest of your game unless it is successful, and the destruction of the early zealot rush is capitalized upon.

    I’m not sure I’ve ever seen the necessary opening gambit used by the AI, however, so AI vs AI games will always fail vs the early zealot rush.

    Anyway: my contention is that the protoss will always win in the scenario you’ve set up because:

    1) you’ve removed the economic limitation
    2) the StarCraft AI is inherently poor at countering carriers
    3) none of the opening AI gambits work well against the early zealot rush

    I think point 3 is the most important reason, as you’ve noted the Protoss win even with limited economics, and not every game proceeds to the carrier stage.

    It might be interesting to run scenarios where the map was configured to disallow aggressive flying units, but I imagine that would break the AI script. It’s a shame the SC AI isn’t more robust … but given that it still gets store shelf space twelve years later … it hasn’t needed to be.

    And yeah, I know what I’m going to be doing tonight. :)

  16. Phlux says:

    Shamus: Have you tried going into a fight with the Protoss AI and NOT grouping your units via hotkey to test your hypothesis?

    Peeking at player info is a major cop-out in AI programming. The only time it’s really deemed acceptable is when you’re moving beyond the “hard” difficulty and into “insane” or “nightmare” or whatever equivalent your game has. AI can only be so good, so in order to challenge a good player, it’s an understood compact with the player that the AI is allowed to cheat to amp up the difficulty.

    EDIT: Does anyone know if there is a particular race that has an advantage in human vs human play? I know for a while all my friends used Zerg because supposedly they were the best.

    1. Zachary "Zesty" Ramirez says:

      Personally, I am a zerg player…
      However, there is no best race in StarCraft. If you want evidence of this, watch games between Flash(T) and Jaedong(Z). There was never a clear victor. The great thing about StarCraft is that there is no (as we say in the Army) approved solution. Certain races will enjoy a superior build every now and then, but it is only a matter of time until someone innovates a counter build. Then it comes down to a matter of scouting the opponents build and responding with the appropiate counter. This is an oversimplification, but you get the idea.
      Also, my thoughts on why the terran are the AI’s worst race…players have long known that the terran bio (when not massed) is by far the weakest. In order to be effective the terrans must wall in (I am actaully astonished that no one has mentioned this yet). The wall in innovation that has become a staple of terran play was an explotation of the fact that many terran buildings(indcluding the barracks) can lift off. Basically, you wall in a narrow chokepoint in front of you’re base with a barracks and two supply depots, and build your forces behind the wall. Since the Marine is the only 1st unit that is ranged, a few weak marines can easily snipe the early attacks from the more powerful zealots and the more numerous zerglings. Since this innovation was not an intentional feature, the AI is not programmed to make use of it, hence their almost certain demise in the eraly game. But I have been rambling on a blog that no one is likey to read (as it is so old)…if anyone is interested in playing either SC1 or SC2 with send me an e-mail.

  17. Mad Tinkerer says:

    “This entire endeavor will sound absurd to people familiar with the game in question, and hopelessly esoteric to those that aren't.”

    Actually, the first thought that popped into my mind was “awesome!” rather than “absurd!” ;)

    Also “Yes! This was my solution for being too busy to play computer games, I programmed a game to play itself for me!” made me laugh.

  18. Nentuaby says:

    “EDIT: Does anyone know if there is a particular race that has an advantage in human vs human play? I know for a while all my friends used Zerg because supposedly they were the best.”

    The fact that there is not to any significant degree has basically been the reason Starcraft has succeeded so admirably as an “e-sport” game.

  19. Dillon says:

    I have noticed in other games vs. a computer that the protoss seem to build more resources worth of zealots than the zerg seems to build of zerglings.

    On terrans, I agree with the person above with the terrans needed more fiddling to work than the protoss and zerg do.

  20. Burning says:

    I concur that this is a really cool exercise, and I’ve never played Starcraft.

    I test software for a living (although not games) and I would actually think that this is one of the things a game developer should do to shakedown their AI before release.

  21. Ed Borden says:

    I will take my Starcraft disks to the grave with me. What kind of question is that? :)

    The fact that the computer rushes any of its opponents’ position on the map I think shows that it cheats the fog of war. I’d like to see you run this with a few empty player slots and see if it ever goes to an empty position. I doubt it would, and it never sends units to scout. You can never “hide” expansions against it.

  22. MaxOverdrive says:

    I have a feeling that the AI may have been tweaked for the INITIAL release of the game, and may not be balanced for any nerfing or tweaking that was done in patches after the fact (patches being mostly for hvh play) But who knows how this would affect the outcome

  23. guy says:

    i’ve seen plenty of games with AIs duking it out with eachother, and never noticed any of that. i have, however, noticed that the AI doesn’t use top-teir units often. battlecruisers, carriers, guardians, and defilers are among them. aslo, how do you change star craft AI difficulty? i thought they didn’t have changeable difficulty, unlike warcraft3. maybe you should mod your script to work on another map and see how that works. the protoss advantage may be a local phenomon.

  24. JFargo says:

    I only recently started playing Starcraft (yes, yes, I’m behind the times; I’ve also never beaten Half-Life), and I found this absolutely fascinating!

  25. Dan says:

    Still on X-Com. Starcraft is next. I swear.

  26. Rhykker says:

    Great stuff, Shamus.

  27. guy says:

    you know, the scoring might be weighted towards the protoss, since they use alot of resources, build alot of buildings, and have high kill ratios. the zerg spend less and more units die per kill, plus they have less in the way of defenses and need fewer buildings to sustain their armies. a straight victory time of death counter would tell you more accurately how well everyone did.

  28. SolkaTruesilver says:

    It would be nice if Blizzard gave us a AI-script designer. I am sure some peoples who are cracks at programmation but lousy at quick-clicking could create incredibly strong AI.

    AI tournaments would be cool too! Let’s see how you programmed your beast! :)

  29. Felblood says:

    Actually, talking about Starcraft isn’t really “behind the times.”

    Plenty of people drag games like that out every couple of years, to see if they can make it further this time. I do anyway; I rarely have the fortitude to beat the second half of any given game before something else catches my eye, but the test of a truly great game is that you come back to give it a second go round.

    Spring break this year, I finally got to the final level of Broodwar (Omega). Someday, I will beat that level, conditions allowing.

    Maybe this style of play grew out of a childhood spent playing Super Mario World. It took my little kid self years to beat that game, and there are still levels I haven’t gotten around to unlocking, but someday I want to. Every level in that game was a brilliantly designed treat, that you’d never find in today’s Build-a-game-engine-throw-on-some-crap-levels-and-ship-the-thing mindset.

    Solka: So, like Final Fantasy XII, but for slow handed starcraft players instead of ATB haters (–who are totally encouraged to try Crisis Core. The new battle engine blends the best of old and new much better than it’s retarded PS3 cousin)?

  30. Ed says:

    I think you grossly underestimate the geekdom of your readership if you thought we wouldnt find this totally facinating. I believe your header says, you just rolled a 1 on your saving throw versus dork.

  31. khorboth says:

    I’m totally downloading this and using it to strategarize better. Thanks, it’s made of win (and also pixels).

  32. Cadamar says:

    Nice work, Shamus. However, if you are willing to learn Korean I’m sure you’ll find that this has been done.
    When I was in Seoul last year there were two, count them TWO channels in my hotel room dedicated to Starcraft tourniments. It was nuts. Color commentators talking excitedly about the strategies, girls, GIRLS!, going crazy over the players, large in-studio audiences gasping and cheering. Seriously! Two channels of 24 hour Starcraft. They have people who make livings as pro-Starcraft players. I’m not making this up. http://en.wikipedia.org/wiki/StarCraft_professional_competition
    They are crazy-insane for their Starcraft e-sport thing.

  33. Lanthanide says:

    “I have a feeling that the AI may have been tweaked for the INITIAL release of the game, and may not be balanced for any nerfing or tweaking that was done in patches after the fact (patches being mostly for hvh play) But who knows how this would affect the outcome”

    This is definitly true for Starcraft vanilla, and probably true for Broodwar as well.

    If you try and play the original Starcraft campaigns using the latest patches, level 3 of the protoss is very difficult compared to what it should be at that point in the game, because when the game originally came out sunken colonies were about 1/2 as fast and did 1/2 as much damage. Now however, unless you’re very careful with your units, you can easily get slaughtered before you get 1/2 way through the opening sequence. I know comparing single player campaigns to AI is a little iffy, but I doubt Blizzard made any significant changes to the AI until Broodwar, despite the numerous balance changes prior to that (obviously the AI would account for things like cost changes, but not neccesarily for things like damage type or unit size changes).

    1. aldowyn says:

      I thought balance changes usually didn’t affect the singleplayer for pretty much exactly that reason? Maybe that’s a more recent thing :/

      Now that I think about it, I can think of at least one change for Battle for Middle Earth that breaks a certain sequence in the campaign… (You’re supposed to enrage a Mumakil by shooting fire arrows at it so it tramples this line of enemies, but they don’t enrage anymore)

  34. Adamantyr says:

    I like Starcraft, but I can’t say I’m a huge fan of RTS games… SC is a fine game, but the micromanagement required to win just isn’t what I find fun at all… I guess that’s part of why it’s popular for tournament play in South Korea; a lot of work is placed on the human player, the units are pretty much dumb. I wonder how SC2 will deal with it.. will your units be dumb as rocks again, having to be told to do everything, or will that be a “tournament mode” option so single-player games can have units that actually do a bit of thinking for themselves?

    As far as AI goes, a big problem for me in RTS games is the path finding. A friend recommended I try Total War, and almost immediately I was aggravated by the STUPID AI that, when my army tried to move through the gates of London and got bottlenecked started sending guys AROUND the city! What annoyed me the most was this is no different from RTS games from ten years ago. Why haven’t they written a smarter pathfinder? It’s not like they lack the memory and processing speed to do so.

    As far as AI cheating, it would not surprise me in the least if the SC AI is “peeking” under the fog of war, or checking hot key assignments. It really has to in order to provide any semblance of a challenge.

    A lot of AI is dependent upon recognizing patterns. Human beings are incredibly good (compared to a computer) at pattern recognition. I did some work with map conflation and it becomes readily apparent how STUPID computers are at such things. We can look at a mess of lines and find a match instantly; a computer has to store points, match angle, length, etc., try line combos of every order and proximity…

    So in an average SC game, the computer AI sees a single enemy unit easily, but how does it know if a group of units are, in fact, a congested group ripe for a Psi attack? It could store all units in a given distance, check distances in between, and make a balanced judgment call if those units are a group “now”. But will they still be in the time that it takes a templar to get out there and frag them? Should it measure over time to see if they remain in a group? All this ends up being a lot of extraneous data that would probably (On a 1998 PC) end up crashing the game since this is just one of hundreds of tactical decisions it may be doing. Or it can just peek at the hot keys and say “Yep, that’s a group, just go to unit X’s location and attack.”

  35. Joshua says:

    I was all set to make a post until I noticed Ed Borden beat me to it. I’ve often wondered how much the AI “cheats” when it comes to the Fog of War. I’ve often suspected that the exploration units like the Observer and Science Vessel were mostly for show and for detecting cloaked units rather than actual exploration. It never seems as if the computer has to blunder around to find your base…..

    As far as the play-styles, you would think that the computer would do better with the Terrans than actual players due to the higher amount of micro-management involved(repair buildings and units, etc.), but it seems like the delicate touches the Terrans often require to maximize their advantages offensively are beyond the computer. You will seldom also finding the computer taking a whole force of power units like 12 cruisers or siege tanks against your defenses.

    One way to “cheat back” against the computer’s zealots rushes at the beginning are to have a small force attack the invaders and then run away somewhere else. The zealots will usually chase after their attackers, even though the targets are much less important than destroying your base. How long this strategy works in the long-term, however, I don’t know.

  36. Namfoodle says:

    I agree, this was a cool exercise. I was always fairly certain that the AI cheated and ignored the fog of war. It also makes sense that it would cheat and use hotkey groups for targeting psi storms.

    I was always curious about how the AI was set up. It’s frustrating when the AI can exhibit perfect control of multiple units. I would love to be able to edit the AI for my side so that I can decrease the stupidity of the individual units.

    I need to find my Starcraft discs! I don’t think I ever istalled the game on my XP machine – I played it on my windows 95 machine. All this talk of Starcraft has me wanting to play again.

  37. Freykin says:

    Me and a friend do a similar thing for the map DotA for Warcraft 3. We’ll each pick 4 heroes for our side, and then observe the match and see how it goes. It’s kind of like being a manager and drafting players for your team :) It’s a fun way to test out combinations, and when I was still living with him, we would sometimes use it as a way to determine who’s turn it was to make dinner :P

  38. Hawkehunt says:

    Dammit Shamus, that’s 2 games now I need to install and play again despite my overload of Uni and work ;) I just hope my SC discs still work – I seem to remember that one – BW I think – died on me, and I don’t have enough cash to replace it.

  39. GAZZA says:

    Well, Starcraft is the best RTS ever made, so it’s not really unusual to be discussing that instead of whatever the latest one is.

    This is very interesting work Shamus. I’m a bit curious as to what happens if you set up a “2” player game (I guess you’d actually need 3, to include the human observer), since that would seem to take out the crap shoot of getting ganged up on at the start.

  40. IskatuMesk says:

    The AI doesn’t detect hotkey groups; psi storm is entirely based on proximity of enemy units and once triggered the templar will cast it in that location even if the enemy units aren’t there anymore.

    (To be exact, the AI casts psi storm on a single unit with very high hit points, such as an Overlord. This is also how yamato works. The proximity of the unit in relation to the templar has a small bearing on its cast time, but the AI cannot detect hotkey groups. I don’t even use hotkey groups.)

    This is a pretty general summary. If you are really interested in learning how this AI works, or how to build scripts, you should probably check out my bible. I have posted only a small fraction of what I know about the AI, but if you are really interested in learning how it ticks, this is a good start.

    I’ve been modding Starcraft AI for 8 years. If you’re getting tired of the old stuff, you may want to have a look.

    http://forum.samods.org/index.php?topic=5400.msg93187

    Also, DotA’s AI is programmed by players completely.

    Also, if you think the standard zealot rush is at all a challenge, perhaps you should try out my TGA AI I released recently for tournament purposes. I plan to release this modification at campaigncreations.org very soon. If you guys are interested in spicing up Starcraft skirmish, stay tuned.

    edit – http://www.campaigncreations.org/forum/index.php?topic=755.0

  41. Kris says:

    I do know where the discs are, the problem is I tossed the Jewel Cases ages ago when all my games got plopped together into a binder. Now I have no CD-Key for them. I was really annoyed when I first discovered this blunder, but now it’s kind of funny. Le Sigh… I even bought the damn game, too, I just can’t play it.

  42. Namfoodle says:

    Hey, wow, a whole site full of downloadable campaigns. I was always better at campaigns than PvP or skirmish. Now I really need to find my Starcraft discs!

  43. Mephane says:

    I am wondering how something similar would turn out with Dawn of War. I am playing that game at the moment and I am seeing similarities, the AI is very poor at teching up the orcs, and sending far too little numbers to be effective most of the time. Even as a Tau player, I just have to manage to successfully fight the initial wave of melee fighters they send at me, which are easy prey if you combine Kroot Carnivores with Fire Warriors. After that, their waves usually get eating by my ranged units before they can doing any serious harm.
    On the other hand, space marines for example, make way better attack forces (although the AI doesn’t get it when I defend with stealthed units, adding Scouts to its troops totally randomly, even if they always get eaten by my Ghosts; however, later in the game the Ghosts are too weak so this tactic just works in the earlier stages of the game). Especially later into the game with higher-teched units, they can make quite formidable damage to your base if you don’t look after your defenses yourself. While at the same time, Orcs are just running into certain doom again and again, and can often be defeated just by bombing his base with a couple of Barracudas. It feels as if the programmers forgot that some races have some rather different mechanics than others and just have the same AI for any of the races (Orcs need to build masses of WAAAGH!-Banners to tech up instead of researching technology in a handful of specialized buildings, but even late in the game they have like two or three only in their base).

    I’d love to see what would happen if AI was fighting each other in DoW the way you could observe it in Starcraft. I suppose either Necrons or Space Marines would win, but I might be wrong.

  44. Vander says:

    Just ran it and the terran kicked butt, winning in 1 hr 35 mins. But watching them, they made heaps of stupid mistakes.

  45. mister k says:

    Thing is, if the AI spammed battlecruisers (well.. kinda) rather than wraiths, on stupid AI front battlecruisers can look after themselves pretty well… meh

    I tried something similar to this in Civ 2 on a WWii scenario that came free with the game to see which country had the best set up for victory. Sadly when left to their own devices wwii became a harmonic peacelike land where all the countries lived in peace and harmony…

  46. Greg says:

    Aww, it’s a shame the hotkey theory has been rebuffed. I was going to start hotkeying loads of expensive units to a cheap one and send it first into every battle. (with the rest at home)

    I wonder how much effect the map had. Lots of people have pointed out the effecitveness of carriers against the AI and since there’s a lot of water on that map I wonder if air units are of dissproportionate strength.

    I wonder if they did the “play different AIs against each other and see what happens” thing to work out which AI to release with the game. An AI that spammed the top tier aircraft would probably be better against a human player, but it would lose to an AI that spammed the lower tier aircraft (which are typically very powerfull air to air)

    Also do the AIs work out how to build their waves based on “I need X units” or “I need X minerals worth of units” because if it’s the former that’d give a clear reason for a Protoss win.

    An’ I’m annoyed about that cheat. No wonder me and Laura never beat the AI on insane. We typically invoked a “take more than half the rescources on the map then turtle till our opponent is helpless” strategy.

  47. Saint_007 says:

    You know, with all these huge Protoss advantages in terms of both human and AI abilities, one has to wonder how the hell the Protoss got their asses kicked in-game not once, not twice, but about four times by the others (Zerg under Overmind, UED, Zerg under Kerrigan twice).

  48. BlackBloc says:

    I tried something similar to this in Civ 2 on a WWii scenario that came free with the game to see which country had the best set up for victory. Sadly when left to their own devices wwii became a harmonic peacelike land where all the countries lived in peace and harmony…

    I guess the Cylons had a point then, maybe it’s just us humans bungling stuff up. :)

  49. GAZZA says:

    You know, with all these huge Protoss advantages in terms of both human and AI abilities, one has to wonder how the hell the Protoss got their asses kicked in-game not once, not twice, but about four times by the others (Zerg under Overmind, UED, Zerg under Kerrigan twice).

    This seems to cover that.

  50. JohnW says:

    Shamus, have you ever read “Artificial Life” by Steve Levy? Excellent book, the most fascinating part deals with using evolutionary programming. I don’t know if this is at all possible with Starcraft, but you basically set up a system to randomly combine sets of AI code to create a new generation of code. You run many simulations, like you do here, and the most successful examples are “bred” together to produce the next generation. Lather, rinse, repeat, and it is eventually supposed to churn out an optimized set of code much more efficiently than using human programmers to figure out every possible variation.

    I explained it better many moons ago on the Total War forums, but can’t find it anymore. But you may want to check that book out.

  51. Fakey McFakerson says:

    I do know where the discs are, the problem is I tossed the Jewel Cases ages ago when all my games got plopped together into a binder. Now I have no CD-Key for them. I was really annoyed when I first discovered this blunder, but now it's kind of funny. Le Sigh… I even bought the damn game, too, I just can't play it.

    You can’t play online with this key.

    3333-33333-3333

  52. Deoxy says:

    JohnW,

    The theory there is nifty, but in practice, it’s really very hard to do this in a useful way – you end up producing code that is VERY VERY good at… beating other code. Unless your code can grow big enough to have its own problem-solving skills, it will still have weaknesses that any semi-competent human can exploit.

    The only exception to this might be that AI can control all the units essentially at the same time, so it might be able to use THAT ability to defeat humans, but that’s hardly creating a good AI, it’s just using the input limitations humans face against them (and that’s really not a useful or fun way to play – wow, you can beat me with one person, even a relatively dumb one, for every single unit or controllable object you ever spawn, while I’m stuck with just me for everything – yeah, that’s fun).

  53. Downtym says:

    I would guess, but would need to watch a number of games to confirm, that the reason that the AI Protoss do better than the AI zerg or AI terrans is for the following reasons:

    1. The Protoss have regenerating health in the form of shields. This means that a unit in the protoss force is engaged at (effectively) full health. If a Protoss unit has 1 hp, but full shields then it’s pretty much exactly like fighting that same Protoss at full hp and full shields. This is because – on the whole – Protoss units are very squishy without their shields.

    2. The Protoss are an extremely “Form Follows Function” force. Zealots are excellent ground pounders that don’t need much in the way of support. You can build Zealots and upgrade them and have a very effective destructive force. As for Air combat, Scouts are extremely effective as well. Their missiles fire quickly, do incredible amounts of damage to other air units, and have anti-ground capability that allows them to pick off units which are not anti-air centric.

    3. On the whole, Protoss units seem to have more total hp out the gate then other units. The shields + natural hit points seem to error in the Protoss favor – compare for example the Paper thin Terran Wraith or the meaty Zerg Mutalisk with a Protoss Scout.

    4. The Protoss get one of the most valuable units in the game in the form of the Probe. An extremely cheap (once researched) unit which is permanently cloaked and provides field of vision for the Protoss. If information of your enemy is the greatest weapon then the Probe is an atom bomb of information warfare. To put it bluntly, there’s no way in this world that a cloaked unit should ever kill a Protoss unit.

    For the other races to succeed it requires a lot more combined arms effort. For example, to achieve the sheer Ginsu knife efficiency of the Protoss Zealot you need to mix Terran Firebats, Marines, and Medics. Of course, Firebats are a liability since – unlike Zealots – they can damage not other Terran units. Letting your Firebats get in a circle around a Protoss Zealot is guaranteed to be a Pyrrhic victory. However, the utility of the Firebat is that his splash damage is great *if* you can get the fiddly bastards in a chokepoint.

    For the Zerg, you need to pile on the Hydralisks and Zerglings. Hydras are perhaps *the* best common ranged unit in the game and Zerglings, once fully upgraded to Cracklings, can rip through enemy units and provide excellent blocking for Hydralisks.

    As to air units, neither the Terran or the Zerg have a very effective air force. Wraiths are made of paper and are clearly assumed to be cloaked while fighting. Mutalisks while cheap and great against massed air or ground due to their multiple hit ability do nothing to counter the Protoss who if they concentrate on massed units, do so through the Zealots and Carriers. Mutas versus Scouts is a slaughter in favor of the Scouts.

  54. Cineris says:

    Some quick notes – With the latest Starcraft patch, I believe, you no longer need your CD in the drive to play.

    Also, it doesn’t surprise me that much that Protoss are generally victorious in AI games. The AI is dumb about targeting interceptors instead of Carriers, and it doesn’t build enough BattleCruisers to auto-win as Terran. And Zerg air just can’t compete with either of those.

  55. Cutahlion says:

    Maybe someone already said this (no way I’m reading all those comments), but I bet it has to do with the campaigns.

    Which races are usually player races in the campaigns? Computer races? Include both the original and the expansion, especially the original, since that’s going to have the original AI any changes were likely built upon.

    I never really played the campaign, but I know the first game uses Terran a lot. So, if the hard levels of the campaigns don’t use Terran opponents as much as Zerg, and don’t use Zerg as much as Protoss, it makes sense for the developers to spend more time on the Protoss AI. That’s just my guess. Maybe the campaigns actually use Terran for the opponents in the ending levels. I really don’t remember much about the campaigns. But the more important a race is as an enemy in a campaign, the more time they probably put into it.

  56. Gary says:

    Just adding a note to the High templar thing. When I watched one scenario of this, I saw a couple templars all psionic storm a single area a couple times in a row… In a place where there were no units.

  57. Yahzi says:

    Best. Post. Ever.

    :D

  58. Ryan says:

    Thanks for sharing this. I love Starcraft and pull it out every once in a while. Knowing how the AI reacts is a great asset. I just wish there were a way to change how it runs so that maybe it would use different tactics.

  59. Kevin says:

    This doesn’t seem like an ideal scenario because there are too many random variables.

    What happens if you run different combinations of races on Blood Bath, or a six player map that is perfectly symmetrical?

  60. Else says:

    That was a really interesting analysis. Thanks for sharing it with the world.

  61. Renatus says:

    This is not true. Shields always take full damage, while their “health” damage is affected by armor and size.

    I’ve been playing Starcraft Broodwar for 10 years now. Many skirmishes vs AI and many against friends. This stuff is very interesting. I always like to take on 7 AI on a high resource map and watch the AI get ripped apart on my defenses. The best Protoss defense is 4-5 cloaked reavers in front of a bunch of photon cannons. Nothing gets through (only cloaked Siegetanks are better). Then I slowly destroy them with carriers, covered by corsais against those pesty scourges.

  62. Renatus says:

    Hmmm, something went wrong there. I replied on this line:

    If a Protoss unit has 1 hp, but full shields then it's pretty much exactly like fighting that same Protoss at full hp and full shields. This is because – on the whole – Protoss units are very squishy without their shields.

  63. John Raab says:

    It is well known throughout the starcraft community that the computer’s AI is very poor. This is why you see 1 player taking on 7 cpus and winning, etc..

    An AI for a real time strategy game is a nearly impossible task to get right. The only time it remotely works is when playing the single player campaigns where the AI developer knows beforehand what map is to be played and can setup a careful array of “triggers” for events to occur (attacks, reinforcements, and the like).

    Triggers are not used in a regular multiplayer game with computer opponents. Therefore the computer has to rely on AI. There is so much going on in a real time game of this complexity that it is hard for the computer to make decisions quickly. Turn based games have better AI because the computer has more time to “think”, and less options to choose from (think of a chess decision tree).

    I am not surprised the protoss were the best. Their units are the most powerful and therefore require less micro-management to keep alive. Carriers require very little skill to use as well.

  64. Jason says:

    The Templar Psi Storm is absolutely frustrating. This surely is the most devastating attack since they always hit and run. This is the best way to mess up a fleet of carriers or destroy the group of Mutalisks. Playing several games we seemed to notice the same thing about the Protoss. That they had the most successful first wave attack. If you made it through their rush that you could usually survive. Though the person who was attacked was usually crippled because of it (depending on the race). After not playing this game for years and getting wiped out by the computer we started watching the replays. The only thing we noticed is the AI seemed like it was doing multiple things at once which is a pretty good advantage. I’m glad I came across this to get further insight into the AI.

  65. Deoxy says:

    The only thing we noticed is the AI seemed like it was doing multiple things at once which is a pretty good advantage.

    That’s a huge advantage, right there, and the thing that most frustrates me as a player (that I can’t do that).

  66. Jim in Buffalo (the same!) says:

    Well, I’m going to run this scenario on my own computer tomorrow sometime.

    I’m a recovered StarCraft addict… hope this doesn’t make me relapse!

  67. Dave says:

    Perhaps put the Terran on a team and see how well they fare.

    Since the AI was probably designed only for the Protoss.

  68. Radivel says:

    Heya. Excellent article, very enjoyable, and this is coming from someone who has left his comp on overnight, on MELEE “FFA”, on Big Game Hunters, with 7 comps, just to see who wins. I seem to recall Terrans winning, and sometimes some races (usually zerg) just do nothing at all. Make 5 drones, and stop working.

    Something you DO learn about the SC Comp AI is that it has insane targetting ability. Occasionally, if there is a comp in melee, it will “4pool you”, as in, with zerg, build the spawning pool asap, and rush RIGHT AWAY. Now, if a human does this, a good defender can stack his/her probes in such a way that a human will be able to abuse the targetting of the rushing zerglings, and you can end up defending at least passibly. Vs the computer, however, they manage to target each probe individually and instantly, and basically tear you a new one – as soon as something hurts something of theirs, they target it immediately, thus destroying everything that could stop a human in a matter of seconds.

    This is the same reason why they target the interceptors of a carrier, rather than the carrier itself.

    Where am I going with this? Nowhere, really, just another observation… ;)

    I enjoyed this a lot.

  69. Wix says:

    I haven’t played SC in years. Once though I sat down with a buddy and we decided to take on 6 insane teams to our 2. The match took about 4 hours or so and for some reason we watched the replay afterwards. During the replay we made quite the discovery when it comes to the computer AI. It cheats like hell! We were on a similar map and with 2 Zerg enemies remaining. We started watching the middle of the map as a Zergling rush was in full effect and the computer was spawning units nowhere near a base! Blatant cheating.

  70. Andrew says:

    Interesting analysis. I suppose the reason one race wins and not the other is just the quirks of the AI.

  71. null says:

    um… am i the only one who has NEVER seen AI settings in starcraft or broodwar? like… am i? seriously?

  72. IskatuMesk says:

    He’s probably talking about UMS AI settings. All of which are extremely trivial for a player who has any idea how to play.

    I just skimmed through the new comments but yes, there is a way to make custom build orders for Starcraft’s Ai and very easy ways to pit each other.

    To answer the question as to why toss usually wins in default matches – The most basic factor is obviously unit strength. Sc’s AI does not micro at all, and the standard AI is limited by money. The Zerg AI wastes units a lot with defensive protocols triggering in stupid areas and the units die a lot. 1v1, most zerg units will get worked by Protoss and so the protoss generally win. Otherwise there is no real difference in hardcoded AI actions between races.

    But when you make money-fed AI this dramatically changes. My BW AI tournament Zerg AI utterly [i]decimates[/i] protoss and terran. There is only one protoss script I’ve encountered that can give it a run for its money (Ashara’s excellent $P) but even this cannot usually win. Most players will never survive its first attack, let alone the aggression protocols. When a Zerg can acquire 10 hatcheries before you have your academy or second gateway, you know you’re in for pain.

    Also, versions after 1.10 added a lot of new bugs and issues with Starcraft’s AI (which would be hard to pick up on unless you’ve been working with it for a very long time; one bug is, the terran don’t repair buildings and such anymore).

    Anyways, if you’re interested in starcraft AI, my previous comment links to my bible, and this site http://www.broodwarai.com , will introduce you more thoroughly to the world of custom AI. If you have any questions let me know either by e-mail ([email protected]) or on our forums. I can’t really watch these comments too extensively because I am very busy lately. But I’ll come here every now and then because this is a subject I’d love to get out more and help elaborate on.

    [quote]I never really played the campaign, but I know the first game uses Terran a lot.[/quote]

    In the terran campaign you play as terrans, in zerg you play as zerg, ect. Both SC and BW have 3 campaigns in a linear storyline setup; each campaign focuses on a single race. The difficulty involved rarely has to do with the AI’s race you’re fighting but rather other circumstances (mostly inexperience; the campaigns are painfully easy once you get a grasp of what you’re doing), or they are not B&D at all and the AI’s actions are removed from the equation altogether.

    Additionally, the AI cannot “spawn” units. That is impossible for it to do. It is likely they were simply burrowed and you did not see them previously. This is an example of inexperience. :)

  73. Fuzzy says:

    I can’t for the life of me get this to work. I just borrowed my buddies trashed old discs and updated to the latest patch, but no matter what I do, it enters me into a regular match, and all I can see is my own base when I start.
    Can someone please post a step by step guide on starting this properly?

  74. When I used to play Starcraft a lot, I remember the computer always being much better with Protoss. My friends and I would use the different race selections as a secondary difficulty setting. If we wanted easier AI opponents at a certain difficulty setting, we would pick Terran. If we wanted harder, we would pick Protoss. Otherwise, we would pick zerg or make one of each.

  75. put_name_here says:

    @ Fuzzy and all others with problems to start the map:
    you have to use the setting “use map settings” to start the map properly (the drop down menu in the map selection menu).
    worked fine for me with the newest broodwar version

  76. asdfryhn says:

    Galaxian: Why not download a sinclair emulator and play the chaos game again? There are emulators for all kinds of old systems out there.

  77. Seradin says:

    Hey could you possibly make a map where its just 1v1v1, all three races so we can get a more accurate depiction?

  78. IskatuMesk says:

    Alright guys. You wanted a map? Here you are.

    This map is built on BGH’s terrain. It pits 3 races against each other. They are currently set to “* Expansion Custom Level”, which are the scripts the melee AI uses. You can set them to “* Expansion Campaign Insane” to access the Insane difficulty or whatever pleases you the most.

    To play it, simply run it with UMS settings. The comps will do their thing.

    If you’d like to change the map, just study what I did. Or make an FFA one and use cheats (Staying Alive, Black Sheep Wall) to watch the AI.

    http://www.doack.campaigncreations.org/_ComputerTestMapBGH.scx

    Additionally you may want to download the replays from broodwarai.com ; In replays, which are a series of AI commands, the AI scripts are not set in stone, and changes to the aiscript.bin in your mod mpq are reflected in these replays, allowing you to observe the matches at whatever speed you wish, see the AI’s resources, and not have to mess with UMS maps.

    Cheers!

  79. You did a bit over over analysis of the AI Shamus I must say. Starcraft’s AI is 10 years old and it shows – it’s worse to a degree then Age of Empire I and II’s AI’s :)

    As others have said; it is mainly “hardcoded” – the programmers put in the “use ability” functionality. The actual AI you choose is generally just a list of buildings and units to build, in order, and attack, in order. It’s very predictable, and never changes what it’s doing. Annoying how modders can’t alter the basic micro code, building placement code, or navigation code, or anything.

    If you do want to test AI in RTS games, I’d go for something newer, which also had support for user-made AI changes. :) Starcraft’s AI can hold up against a basic opponent, but it really is pretty much fully hardcoded and “hidden” so is a bit too basic for a strategy game. Making any assumptions on how powerful races are based on AI play is not a good idea either ;)

  80. mari says:

    Very very interesting… I love letting AI opponents go at it against each other. I do this type of thing on C&C as well.
    Love your study!

  81. You should try the various Age of Empires, Age of Kings games.

    The AI can be edited and the tools and such are open. It is fun to create scenarios and assign various AI rules to them.

  82. Dave Mark says:

    Excellent work, sir.

    Being a game AI programmer, I’ve added some more analysis on my Game AI blog.

    Now to find my Starcraft CD!

  83. John S says:

    The Insane AIs are not adapative at all, nor are they designed to be, they’re designed for campaign usage, with very defined build orders. The Expansion terran insane has 8 designated attacks with exact numbers of units, with attacks 7 and 8 alternating back and forth for eternity. They’re pretty weak attacks too…

    “”

    :block5
    attack_add 12 marine
    attack_add 6 goliath
    attack_add 4 siege_tank
    attack_add 2 ghost
    attack_prepare
    wait 500

    attack_do
    attack_clear
    wait 750

    attack_add 8 wraith
    attack_add 6 battlecruiser
    attack_prepare
    wait 500

    attack_do
    attack_clear
    expand 99 block3
    wait 750

    goto block5
    “”

  84. Hey avid starcraft players here,
    Protoss is easiest race to use at a lower level, that’s why it’s good.

    Let us consider the initial rush stage:
    PvZ:
    Zerg send zergling in a line, protoss send zealots in a line, of course zealot wins because zerglings need flanking to be effective and such micro(refers to using units to maximum efficiency) is simply unacceptible for the zerg part. P>>Z
    PvT:
    Terran send marines in a line, protoss send zealots in a line, again, marines in a line will not be effectively healed or attacking at the same time. Terran need to clump for high efficiency, and when attacking in line formation their firepower do not overlap, they get mauled. P>>T

    Hopefully that’ll explain some of the questions as I have been playing starcraft rigorously for the past 8 years. Cheers! :D

  85. Avid Gamer says:

    This doesn’t entirely surprise me, though I find that the second wave Terran rush is hardest of all to deal with in human vs comp battles. End game, comps fall apart completely.

    What I find humorous about the lack of Terran AI potential is that Terrans have historically been the most successful in the professional scene. If you look at the biggest superstars in gaming (Boxer, Nada, Oov, Savior), 3 are Terran. Those are the only gamers to have won more than 2 starleagues.

  86. jer says:

    Hey your article was posted on a BW site i visit often, there are deffitley people as wierd as you ;p. I found your article intresting^^

  87. Anthony says:

    —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA512

    To whom It May Concern, your assessment of the Starcraft ai as of version
    1.15.2.1 are completely inaccurate. From what I have observed, the Zerg
    have yet to loose; usually one brood in the top most tire and the other in
    a much lower rank. However, the Terran remains the lowest ranking faction.
    Usually one Terran cpu is brutally wiped early on. There are other STRANGE
    things one can observe

    Zerglings stuck IN hatcheries.
    Randomly placed pylons on narrow paths.
    Sunken colonies creating Zerk bottle necks.
    Suicidal high templar (either rushing into an enemy base or committing
    suicide via psionic storm).
    Bases reduced to three buildings and one unit, then left alone for over 30
    mins, hell there was on incomplete Terran building left alone one time.
    The Terran hesitate to tech resulting in their slaughter (marines vs
    reavers anyone?).
    “Abandoned” units (one to three) left half way across the map (to stare
    at minerals usually) for a faction that is still active. I am going to call
    this the “lost reavers” syndrome.

    All available in these replays for your viewing pleasure!

    .RAR archive, 10% recovery record, includes file hashes or my PGP
    signature, Can't open it get 7zip or winRAR

    http://myfreefilehosting.com/f/bdc175e9fd_0.25MB

    ENJOY!

    —–BEGIN PGP SIGNATURE—–
    Version: (N/A)
    Charset: utf-8

    wsFVAwUBSH2Vll7XhVEhLY/KAQrRxA/+MTHBj29UIC+TOl/zVgDsTkIc/UDq/koc
    VjjSVCnVsMdJfbcs86rEVy9SaX6EeQpfRRAEScN32HHntNO/6pSHWePqW1FANaMO
    INmcux8gxkg4gx1brwMCElPzPdW/fUXASB59SI/e4odakAcpkeQ3i7JyFQm9C7i+
    U2uX2VB9MO3ZuaVtZUdBHGTz71R1WBquk1Z7J0zNcaqmf8nB+OB9i30qQ0dRT2KP
    cV8bnBhSp+qMDlafMPQ5igi+UGSJS8mWnAY5s6VdbDjP9ujt/ESye0JZ4AY1OJoP
    fCmw3VYMOxil3Wov7ldHpB6tNy1yotvDab/Gl4dCpJbdrbl6RGWJgf5J2zkb4Cxn
    4SON2QiXGse428PnO4EDOI7yLZff+4HCfNarCKa/Slv0/8vwQDbtzjKGCFR2c9g2
    LK3mborvy77YnygiZvTk50cc8rHmZGv5dWDWZ1RHTFvcqXXgn6tpBF3DGErV5Eu2
    o8f1ERWIes5jvcJd9OZ9SYYnkwL2acPlgT/00ge1iztynHJN6BXekoULVz/H8nkG
    EeuAP5sIsdirqKWDrA9tlpy4WcpbxrFizEBd2QUp8e+0AWr49ZpnS8M6XA+Jqcow
    xohXeBbbsnbdKuXf9fICEEpQNVMJq91oT5iHCy/l5uT2pKGBYFoJSpauC/iafpAg
    6Ak+QwSl0ZI=
    =L0Pe
    —–END PGP SIGNATURE—–

  88. Danjen says:

    IS it possible to create customized AI scripts that mimic human strategy, that don’t base itself on hotkeys?

  89. Mark says:

    Only on this one map of yours Hunters but if you choose other maps it totally alters the balance of the AI for instance the Terran go to nukes quite quickly and start devestating their opponents defences. They are generally the best hacking force setting up seige tanks out of range, and using cloaked wraiths mercilessly. But if you only play that one map you really arent’t seeing the entire picture.

  90. SCFanHellYeah says:

    This was quite the interesting read. But I can explain some of the flaws behind your reasoning (although they are completely acceptable to someone who doesn’t follow the scene as avidly as others do).

    Zerg requires intense macro and large armies, yes… but those armies require large amounts of micro as well. Mutalisk harass is often viewed as one of the most difficult tasks to perfect. Terran requires an intricate balance of micro and macro unlike that of the other two races. Also, the Battlecruiser is a very weak unit compared to it’s counterparts in each race. It is slow and doesn’t do the damage at a quick enough rate compared to a wraith which can be maneuvered quickly and also has the cloaking feature. Free for all strategies are also very altered to those of a 1v1. I’d recommend getting a new heavily played 1v1 map. You can find the info at any site that covers the scene like SC2GG. This would paint an interesting image on the true balance, because as you said, it’s a crap shoot at the beginning with that many players.

  91. Anon says:

    The only AI gambit that could possibly beat the zealot rush is the 4pool that Zerg AI occasionally does.

  92. Jack says:

    Cheers for the guide. As a longtime StarCraft fan who likes to play the computer on various settings, it was interesting to read all this, especially the bit about the AI reading hot keys.

    Thanks!

  93. AJ says:

    Wow… just stumbled across this. Pretty fascinating.

    I’m curious as to how the terran performed in games that did not have unlimited resources. Defense is the bread and butter of the terrans, and allowing the enemy to throw themselves on your spears, so to speak, is a highly effective strategy for terran users.

    I would think, and I haven’t tested this, but in low resource games, you’d likely still see the Protoss winning out, but the Terrans and Zergs would switch places, assuming the Zergs didn’t pull out the win in the opening moments.

  94. Jack Vermicelli says:

    “Well, Starcraft is the best RTS ever made, so it's not really unusual to be discussing that instead of whatever the latest one is.” – another commentor

    So I take it you’ve never played Total Annihilation? Realistic physics, land contours, and unit vision set it apart, and units that don’t have the right weapon to engage an enemy will still at least try, and maybe get a lucky shot now and then. Weapon ranges also are more realistic (as opposed to a “long range” seige tank which only shoots a handful of times its length). Custom units and AIs can make it more interesting.

  95. Thomas says:

    That is just crazy. In all of my time playing (I admit it isn’t that much), I have always expected the zerg to totally dominate just because the cost of the units could allow them to destroy most of the map in one run, if they built a big enough army.

  96. JDUBS says:

    i think this is a pretty awesome analysis, an a whole lot of people took their time to read this. game on man.

  97. j says:

    It’s too bad blizzard never updates the AI.

    I’m hoping other people who’ve looked through this have an understanding of the usual dynamics of human vs. human games (watch some Gomtv.net if you don’t)

    The AI isn’t capable of running build orders or considering the metagame (map size, etc), so it rarely proxy rushes.

    Micro-management is also something the bot isn’t capable of, which, if implemented, would start to make single-player useful for training n00bs like me. >.>

  98. HELP says:

    clearly I’m a dipshit, because I can’t find anything anywhere to set this up. I can’t find a setting to just simply “observe” I can’t find a setting to change their dificulty level, nor can I figure out where I am supposed to set this game up (battlenet, local area network, modem, etc.)

    can someone… ANYONE help me?

    EDIT:
    never mind, I figured it out. sorry for the trouble.

  99. Greg says:

    Just posting to say … interesting. I ran it , first game, 1hr 15 mins. Toss out during first wave, then the 3 terrans during 2nd +, then the zerg, a protoss, Then the final zerg won out in the end. 850,000+ pts. Defilers USELESS!!! always aim wrong. High Templars Almost useless. bad aim, kill self.

  100. Raven says:

    My guess is, since the AI uses little, if any micro on any race, the stronger units (Protoss) will always win.
    It’s not the same sending 16 zealots into a base with zero micro than sending the equivalent in marines or hydras.
    The zealots will do far more damage and live much longer even if they’re just left there unattended.
    Point is, protoss units are naturally stronger. The strength of terrran and zerg units relies on micromanagement and using spells effectively, which the AI rarely does.

  101. armoguy says:

    Hey! I’d just like to say that, although I’ve never played starcraft before, this article is very fascinating. I guess I could do the same thing using any of the age of empires series games. I agree with your assumtions as to how you thought the AI would use the protoss poorly. Generally, WELL DONE!!!! If you wish to cantact me, get xfire, and add armoguy89.

  102. Clint Johnson says:

    How are you supposed to beat 4v4 teams with 2 terrans and 2 zerg on your team and all protoss on the other team? AL Controlled of course. I suck with the protoss and rock at using terran and they still whip me and my al friends, (Zerg especially)

  103. Kel'Thuzad says:

    Hey, Shamus…

    How do you change the difficulty?

    1. Shamus says:

      You can only change the difficulty when editing a scenario. (Use the editor, save the map.)

      You can’t set it directly when starting a match.

  104. ArcticPrism says:

    So you said that the AI get 2000 ore and gas when they run out of resources right? When does this happen? I’m in the middle of watching a fight, and I noticed that the purple and brown Terran teams completely stopped building anything, and rather than expanding, stacked about 30 SCVs at a refinery. Only until brown finally expanded and built a command center did they start mass producing again.

    Edit: You also stated that the ai seem to attack interceptors. Shortly after, the Blue Protoss sent 7 carriers and about 10 scouts but the goliaths and other units capable of anti-air only attacked the carriers. I did find it odd though, suddenly in the middle of the attack, they sent the carriers toward purple’s base and engaged them, allowing brown to start spamming battlecruisers.

    Edit: Strangely enough, purple started building again once blue attacked.

    Sidenote: Damn, I got the ugly avatar.

  105. ArcticPrism says:

    So I just finished a match, and my results were somewhat the same. Protoss came on top, Blue had no competition, as they were never once attacked. For me, the standings were : 1.Protoss 2. Terran. 3. Terran. 4 Protoss, 5 Terran, 6 Zerg, 7 Zerg. Both Zerg teams were eliminated during the first waves. White struggled, and eventually lost due to being attacked while their army was across the map. The match may have been more interesting, but purple stopped building suddenly and didn’t try.

  106. Kimano says:

    One of the thing I would think contributes heavily to the way it panned out is how little interdependence there is among Protoss Units. All of the primary backbone units of each tech tier on Protoss require very little to no support to be able to mass. Carriers, Dragoons, etc can all be used in a homogeneous group, without any diverse support.

    Contrast this with Zerg and Terran, Where Guardians and Battlecruisers both require air or ground support from their respective AntiAir units to be effective. Same with Marines needing Medics and Hydras needing lings. Dragoons don’t need any cover to be able to wreck a base. And since AI is usually not smart enough to know how to micro effectively, a lot of the power behind Terran and Zerg top tier units is lost.

  107. Will says:

    I’d say Hydras are more effective than goons in a homogenous group. Dragoons lose vs lings or hydras. Also, reavers are extremely vulnerable on their own as are zealots and scouts. I think as a general rule, homogenous groups of any kind are more vulnerable than a diversified one, and that isn’t any less true for Protoss. While it is true that a combination of zealots and goons is a good mix that is not matched easily by other races, their cost offsets whatever value you obtain from being able to use a simplified unit composition.

    As for a comment about path-finding earlier: you be surprised how hard it is to code a path-finding algorithm that is both efficient and accurate. Computational problems involving finding the shortest distance between several points are famously difficult.

  108. George says:

    I believe you answered your own question in the description of the races:
    the protoss have few, expensive but powerful units. control of these units is therefore least demanding. ergo: the protoss ARE a race for noobs, because they are, by far, the easiest to play.
    the zerg have many, cheap but weak units. controlling these thus requires just a tad more brains, since you need to control each and every unit; while the overall strength of the sent-to-die army is the same, it requires more control, since we are talking about more units to exert control over.
    the terrans are balanced in cost and durability, but are by far the masters of tactics and smart use. so while the protoss have the best technology and the zerg have their strength in numbers, the earthlings have strength in tactics. The send-them-to-die policy works (by far) worst for them, so they are pretty clearly the hardest race to play in the game.
    This is so that all players should understand and acknowledge this, and think that while a race like the protoss can virtually play itself, it takes a lot of practice and talent to play the terrans. I do not believe that the game is balanced in THIS PARTICULAR aspect, since playing the terrans requires tremendously more skill than playing protoss, and considerably more than the zerg too. I do, however, admit that the overall capacity of each race, when played to perfection, is pretty much the same.
    I’ve heard very many extremely noobish things among the comments here and I won’t go in to that.
    I just want to say that I am a major starcraft enthusiast, and a fan of all GOOD science-fiction works (be it film, book or game) in general.

  109. Cptn.Average says:

    It might be the hotkeying issue you mentioned but I always found that the AI had an incredibly dodgy knack of attacking units waiting at rally point.

  110. Nicola says:

    Starcraft is nowadays a science: human players discovered the right unit combinations and micromanagement (placement, movements, etc).
    my guess is that going random units at random places favours protoss because the ideal unit composition and usage is quite similar disregarding what race you’re gonna face.
    terrans for example have to use very different units in different ways depending on who tey’re facing.. and so do zerg.

  111. brian says:

    I found this hugely entertaining I used to do this type with normal computers using cheats to kill all my stuff :D IF you like that though I have a treat you might like it is called BWAI its a mod group that made unique ai for starcraft I watched those bots fight and they are cool here is a link to the download

    http://www.broodwarai.com/index.php?page=ai#bwaigold

    They are pretty tuff to beat well for me im not a expert :D

  112. BB says:

    Thanks a lot, really Huge Props; I’ve been fiddling with the game editor and have been wanting to do some computer Vs Computer games just to test Scenerio’s out.

    I do have a thought on the Protoss Vs Everyone Else AI question though, that goes like this….

    Even if Resources are Equal, and maybe Especially so … the Protoss Worker just has to touch a given point to Summon a Barraks or a Extractor out of Nothing; while a SCV is occupied for sometime with the Build and the Drone is just lost. So the Protoss is going to get a lot of free manhours of Harvesting while his opponenets struggle to build a base/ Tech Tree. Also at least on the Insane levels it does seem to me that the first Zealot Rush simply requires more resources than a player can possibly harvest that quickly.

    As to the Fog of War issue: I ran this test. If you start a game, toggle Black Sheep Wall on/off, pick up your command post and Scv’s and relocate to a new resource point – It does no good at all. The Protoss will Always march straight to your base no matter where it is on the map; the AI definately ignores the “Fog of War” effects.

    BTW; I am trying to sort out just how you did computer Vs Compter thing, I have not been able to translate it to another map quite yet. If you post a brief Tutorial on how to achieve that spoof; I for one would be very interested.

    Once Again Huge Props.

    Blessings, BB.

  113. eXeGeTe says:

    Very cool, now you just need to try this out on the new STARCRAFT 2!!! Very similar game to it’s predicessor, so we will see if Blizzard has grown in their AI skripting skills. From what I hear though, the AI is very easy to beat, and players have been scripting their owne AIs. This is all Beta of course, we will see when the full game comes out!

  114. Kavaal says:

    I’m sorry but no matter how I look at this I could predict the Toss would win. The fact that Protoss are so much more effective in the way of damage and armor and with no micro-management of Terran units which the AI doesn’t/can’t do and the relative weakness of unmassed Zerg units. In most forums and gaming circles toss are refereed to as the begging race i.e) You start playing the game as Toss then advance onto either Terran or Zerg depending on your playing styles. Because like previous commentators said in Korea they LOVE their SC and the most famous players are all Terran. So it’s simply the fact that the AI is, even on brutal, still a “child” or begging player so the shear damage and survivability of Protoss would lead to a favorable outcome for them most every time.

    1. Zachary "Zesty" Ramirez says:

      This is not true. Sure Boxer is the Father of ProStarCraft and FirebatHerO is known for his antics, but you’re totally leaving out Jaedong, Bisu, SaViOr, Much, ect. Terran has a lot of cool tricks, but by no means were the most played by the pros.

  115. Nidher says:

    Very interesting article but as a SC noob i would like to ask.Is there a way to play vs lets say easy bots in SC Broodwar.I still havent found the settings and im a noob.I would really appreciate a soon reply

  116. Azrael_Reborn says:

    Hey guys I’m facing an issue in starcraft, in skirmish maps the computer seems to team up against me..its like 5 vs 1 even though its FFA…any solution?

  117. kikito says:

    Since no one has said it yet, let me be the one:

    This needs to be redone for Starcraft 2.

    Please Santa give Samus Starcraft 2 for Christmas.

  118. AI like that is scary. I stuggle against the PC on easy :( I am such a nub lol.

  119. Pokerist says:

    I guess this was standard AI. There were some good mods back in the days, 2 bots killed and average player and terran played very good too.
    Very nice article, too bad i found this so late. Good luck!

  120. Zac says:

    Hey I have a question. You said something about an AI difficulty auto-cheat? I’m new to this game and I was wondering what that is and how I could get it to change my AI’s difficulty. Because the AI in StarCraft are inctedibly hard.

  121. Lucky Casiye says:

    What makes you think this is not interesting? Starcraft is awesome! Old or not, it’s still awesome! As well as that you did to it. Really interesting.

    By the way, looking at the number of posts in reaction of your blog, it seems pretty clear to me that starcraft is awesome ;-)

  122. Zak McKracken says:

    You should totally repeat this exercise for Starcraft II! Be pretty interesting to see how much the AI has been improved. Assuming that it has been improved at all…

  123. Bill says:

    Thanks for making this. I’ve really been enjoying it. About a decade later and it’s still perfectly compatible with the remastered version.

  124. Joe Baspooglio says:

    I enjoyed reading this. Rest in peace, man.

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun. Your email address will not be published. Required fields are marked*

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>

Leave a Reply

Your email address will not be published.