# Genetic algorithms

Watch
Announcements
Thread starter 5 years ago
#1
Hey all,

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.

Thanks all,
George
0
reply
5 years ago
#2
Sounds difficult how would you even efficiently generate the potential solutions to run the algorithm on.

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.
0
reply
5 years ago
#3
I studied Genetic Algorithms for my Extended Project. I found this quite useful http://www.lalena.com/ai/tsp/
0
reply
5 years ago
#4
Heres a link and some code that might interest.

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:
http://www.themarysue.com/zerg-build-order-algorithm/

Heres the code
http://www.themarysue.com/zerg-build-order-algorithm/

Heres the discovered BO for starcraft 2players: "7 Roach rush"
http://wiki.teamliquid.net/starcraft..._Expand_/_Lair
0
reply
5 years ago
#5
Can we say genetic programming is like a programming paradigm such as OO or imperatives?
0
reply
5 years ago
#6
(Original post by kka25)
Can we say genetic programming is like a programming paradigm such as OO or imperatives?
Not really related. A genetic algorithm can be written using functional/OO etc. paradigms.
0
reply
5 years ago
#7
(Original post by elohssa_41)
Not really related. A genetic algorithm can be written using functional/OO etc. paradigms.
OO itself can simulate the Functional paradigm (e.g. Java can essentially mimic Functional approach).
0
reply
5 years ago
#8
(Original post by kka25)
OO itself can simulate the Functional paradigm (e.g. Java can essentially mimic Functional approach).
Yeah of course
0
reply
X

Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

#### Do you have the space and resources you need to succeed in home learning?

Yes I have everything I need (287)
55.73%
I don't have everything I need (228)
44.27%

View All
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.