Staredit Network > Forums > SC2 Assistance > Topic: Using genetic algorithms to find SC2 builds
Using genetic algorithms to find SC2 builds
Nov 2 2010, 7:37 am
By: Lanthanide  

Nov 2 2010, 7:37 am Lanthanide Post #1



Thought you guys might find this interesting:

http://lbrandy.com/blog/2010/11/using-genetic-algorithms-to-find-starcraft-2-build-orders/



None.

Nov 3 2010, 3:12 pm NicholasBeige Post #2



the use of genetic algorithms is nothing knew in this respect. As far as I know it simply calculates a builds 'fitness' by the amount of army units it can make in a certain time. I believe as time goes on these will also factor in which units counter each other too. The timer starts as soon as the game begins - so the ratio (specifically for zerg) of resources that you devote to minerals, tech-buildings and army matters a lot.

The 6-pool will remain as the quickest way to get 150-200 minerals worth of Tier 1 units the quickest. But, this system does not take into account if an opponent puts a wall up. Most maps can be walled easily by a Supply Depot and a Barracks. Then all it takes is 1 marine and 2 SCV's on repair to thwart your opponents rush.

The 7-roach rush is a new-ish variant of the much more well known 5-roach rush variant. It sacrifices a lot of economy and - as mentioned in the article - is countered by 6-pools or voidrays. However, I would love to see what epic mistake JohnConnor made when the Voidrays beat him.. Maybe he'll learn that 'going all in' isn't that pro.

I also believe the 7-roach rush is easy defeated by a sentry forcefield with a couple stalkers. Don't believe the hype ;)



None.

Nov 3 2010, 4:47 pm CecilSunkure Post #3



Quote from name:Cardinal
the use of genetic algorithms is nothing knew in this respect. As far as I know it simply calculates a builds 'fitness' by the amount of army units it can make in a certain time.
I took a look at the source, and that program is pretty far from simple. It's genetic in that it uses a natural selection-esque method of seeking out optimizations and casting away inhibitions during the build order optimizing process. It's a gigantic guess and check system that uses an incredible amount of variables. I find it rather impressive that someone coded that in their spare time.

Quote from name:Cardinal
I believe as time goes on these will also factor in which units counter each other too.
Actually I don't think so. It wouldn't be able to calculate battle outcomes very accurately. What it does do however, is find out how to get a specific goal, like having 7 roaches on one base, as fast as possible.



None.

Nov 3 2010, 5:15 pm NicholasBeige Post #4



But my point of argument still stands, however. I could quite simply open up QXC's or another Build Order tester and perfect my opening build.. stream-line it... make it more efficient etc...

But, my main argument is that I hate this kind of Starcraft 2 play. You should never sit down into a game and decide 'this is what I am going to do'. You should rather learn to become more adaptable and knowledgeable. Sure, it is nice to know - in the words of the article - 'what game-breaking builds are still undiscovered', because this throws up issues not with the pro-gaming community, but with Blizzard in terms of balance issues. Hence the reaper nerf (barracks require supply depot) etc.



None.

Nov 3 2010, 5:56 pm Decency Post #5



Build order testers are stupid. Create a 1v1 versus an AI in single player, play in normal speed, and save the game under a new filename every 30 seconds or when you branch to a new variation. I made a great 59/59 2-Rax 8 Marine 8 Marauder 2 Medivac ~8:30 timing push build, for example, and it took me about 45 minutes to make it near-perfect. I've been working on a 3-rax variation more recently and it's taking me a good bit longer because of the add-on varation, but it's still orders of magnitude faster than actually playing the game out repeatedly. Being able to reset doesn't fix human error when you're doing something that you're unfamiliar with. Being able to save and load does.

Cardinal, you're missing the point of build order versatility. Say for example I use a build order creator to determine the fastest way to get to 23 drones with 2 zerglings and a queen. From there, I can react to what my opponent is doing and maybe I can go directly into a roach all-in, or a double expand, or a zergling runby, whatever. Yes, some people use build orders straight up without scouting or reacting, and if they can win with it more power to them, it's just exposing holes in whatever reactionary "standard" play you're trying to use. All-in's are just SC's way of making economically-greedy build orders skill-intensive, and they're used by pros all the time. Watch the series between Idra and Nony, recently, for example. http://sc2casts.com/cast1354-IdrA-vs-Nony-Best-of-7-Gosucoaching-Showdown-Showmatch 4 different games have some sort of timing attack.



