Live data from Hacker News

Using genetic algorithms to find Starcraft 2 build orders

lbrandy.com

11–20 of 79 posts

Re: Using genetic algorithms to find Starcraft 2 build orders

#11

Starcraft has always struck me as a game of compound interest, and the optimal early builds always seem to be just that: maximizing an instantaneous rate-of-production, which will correlate to maximizing your instantaneous rates-of-doing-damage It's always seemed like more of an economic strategy game than an actual "fronts of battle" kind of strategy.

WW1 and especially 2 were an economic strategy game. The Cold War was an economic strategy game.

Re: Using genetic algorithms to find Starcraft 2 build orders

#12
post #6

Earlier quoted context omitted.

I haven't looked into SC2 as much, but in the BW version of the the extractor trick, the cost-benefit tips at some point within the timespan of 'rushes'. That is, it'll be wonderful for very very fast rushes, but more 'patient' rushes are harmed by it. And at least for BW rushes, the trend seemed to be in the last bit before SC2 came out to trend towards more patient rushes. People weren't even looking for the win of…

Yes, most high level play isn't really looking to do all-in rushes like this. The goal is more to "fast econ harrass to early map control" giving you an early advantage and allowing you to eventually win.

This is half true. Indeed, currently European/NA players play quite "standard" at tournaments, avoiding rushes and "all-in" strategies. The Koreans, however, at GSL have shown that they're neither afraid nor hesitant to do so.

edit: GSL, not ESL.

Re: Using genetic algorithms to find Starcraft 2 build orders

#13
A GA sounds like exactly the wrong way to go about this. I think you could do much better with a heuristic algorithm than a GA in this case, and I think GAs (like neural networks) are very much overused just because they correlate well with natural processes.

That said, I haven't played SC2, and I don't know what sort of complexity the building problem has.

Re: Using genetic algorithms to find Starcraft 2 build orders

#14

Starcraft has always struck me as a game of compound interest, and the optimal early builds always seem to be just that: maximizing an instantaneous rate-of-production, which will correlate to maximizing your instantaneous rates-of-doing-damage It's always seemed like more of an economic strategy game than an actual "fronts of battle" kind of strategy.

"Amateur's discuss strategy, professionals discuss logistics"

And more specifically, it's not about maximizing your rate of production, its about maximizing the difference between youres and your opponents (this is both RTS and real life war).

That's the basis of rush tactics. You actually stunt your own rate of growth in the hopes of stunting your opponents even more.

Re: Using genetic algorithms to find Starcraft 2 build orders

#15
post #6

Earlier quoted context omitted.

I haven't looked into SC2 as much, but in the BW version of the the extractor trick, the cost-benefit tips at some point within the timespan of 'rushes'. That is, it'll be wonderful for very very fast rushes, but more 'patient' rushes are harmed by it. And at least for BW rushes, the trend seemed to be in the last bit before SC2 came out to trend towards more patient rushes. People weren't even looking for the win of…

Yes, most high level play isn't really looking to do all-in rushes like this. The goal is more to "fast econ harrass to early map control" giving you an early advantage and allowing you to eventually win.

Well, that's true and not true. On the ladder, where every game is (sort of) a one-off, you want to have a solid game, and it doesn't matter so much if it's a predictable "standard" game as long as you play better than your opponent.

But if you're a known player playing against other known players, or if you're playing best-of-N matches, it's valuable to have demonstrated flexibility in your play and a willingness to perform individually suboptimal strategies like early all-ins. If your opponent believes that you're capable of many different things, they will feel compelled to scout earlier and more carefully, and their options will be restricted slightly until they feel they can pin down exactly what you're up to.

Re: Using genetic algorithms to find Starcraft 2 build orders

#16
post #6

Earlier quoted context omitted.

Yes, most high level play isn't really looking to do all-in rushes like this. The goal is more to "fast econ harrass to early map control" giving you an early advantage and allowing you to eventually win.

I'd have to disagree regarding rushes in high level play. I most enjoy 4v4 random and a key move is decimating one opponent's economy to the point that they become a non-factor in the game. With this build order in a 4v4 one player can neutralize a Protoss or Zerg player and then pivot to mutas or continue with roach/hydra. Since your economy isn't in shambles like a traditional 6 pool zergling rush, even if you fail…

