topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:17 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.  (Read 15643 times)

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
No clue what it is called but it is awesome.

Just open it and let it run for as long as possible. Survival of the fittest will determine which cars survive. Lower the mutation rate to try more variations of successful cars from the previous generation, and crank it up to get some fresh mutations that are totally wacko. :)

It's surprising how awesome it is to just watch that thing crank out weird contraptions.

Edit: I can't remember where I found this link. I hope I didn't find it on DoCo or DoCo's IRC... if I did, I'm sorry for (double)posting someone elses find. :-[

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #1 on: January 28, 2011, 09:58 AM »
It looks fun, but what's the parameter used to determine when a new car is generated?

Every contraption I've seen so far seems to "survive" for a mere couple of seconds :( - IMHO the stopping parameter should be "hasn't moved for n seconds", whereas it seems to currently be pretty much random.
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #2 on: January 28, 2011, 10:08 AM »
Love it -- great find.

For those who aren't familiar with this kind of work, check out Genetic Algorithm or Genetic Programming research.

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #3 on: January 28, 2011, 10:15 AM »
Yeah, I agree, it restarts way quicker than it ought to imo. It seems to have to do with movement being around 0 and a part of the chassis touching the ground. Sadly I don't think you can change it. :(

Wait a couple of generations, till 5 or so, then you start to see actual progress being made.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #4 on: January 28, 2011, 10:26 AM »
ooh, i like this. but, i agree. the little beasts are being exterminated too quickly.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #5 on: January 28, 2011, 10:32 AM »
Now if only the graphics were provided by nudone - an instant CT crossover :)

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #6 on: January 28, 2011, 10:39 AM »
What sort of scores are people getting? I just had a lively little beach buggy score 166.9 in generation 4...

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #7 on: January 28, 2011, 10:54 AM »
It looks fun, but what's the parameter used to determine when a new car is generated?

Every contraption I've seen so far seems to "survive" for a mere couple of seconds :( - IMHO the stopping parameter should be "hasn't moved for n seconds", whereas it seems to currently be pretty much random.

I think this is simply due to the physics engine running very quickly. Looking on my system, it's evaluating at around 500 fps, so the algorithm is looking well ahead of the graphics and simply knows the moment it's time to cull this machine while the animation is catching up.

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #8 on: January 28, 2011, 11:23 AM »
Scores are pretty meaningless, as everyone gets a random terrain. My terrain is an absolute pain - I ought to restart but I'm just curious to see if it ever passes its old record. :)

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #9 on: January 28, 2011, 11:26 AM »
Scores are pretty meaningless, as everyone gets a random terrain. My terrain is an absolute pain - I ought to restart but I'm just curious to see if it ever passes its old record. :)

Oh damn, so what's the point of that? There's a lot of potential for a "game" like this to become more competitive: one challenge, who can breed the best machine to stay the course?

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #10 on: January 28, 2011, 11:33 AM »
I was playing with this last weekend. I tried three times, for at least 8-10 hours each, and never was able to evolve something that could get past around 213.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #11 on: January 28, 2011, 11:56 AM »
lots of potential, and spin-offs. you should put it together Tim  :Thmbsup:

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #12 on: January 28, 2011, 12:00 PM »
I would love to do something like that sometime! I need to retire and dedicate myself to faffing about with fun coding projects. And weird websites.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #13 on: January 28, 2011, 12:38 PM »
It looks fun, but what's the parameter used to determine when a new car is generated?

Every contraption I've seen so far seems to "survive" for a mere couple of seconds :( - IMHO the stopping parameter should be "hasn't moved for n seconds", whereas it seems to currently be pretty much random.

It seems to progressively last longer depending on how the previous generation scored. It seems the number in parentheses is the "goal" score. If the motorcycle reaches that score, it will consider it a success and generate a new one. At first the goal is really small because it's so random that it's probably not very helpful to allow one to go a long distance. That is, in the beginning, quantity is much more important than quality to help narrow down the mutations. I've charted what I think the UI represents in a screenshot:

Genetic Motorcycles.pngDarwinism + geneticism + two-wheeled vehicles = ... awesomeness.

The graph at the top appears to be as follows: The red line appears to be the goal (target) score and the black line appears to be the average score for that generation. Depending on how well each generation does, the goal score goes up or down to help improve each iteration. If no motorcycles reach (abot 50% of the) goal score, it will be lower next time so that it can iterate through more mutations faster.

EDIT: The above is all just a guess based on my observations. I could be wrong about any or all of it. :D

I was playing with this last weekend. I tried three times, for at least 8-10 hours each, and never was able to evolve something that could get past around 213.

I've had it running for about 20 minutes and I've already beat that. I wish it would display the best score somewhere on the UI...

