Re:Genetic Algorithm building a little car
by tc7 on Monday December 08, 2008 @12:59PM
(#390089)
Cool-looking, but I'm not quite sure what's going on. Explanations?
[ Parent
| on HN ]
Re:Genetic Algorithm building a little car
by jonknee on Monday December 08, 2008 @01:01PM
(#390093)
"This is a GA I wrote to design a little car for a specific terrain. It runs in real-time in Flash.
The fitness function is the distance travelled before the red circles hit the ground, or time runs out. The degrees of freedom are the size and inital positions of the four circles, and length, spring constant and damping of the eight springs. The graph shows the "mean" and "best" fitness.
I should really make a new version with better explanations of what's going on."
http://www.reddit.com/r/programming/comments/7i22c/genetic_p...
What does the graph depict? What is the black and green lines mean?
Re:Genetic Algorithm building a little car
by dangoldin on Monday December 08, 2008 @01:03PM
(#390098)
From what I can tell and my limited genetic programming experience the idea is to create a car that is able to drive across the course.
A car is defined as being a quadrilateral with two wheels and two counterweights (I think that's what they are). It starts off by randomly creating 20 cars with variable car shapes, wheel sizes, and counterweight sizes.
It determines how well each car does on the course and uses this information to mate the cars together in order to get a more successful car. The way this is traditionally done is by evaluating a "fitness" function on each individual in the population and giving the higher scoring individuals a better chance of mating.
This process keeps on going on until some criteria is reached. On average, the higher the generation count the better the offspring should be.