News for hackers. Stuff that matters.
Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by thomasahle on Monday March 24, 2014 @08:37AM (#7457829)
I remember reading this and thinking "That would be so much simpler to do with a breadth first search".

Sure 'genetic' sounds cool, but when the search space is as limited as it is in a build order optimization like this, you should use the right tools for the task.

Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by ryanator on Monday March 24, 2014 @09:28AM (#7458056)
I don't think breadth first search would have been the right approach. The search space is actually quite huge for this. Also, the algorithm wasn't built to create a build that wins the fitness was simply how fast they could produce the army the user inputs.

What stands out is if you had asked anyone even a professional player to build this exact army composition (7 roaches) they would almost certainly not have pulled it off as fast as the method this algorithm discovered. The algorithm was able to do it by doing a few tricks that normally aren't intuitive but, work out so your resources match up perfectly to make the build happen.

Also, I can confirm as a mediocre Starcraft player the build was quite powerful.

Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by vladimirralev on Monday March 24, 2014 @10:02AM (#7458225)
The search space is not that big. It depends on the granularity of the decisions, but in SC2 most algorithms will work on the supply scale (with resources as constraint). Meaning you only have 3-5 decisions to make at any supply count. In this case considering the extractor cancel is a nice touch and I assume it was a special case because it's a known trick which makes no sense to consider for any other buildings.
Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by veemjeem on Monday March 24, 2014 @05:18PM (#7461574)
Maybe the search space is limited in the first few minutes of the game when your opponent has also has a limited set of moves, but as the game goes on, the complexity increases exponentially. The 7 roach rush could be calculated here because the algorithm essentially completes when it reaches 7 roaches, but longer more complicated builds would be significantly harder -- like a 2-base blink all-in.
Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by Houshalter on Monday March 24, 2014 @09:29AM (#7458062)
They also didn't use crossover which I thought was the main advantage of genetic algorithms.

How would a breadth first search work better? The search space is huge.

Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by thomasahle on Sunday March 30, 2014 @01:42PM (#7497021)
Well, you only care about what actions to do and what order.

If your edges are 'building things' and your nodes are records of some type (current time, number of stuff, stuff currently building), then you can calculate when you will be able to build what next, and generate the descendent states.

Given we are interested in four types of buildings and three types of units, that's maximum 7 descendents per node. Getting to 7 roaches doesn't require more than 20-30 actions. That's 7^30 and too much, but a lot of states are easy to prune, e.g. don't build 2 zergling dens, and on top of that you can add some goal searching heuristics, like a*.

Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by OlivierLi on Monday March 24, 2014 @09:54AM (#7458190)
Maybe backtracking would be used to reduce the search space.
Re:Genetic Algorithms Produce Winning StarCraft II Build Ord... by otikik on Monday March 24, 2014 @02:30PM (#7460221)
Go for it, tiger :)