
Genetic Algorithm building a little car - sanj
http://www.wreck.devisland.net/ga/
======
tvchurch
Had a 12-person seminar with the founder of Genetic Algorithms, John Holland.
Read about him here:

<http://en.wikipedia.org/wiki/John_Henry_Holland>

In my opinion, this is his most accessible book (for the topic that is) about
GA's:

[http://www.amazon.com/Hidden-Order-Adaptation-Builds-
Complex...](http://www.amazon.com/Hidden-Order-Adaptation-Builds-
Complexity/dp/0201442302/ref=sr_1_3?ie=UTF8&s=books&qid=1228762794&sr=8-3)

Professor Holland is sharp as hell, insistent about expanding
interdisciplinary studies, and a very nice guy.

------
andr
Ok this is the second evolutionary computing post of today that does something
cool with little or no explanation of what's going on. Stop teasing.

~~~
kirse
How exactly is it evolutionary computing when there is a designer in the
equation (programmer) who puts constraints on the algorithm by the simple act
of coding it and running it on systems that he designed?

This seems more like "computing to model the process of genetic adaptation".
You can't label it evolutionary when there's a designer in the equation. The
very definition of the evolutionary process does not allow for constraints on
the process itself nor an end goal/purpose, something inherent to any system
built by a programmer.

~~~
malkia
You can think of the programmer as the physics laws in the universe.

This law, being a law, just dictates rules of what is possible, but the
outcome is what happen in the mean-time.

Some people do think that God is the Physics Law. Some do think that God is
the Time, where this happened.

~~~
kirse
If the programmer specifies the boundaries (laws) of his own universe, then
the evolutionary processes that happen within his own universe are not
representative of the actual universe which he claims to be modeling. Why?

1) Current scientific claims express that the laws and boundaries of the
universe came into existence without a designer. Having a designer _anywhere_
in the equation is unacceptable, even one who simply created the universe,
because that invalidates (or at least casts heavy doubt) on the naturalistic
claims of any designer-free subprocesses that happen within the universe
(specifically, Evolution).

2) Evolution itself is devoid of a designer and end goal.

Logically, it is impossible to model a process that is inherently devoid of
any design or purpose.

It would only be scientific to question the accuracy of any model that can't
even replicate the basic core constraints (eg. lack of a designer) of the
system which it is trying to represent.

~~~
nsrivast
The point of genetic algorithms is NOT to replicate evolution. Like you
mention, evolution has no end goal whereas engineers usually have very
explicit end goals. (Other problems include time constraints and computing
power!)

The point of genetic algorithms is to exploit the principle of natural
selection under very specific constraints and explicitly constructed utility
functions that are likely to lead to a better solution to a given problem.

Of course we're cheating a little, but we have to. "Organic" genetic
algorithms that consistently achieve engineering design principles (like
robustness, modularity, compartmentation, etc.) _without constraints_ are the
holy grail of the field.

~~~
kirse
+1 Thanks for the explanation. I can fully understand both the legitimacy and
the desire to model the specific process of genetic propagation, but was
somewhat confused how exactly that logically validates it as an accurate
representation of its function in evolution as a whole.

It's pretty clear one model has a designer and the other does not, and you
certainly agree that the existence of a designer is more than just a small
issue when dealing with the validity of evolutionary "models". =)

~~~
demallien
If you mean that there is a 'designer' of the system, then sure, there is. But
if you mean that there is a 'designer' of the little model cars, then no, you
are absolutely wrong (except in the sense that the GA itself, a mindless
mathematical process, is a designer).

In other words, this is a pretty faithful model of evolution if we postulate
that once the first self-replicating organism came into being (once the
programmer had written the model/fitness function), no further interference is
necessary - a purely mathematical process will lead to artifacts that appear
'designed'.

------
aak
I left my browser open and had it running for 12 hours now, and now my car
looks like a porsche.

------
nihilocrat
Genetic algorithms are pretty fun to talk about, but actually seeing it in
action is awesome. Here, you can clearly see when a new car is born and when
it fails, and see that the designs that manage to live longer are going to be
more successful.

------
dangoldin
An interesting thought I had from this was the difference between Genetic
Algorithms and Genetic Programming.

Genetic Algorithm is what we are seeing but Genetic Programming would tell us
that the car might need 3 wheels.

------
slater
i misread the title and thought that at least one of the "Big Three" had
finally gotten it, and was starting to make SMART-size cars. Dang.

~~~
ivankirigin
One of the big 3 did build the smart car. Sorta. If you count Daimler AG (
previous owner of Chrysler, and current owner of Smart) as the maker.

<http://en.wikipedia.org/wiki/Chrysler_Group>
<http://en.wikipedia.org/wiki/Daimler_AG>
<http://en.wikipedia.org/wiki/Smart_(automobile)>

I'll take this opportunity to note that bailing out companies originally
founded by Americans in such a globalized market is arbitrary and harmful.

~~~
ivankirigin
note to pg, these are valid URL characters: "()"

I'm surprised you of all people aren't more partial to them

~~~
lacker
The problem is breaking stuff like

(also see url: <http://google.com>)

Might be better to treat a trailing ) as not part of a url only if there is no
( earlier in the url.

~~~
ivankirigin
Indeed. Though I'm accustomed to adding a space at the end of urls.

------
tc7
Cool-looking, but I'm not quite sure what's going on. Explanations?

~~~
jonknee
"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...](http://www.reddit.com/r/programming/comments/7i22c/genetic_programming_evolution_of_mona_lisa/c06pt65)

~~~
cnu
What does the graph depict? What is the black and green lines mean?

------
vorador
I wonder if the car that best fits the constraints is always the same (i.e :
do we see the same car, or each user sees a different car) ?

~~~
bayleo
Due to the naïveté of the model I would say it's pretty unlikely that there
are many different car-combinations with high fitness.

~~~
friism
Has anyone bred one than gets past the dip after hill and doesn't somersault?
The ones I have now seem to have optimum suspension for quickly motoring over
the initial bumbs, but they all die in that damn ditch...

~~~
erik
In the second tab I opened there is a car that makes it past the point that
causes most cars to flip. The run currently times out at the top of the next
hill, but the distance is still slowly improving.

------
dskhatri
Really cool and reminds me of self-modeling robots:
<http://ccsl.mae.cornell.edu/research/selfmodels/>

------
jedc
Very cool.

Back in college our final assignment was a GA to find the best trajectory for
a hypothetical space mission. (You had to go by particular planets in
particular windows in time.) It was great fun playing around with it.

------
yters
Lots of the parameters could be adjusted using some kind of gradient descent.
Have you looked at using differential evolution?

------
bprater
I'm assuming 'GA' mean Genetic Algorithm.

------
timtrueman
Anyone else ever seen one get past the first major drop?

------
jdrock
Really nice visualization of GAs

------
nazgulnarsil
it appears that evolutionary dead ends are possible, which is cool

------
socratees
looks nice, but seriously, what's happenin behind??

