I was wondering if anyone here has ever created a geneticalgorithm, and if tey have if they could just post their code, what language it's in and any tips people have.
If people are cool with this then thanks very much!!! I am currently developing one to optimize the travelling salesman problem and I think that both the forum and I would benefit form information on genetic algorithms.
I wrote one at uni as we were tasked evaluate how well it would solve a game like Sudoku. Not well was the answer :P
Sadly don't have the code anymore as it was along time ago otherwise id post it.
Theres a popular competitive RTS PC game called Starcraft 2. In the game you produce builders, the builders collect resources and produce buildings. From those buildings you can then produce combat units.
Each of those actions take varying amounts of time and resources and are influenced by factors such as how many builders you assign to a building or collecting resources.
The question was: "What was the optimal build order for producing the most units(Roaches) in 5 minutes".
A build order is the sequence of actions you immediatly take at the start of a game.
Somebody wrote a GA to work it out:
Heres the code
Heres the discovered BO for starcraft 2players: "7 Roach rush"