Oh damn, so what's the point of that? There's a lot of potential for a "game" like this to become more competitive: one challenge, who can breed the best machine to stay the course?

Yeah, that would be awesome. I've had similar ideas while watching this thing go for a while.  :D
« Last Edit: January 28, 2011, 01:10 PM by Deozaan »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #14 on: January 28, 2011, 01:00 PM »
i think i've been staring at it for too long as it keeps making me laugh when some of the mutations do back-flips and things.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #15 on: January 28, 2011, 01:07 PM »
Hey, my score just went down from 340-ish back to 230! I've devolving! Help meeee...

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #16 on: January 28, 2011, 01:09 PM »
Hey, my score just went down from 340-ish back to 230! I've devolving! Help meeee...

That's not your score. That's the "goal" or "target" score. See my post above for what I mean. :)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #17 on: January 28, 2011, 01:13 PM »
It reminds me of watching those people that make their own (stupid) gliders and then throw the self of the end of piers. You hope that each one will get a bit further, or even fly, each time. But they always just flop right down into the sea.

edit:

maybe that would make a nice game: evolve your "cart", get it to race down a bumpy track and then at the end it fall of the track and you see how far it flies. well, not flies, just drops into oblivion.
« Last Edit: January 28, 2011, 01:15 PM by nudone »

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #18 on: January 28, 2011, 01:13 PM »
This reminds me of those old black-and-white movies you see of inventors rolling out their ridiculous-looking planes with about 20 wings that collapse as soon as the engine starts, set to jaunty music.

edit: @nudone: ooh, synchronicity!
« Last Edit: January 28, 2011, 01:16 PM by timns »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #19 on: January 28, 2011, 01:16 PM »
This reminds me of those old black-and-white movies you see of inventors rolling out their ridiculous-looking planes with about 20 wings that collapse as soon as the engine starts, set to jaunty music.

that's pretty much what i was getting at. you should still make it. make it like that.

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #20 on: January 28, 2011, 01:31 PM »
@Deozaan - I'm pretty sure that your guess about "goal" score is incorrect. That's just not how genetic algorithms work. You can't pre-set an expected fitness level. The best you can do is to take the best specimens from the generation whatever they are.

It appears that in this implementation, brand new specimens are ONLY generated at generation 0. Thereafter, everything comes from either
  • A combination of attributes from two parent specimens who scored well in the previous generation
  • Carrying over verbatim a good specimen from the previous generation
  • Taking the result of one of the previous operations and applying a random value to an attribute, with a likelihood given by the slider bar at the bottom (defaulting to 5%)

I believe that the graph's two curves show (a) the best specimen of the generation in red, and (b) the average specimen in the generation.

That said, I've got no idea what that parenthetic value really does mean. But it regularly shows an absurdly high value -- far higher than any of my cars have ever reached. And in the succeeding generation, it is *not* the case that my cars that all scored lower than this are discarded. They continue to evolve (generally) forward, using the rules I listed.

Daleus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 147
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #21 on: January 28, 2011, 01:40 PM »
Okay, stoppit!

I'm at work and was just mezmerized for 30 minutes.

grumble grumble...eye candy...grumble
Daleus, Curmudgeon-at-Large

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #22 on: January 28, 2011, 01:43 PM »
^^^ I'll 2nd That! ^^^

Mutating Motorcycle Mayhem? ...I have got to play with this when I get home - There goes Friday night...

 :D

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #23 on: January 28, 2011, 01:47 PM »
That said, I've got no idea what that parenthetic value really does mean. But it regularly shows an absurdly high value -- far higher than any of my cars have ever reached. And in the succeeding generation, it is *not* the case that my cars that all scored lower than this are discarded. They continue to evolve (generally) forward, using the rules I listed.

I think you're right about everything, except that I think my "goal" score idea is correct. I just might not be very clear in my description of what a "goal" score is. Let me try to clarify:

Basically, if a motorcycle reaches the "goal" score, it doesn't bother simulating it any further and just moves on to the next mutation. Thus, it has reached its "goal" and is considered the cream of the crop for its particular generation.

Ideally the algorithm should favor those motorcycles which scored the highest, but there's really no way of knowing how exactly a vehicle that reaches the goal affects the next generation compared to the others that don't.

What I do know is that when none of the vehicles get close to the "goal" score, then the number goes down. But if just one makes it or gets about half way, it goes up (doubles?).
« Last Edit: January 28, 2011, 01:49 PM by Deozaan »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Darwinism + geneticism + two-wheeled vehicles = ... awesomeness.
« Reply #24 on: January 28, 2011, 04:05 PM »
I've been watching for a while now and it appears to me as though the number in parentheses is twice the previous generation's highest score.