By 'High-level play' he is most likely referring to tournaments and the e-sports scene, which is almost entirely 1v1 and plays very differently from 4v4.

Re: Using genetic algorithms to find Starcraft 2 build orders

#17

Starcraft has always struck me as a game of compound interest, and the optimal early builds always seem to be just that: maximizing an instantaneous rate-of-production, which will correlate to maximizing your instantaneous rates-of-doing-damage It's always seemed like more of an economic strategy game than an actual "fronts of battle" kind of strategy.

"Micro", or managing your units in battle, is also vital. I've lost 4 bases worth of Zerg units against a 2 basing Terran through horrible micro.

Re: Using genetic algorithms to find Starcraft 2 build orders

#18

A GA sounds like exactly the wrong way to go about this. I think you could do much better with a heuristic algorithm than a GA in this case, and I think GAs (like neural networks) are very much overused just because they correlate well with natural processes. That said, I haven't played SC2, and I don't know what sort of complexity the building problem has.

I can't quite understand if you're saying GA's are neural networks, or just that both of them are overused. Either way, one of the big problems is that the heuristics for a heuristic algorithm must be designed by with human insights. In this case, and in many other cases where GA's have been applied successfully, a fundamental new insight is discovered by the algorithm.

I do play some SC2. There are a bunch of built-in AIs that use heuristic algorithms, yet they are all easily defeated. The GA in this case is really about searching through an immense space to find good candidates.

To give you a feel for the complexity of the building problem, consider this. There are custom maps where are all you do is practice your initial build order, with absolutely no opponent. It is pretty well accepted within the SC2 community that you should use these practice maps in order to get better. Another way to think about it is that this build order will probably cause Blizzard to tweak the game due to how fast the roaches come out. This game has been in development for 10 years, yet there are interactions of the building process that are not understood by the developers themselves.

Re: Using genetic algorithms to find Starcraft 2 build orders

#19
post #18

A GA sounds like exactly the wrong way to go about this. I think you could do much better with a heuristic algorithm than a GA in this case, and I think GAs (like neural networks) are very much overused just because they correlate well with natural processes. That said, I haven't played SC2, and I don't know what sort of complexity the building problem has.

I can't quite understand if you're saying GA's are neural networks, or just that both of them are overused. Either way, one of the big problems is that the heuristics for a heuristic algorithm must be designed by with human insights. In this case, and in many other cases where GA's have been applied successfully, a fundamental new insight is discovered by the algorithm. I do play some SC2. There are a bunch of built-…

> I can't quite understand if you're saying GA's are neural networks, or just that both of them are overused.

I was saying that both are overused.

> one of the big problems is that the heuristics for a heuristic algorithm must be designed by with human insights

By "heuristics" I don't strictly mean "rule-based", but you can do a good job in reducing the search space by a large amount if you program in some common sense that will discard obviously bad moves.

It would be surprising if the devs did understand all the interactions, as it would mean that the search space is trivial. SC2 is not that much different from chess, and, to my knowledge, the best chess-playing AIs don't use genetics. They get much further with trees and precalculated start- and endgame moves.

Re: Using genetic algorithms to find Starcraft 2 build orders

#20

Starcraft has always struck me as a game of compound interest, and the optimal early builds always seem to be just that: maximizing an instantaneous rate-of-production, which will correlate to maximizing your instantaneous rates-of-doing-damage It's always seemed like more of an economic strategy game than an actual "fronts of battle" kind of strategy.

It certainly is a game of compound interest! On top of that the system has three features that interact to give it its depth:

1) There are several opportunities in each game to sacrifice your rate of growth to obtain a temporary advantage in present value (ie. cutting workers to rush).

2) Because present value is multidimensional (you can't measure the value of a Zergling directly against that a Mutalisk), you can sacrifice your rate of growth or your present value in order to obtain a temporary advantage in what kind of value you have (ie. cutting units or workers to tech).

3) Information asymmetry. While trying to gain these mathematical advantages, one has to act on information that is increasingly out of date. One can not usually predict the opponent's exact present value and rate of change, but can only estimate ever-widening bounds on their values.

Post reply on HN