None.

Nov 4 2010, 1:22 am CecilSunkure Post #6



I had it find me a build that gets you 8 hydras and 10 zerglings by 7:30 (7:13 if executed perfectly):

Collapsable Box


I tried it out, and it rocks.

Actually no, that's false. The above code doesn't work. This one however leaves you with 24 drones, 8 hydras, 12 lings, 1 ranged damage, and hydralisk range, all in under 8 game minutes. You also end up with almost 300 minerals for an expansion, and a very scary army this early on. I think this could be viable as a "early hydra/ling expand/pressure" build order.

Code
10  ExtractorTrick
11  Extractor
10  Overlord
10  SpawningPool    
9    1 Drone on gas
10   1 Drone on gas
16  Lair
17  Overlord
17  Extractor
17   1 Drone on gas
19  EvolutionChamber
18   1 Drone on gas
19  HydraliskDen
18  Queen
20  Overlord
20   1 Drone on gas
20   1 Drone on gas
21  Missile  1
23  Overlord
23  Zerglin
24  Zergling
25  GroovedSpines
25  Overlord
25  Hydralisk
27  Hydralisk
29  Hydralisk
31  Zergling
32  Hydralisk
34  Zergling
35  Hydralisk
37  Hydralisk
39  Hydralisk
41  Hydralisk
43  Zergling


Post has been edited 2 time(s), last time on Nov 4 2010, 10:57 am by NudeRaider. Reason: merged posts



None.

Nov 4 2010, 9:02 am Lanthanide Post #7



I got the link from Slashdot originally, and someone posted in the comments that genetic algorithms for SC have been out for a while, but of course the algorithmic strategies in SC are pretty well tapped out at this stage. The poster who said that noted that over time the good players in SC pretty much duplicated everything that the algorithm could find.

The thing is this genetic algorithm simulation is available for SC2 much much earlier on in SC2s life than it was for SC1, and there are obviously still balance patches in the works. So the algorithm may be able to find many novel corner-case builds that might otherwise take humans months or possibly years to find (or never find, if they're patched out), and in that way it may have a much bigger impact on the SC2 community for both providing real usable builds, as well as giving feedback to Blizzard (they should definitely be using this internally, and developing their own for Protoss and Terran).



None.

Nov 5 2010, 12:14 am NicholasBeige Post #8



I wonder if Blizzard will consider this to be a 3rd party tool which enhances your gameplay and thus ban it :P

I am still standing by my viewpoint that if you sit down to a game of Starcraft with a piece of paper and a pre-determined build order... you entice the wrath of the 6-pool.



None.

Nov 5 2010, 4:19 am Syphon Post #9



Quote from name:Cardinal
I wonder if Blizzard will consider this to be a 3rd party tool which enhances your gameplay and thus ban it :P

I am still standing by my viewpoint that if you sit down to a game of Starcraft with a piece of paper and a pre-determined build order... you entice the wrath of the 6-pool.

If, under any circumstance, you lose to a 6pool, you are terrible.

To be a good player you *have* to have predetermined build orders. No one climbs to the top winging it.



None.

Nov 5 2010, 5:53 am CecilSunkure Post #10



I win vs 6 pool by anticipating it. If I anticipate it, I go forge first, and win. Although if I don't anticipate it, and I usually go 13 gateway, I have to have some uber probe micro (you right click on minerals behind your probes with the probes in front, to cycle the healthy ones to the front. You also keep your zealot alive as long as possible. Also, if you don't a move with your probes the zergling ai won't target them, and only target the zealot -you can use this to try to make your zealot fight like 1 or 2 lings at a time) and get a cannon asap.



None.

Nov 8 2010, 6:07 pm Decency Post #11



Quote from Syphon
Quote from name:Cardinal
I wonder if Blizzard will consider this to be a 3rd party tool which enhances your gameplay and thus ban it :P

I am still standing by my viewpoint that if you sit down to a game of Starcraft with a piece of paper and a pre-determined build order... you entice the wrath of the 6-pool.

If, under any circumstance, you lose to a 6pool, you are terrible.

Like NaDa. He's fucking bad.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Vanfhf05