Cascadess
Badges: 14
Rep:
?
#1
Report 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
INTit
Badges: 17
Rep:
?
#2
Report 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
Norbo11
Badges: 2
Rep:
?
#3
Report 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
INTit
Badges: 17
Rep:
?
#4
Report 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
kka25
Badges: 18
Rep:
?
#5
Report 5 years ago
#5
Can we say genetic programming is like a programming paradigm such as OO or imperatives?
0
reply
elohssa_41
Badges: 0
Rep:
?
#6
Report 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
kka25
Badges: 18
Rep:
?
#7
Report 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
elohssa_41
Badges: 0
Rep:
?
#8
Report 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

Quick Reply

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

See more of what you like on
The Student Room

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

Personalise

Should there be a new university admissions system that ditches predicted grades?

No, I think predicted grades should still be used to make offers (605)
33.84%
Yes, I like the idea of applying to uni after I received my grades (PQA) (749)
41.89%
Yes, I like the idea of receiving offers only after I receive my grades (PQO) (354)
19.8%
I think there is a better option than the ones suggested (let us know in the thread!) (80)
4.47%

Watched Threads

View All