Genetic Algorithm 2D Car Thingy
June 25, 2013 5:37 PM Subscribe
Science experiment of the week: an AI car simulator with these supercar sounds playing in the background.
Oh my god, Son of BoxCar! Ask my wife how many hours I've spent with iterations of this thing.
I'm currently running a population on the seed "metafilter", keeping the top five with 50% evolution. A really badly balanced rhino car is taking a strong lead, so far.
posted by cortex at 6:22 PM on June 25, 2013
I'm currently running a population on the seed "metafilter", keeping the top five with 50% evolution. A really badly balanced rhino car is taking a strong lead, so far.
posted by cortex at 6:22 PM on June 25, 2013
There's a hill about 132 meters in that all of 'em keep hitting the wall on. I'm calling it Mt. Metatalk.
posted by cortex at 6:23 PM on June 25, 2013 [2 favorites]
posted by cortex at 6:23 PM on June 25, 2013 [2 favorites]
whoa, "lolbutts" seed (10% mutation, 3 clones) went to 150m on gen3. Tricky track too.
posted by Foci for Analysis at 6:34 PM on June 25, 2013
posted by Foci for Analysis at 6:34 PM on June 25, 2013
There's a hill about 132 meters in that all of 'em keep hitting the wall on. I'm calling it Mt. Metatalk.
One of mine cleared it on gen 18, but then hit a really nasty spike peak at 150 meters which I think is fundamentally impassible.
Plus none of 'em have cleared Mt. Metatalk since -- even the successful clone that carried over from gen 18 to gen 19 failed it next attempt. That "not as deterministic as I'd like it to be" business is pretty punishing at the margins, where a little bit of simulation error can be the difference between squeaking over versus grounding shy of the top.
posted by We had a deal, Kyle at 6:45 PM on June 25, 2013
One of mine cleared it on gen 18, but then hit a really nasty spike peak at 150 meters which I think is fundamentally impassible.
Plus none of 'em have cleared Mt. Metatalk since -- even the successful clone that carried over from gen 18 to gen 19 failed it next attempt. That "not as deterministic as I'd like it to be" business is pretty punishing at the margins, where a little bit of simulation error can be the difference between squeaking over versus grounding shy of the top.
posted by We had a deal, Kyle at 6:45 PM on June 25, 2013
I seriously doubt anything is going to make it past this. Not anything that can make it through the 180m preceding it, at least.
posted by egypturnash at 7:09 PM on June 25, 2013
posted by egypturnash at 7:09 PM on June 25, 2013
Mine are stuck at 130m I HAVE NO SONS!
posted by Foci for Analysis at 7:12 PM on June 25, 2013 [1 favorite]
posted by Foci for Analysis at 7:12 PM on June 25, 2013 [1 favorite]
I burned so many cpu cycles running this today. love.
posted by bottlebrushtree at 7:15 PM on June 25, 2013
posted by bottlebrushtree at 7:15 PM on June 25, 2013
I think there's too much of a 'butterfly effect' going on for consistent top performers to be evolved. It's developed a population of good performers, none of which have matched the best car from 50 generations ago.
posted by DarkForest at 7:18 PM on June 25, 2013
posted by DarkForest at 7:18 PM on June 25, 2013
I seriously doubt anything is going to make it past this.
Pfft. Call that a mountain? My geneticars eat that for breakfast. Try this on for size at 178m. 15 generations in and we're still stalling near the peak.
posted by sysinfo at 7:18 PM on June 25, 2013
Pfft. Call that a mountain? My geneticars eat that for breakfast. Try this on for size at 178m. 15 generations in and we're still stalling near the peak.
posted by sysinfo at 7:18 PM on June 25, 2013
Having gotten a crop finally that can usually clear Metatalk and the nasty spike at 150 and which are now running aground at that same mess egypturnash noted, I'm giving up on the metafilter seed for now. Let's see what "DTMFA" looks like.
posted by cortex at 7:42 PM on June 25, 2013
posted by cortex at 7:42 PM on June 25, 2013
seed "metafilter" produced this lovely hill that actually launches the cars backwards...
posted by rebent at 7:46 PM on June 25, 2013
posted by rebent at 7:46 PM on June 25, 2013
Based on my initial explorations, it seems the ultimate form approaches the velocipede.
I hoped it was these Supercar sounds, though I didn't really expect it.
posted by 23 at 7:52 PM on June 25, 2013
I hoped it was these Supercar sounds, though I didn't really expect it.
posted by 23 at 7:52 PM on June 25, 2013
Also this is so much fun to watch. Thanks for the post.
posted by curious nu at 8:02 PM on June 25, 2013
posted by curious nu at 8:02 PM on June 25, 2013
I have the feeling that I'm going to suffer obsessive 'tetris' dreams of prawns on wheels tonight.
posted by isopraxis at 8:27 PM on June 25, 2013 [2 favorites]
posted by isopraxis at 8:27 PM on June 25, 2013 [2 favorites]
I'd love to see this with an Audiosurf/old school Winamp visualization aesthetic I could run as a screensaver.
posted by jason_steakums at 8:29 PM on June 25, 2013
posted by jason_steakums at 8:29 PM on June 25, 2013
This little guy finally stalls out at 192 on seed metafilter. Go little polygons, go!
posted by ook at 8:43 PM on June 25, 2013
posted by ook at 8:43 PM on June 25, 2013
OH CURSES I CLOSED THE WRONG TAB LITTLE POLYGON GUY IS GONE FOREVER :(
posted by ook at 8:44 PM on June 25, 2013
posted by ook at 8:44 PM on June 25, 2013
90 generations in and I've managed to create a race of cars thar will make it to 178 M but no further pretty much every time. (on default track)
posted by sourwookie at 8:44 PM on June 25, 2013
posted by sourwookie at 8:44 PM on June 25, 2013
Too bad the cars can't climb on each other as that would be useful at the 178 M mark. It would be crazy to introduce evolutionary cooperation into the mix.
posted by sourwookie at 8:48 PM on June 25, 2013 [1 favorite]
posted by sourwookie at 8:48 PM on June 25, 2013 [1 favorite]
I like to think of the distances as KM and the cars as MASSIVE.
posted by Sleddog_Afterburn at 8:49 PM on June 25, 2013
posted by Sleddog_Afterburn at 8:49 PM on June 25, 2013
I notice in the original version that polygons may be shed from the body allowing the car to continue. I wonder if the starting data of that car is seeding the next generation or the state it is in when it finishes the track? I don't see a "Lamarckian" option.
As for the HTML 5 version, that red line has been completely horizontal for 60 generations now. I wish I could hit it with an asteroid or dump a bunch of O2 into the atmosphere to dislodge this evolutionary stasis. Or just select a different mutation value, I suppose.
posted by sourwookie at 8:58 PM on June 25, 2013
As for the HTML 5 version, that red line has been completely horizontal for 60 generations now. I wish I could hit it with an asteroid or dump a bunch of O2 into the atmosphere to dislodge this evolutionary stasis. Or just select a different mutation value, I suppose.
posted by sourwookie at 8:58 PM on June 25, 2013
try this while listening to Fela Kuti. These cars can dance!
posted by Mei's lost sandal at 9:08 PM on June 25, 2013
posted by Mei's lost sandal at 9:08 PM on June 25, 2013
SimCar: The Living Vehicle
posted by curious nu at 9:08 PM on June 25, 2013
posted by curious nu at 9:08 PM on June 25, 2013
I reduced the number of elite clones from 2 to 1 and increased mutation rate to 20%. Fitness took a dive pretty quick but has been approaching the 178M mark again with a breed of different looking vehicles. Though I have no idea what design could make it over that hill.
posted by sourwookie at 9:11 PM on June 25, 2013
posted by sourwookie at 9:11 PM on June 25, 2013
A car in generation 78 developed a nice arch that can get over peaks and it went 193 meters on the default course. None since have had an arch like that.
posted by eye of newt at 9:13 PM on June 25, 2013
posted by eye of newt at 9:13 PM on June 25, 2013
My kingdom for some traction!
posted by jason_steakums at 9:17 PM on June 25, 2013 [1 favorite]
posted by jason_steakums at 9:17 PM on June 25, 2013 [1 favorite]
I've got a leader that's cloning with a similar arch, but its flaw is that it has a single drive wheel, and it's tiny. If I could get a mutation with two drive wheels and both a little larger I may have something.
posted by sourwookie at 9:18 PM on June 25, 2013
posted by sourwookie at 9:18 PM on June 25, 2013
182 m on seed metafilter. This is a strangely compelling toy. What would be neat would be the ability to draw a car yourself and see if you can beat the algorithm. "Intelligent design", so to speak...
posted by Harald74 at 1:08 AM on June 26, 2013
posted by Harald74 at 1:08 AM on June 26, 2013
On "lolbutts" the rare car will make it past the ridiculous spike at around 192 m by just leaping over it (only to get stuck at 202 m). Low- and/or medium-density wheels seem to be key.
posted by Pruitt-Igoe at 1:51 AM on June 26, 2013
posted by Pruitt-Igoe at 1:51 AM on June 26, 2013
After 537 generations I can't get any car past the vertical section at 188 m on "metafilter". Time to try other worlds.
posted by Harald74 at 4:00 AM on June 26, 2013
posted by Harald74 at 4:00 AM on June 26, 2013
I tried "lolbutts", and my leader got out to 456 m, with an elevation of -4976 m! I watched the replay, and it seems like it jumped off the end of the world. It was falling forever before the simulation stopped.
posted by Harald74 at 5:57 AM on June 26, 2013
posted by Harald74 at 5:57 AM on June 26, 2013
Let it cook overnight. 1407 generations and nothing past the 178M mark. I'm a confirmed creationist now.
posted by sourwookie at 6:30 AM on June 26, 2013
posted by sourwookie at 6:30 AM on June 26, 2013
BoxCar was awesome, and this is even more hilarious watching an army of deranged monster trucks crash and beach themselves. My favourite moments are when a bunch of similar types all fail against an obstacle, and a lone alternative suddenly shoots out from behind like some pointy hero.
That sheer cliff on "metafilter" is absolutely deadly though, I can't imagine what could get past it. The best I got was this fella at 182.35m, whom I have dubbed "The Sphinx".
posted by lucidium at 7:09 AM on June 26, 2013
That sheer cliff on "metafilter" is absolutely deadly though, I can't imagine what could get past it. The best I got was this fella at 182.35m, whom I have dubbed "The Sphinx".
posted by lucidium at 7:09 AM on June 26, 2013
The backwards jumping hill is a killer on course metafilter. I'll spend a couple generations with minor mutations getting all the cars elite and throwing out all but the best, then a couple evolving maniac cars keeping the top 5 non freak mutants trying to evolve something that can consistantly get over it, but nothing seems to be consistant.
posted by garlic at 7:41 AM on June 26, 2013
posted by garlic at 7:41 AM on June 26, 2013
That sheer cliff on "metafilter" is absolutely deadly though, I can't imagine what could get past it.
this did (by simply flying right past it) -- only to stall out on top of the very next set of peaks visible in your screenshot. Over 1000 generations overnight have failed to improve on that result.
posted by ook at 7:46 AM on June 26, 2013
this did (by simply flying right past it) -- only to stall out on top of the very next set of peaks visible in your screenshot. Over 1000 generations overnight have failed to improve on that result.
posted by ook at 7:46 AM on June 26, 2013
Oh wow, I didn't realise that was past the cliff. Brave, rocky thing.
posted by lucidium at 7:58 AM on June 26, 2013
posted by lucidium at 7:58 AM on June 26, 2013
Update: 222 m on "lolbutts"! I can see how you'd need a car that would just fly off a cliff.
posted by Pruitt-Igoe at 10:15 AM on June 26, 2013
posted by Pruitt-Igoe at 10:15 AM on June 26, 2013
It's interesting that the cars somewhat overfit to their particular world. I wonder if you could encourage a tortoise style self-righting shape with terrain which didn't gradually become impassable.
posted by lucidium at 4:17 PM on June 26, 2013
posted by lucidium at 4:17 PM on June 26, 2013
Generation 2656 and still have not passed that particular hill at 179 M. I doubt it's possible.
posted by sourwookie at 7:34 PM on June 26, 2013
posted by sourwookie at 7:34 PM on June 26, 2013
"Generation 2656 and still have not passed that particular hill at 179 M. I doubt it's possible."
Just to be clear, we're talking about the default seed? A lot of my cars made it past to about 191-193, but one made it all the way to 202 at generation 2848. I've run a total of 2966 generations. That's basically a cliff at 204-212, I don't see how anything could get past that.
For the metafilter track, I had two that made it past the 182 bottleneck, one reaching 188 and the top making it to 190, the latter at generation 1284. I've run a total of 2329 generations.
I notice that both these top cars have large, equally sized low-density wheels with relatively small bodies that allow the cars to travel upside-down. That's crucial in both cases, as flipping and making repeated runs (flipping each time, like making loops) at a difficult section got them past it.
posted by Ivan Fyodorovich at 1:53 PM on June 27, 2013 [1 favorite]
Just to be clear, we're talking about the default seed? A lot of my cars made it past to about 191-193, but one made it all the way to 202 at generation 2848. I've run a total of 2966 generations. That's basically a cliff at 204-212, I don't see how anything could get past that.
For the metafilter track, I had two that made it past the 182 bottleneck, one reaching 188 and the top making it to 190, the latter at generation 1284. I've run a total of 2329 generations.
I notice that both these top cars have large, equally sized low-density wheels with relatively small bodies that allow the cars to travel upside-down. That's crucial in both cases, as flipping and making repeated runs (flipping each time, like making loops) at a difficult section got them past it.
posted by Ivan Fyodorovich at 1:53 PM on June 27, 2013 [1 favorite]
« Older Even if you have never been there, you know these... | [disposable] Newer »
This thread has been archived and is closed to new comments
posted by ryanrs at 5:46 PM on June 25, 2013