TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Watch cars evolve using genetic algorithm

484 pointsby memalignabout 1 year ago

26 comments

pjs_about 1 year ago
I wrote the original version of this nearly 20 years ago. Cool to see it still pop up here from time to time.<p>Still runs in the browser thanks to Ruffle:<p><a href="https:&#x2F;&#x2F;peteshadbolt.co.uk&#x2F;posts&#x2F;ga&#x2F;" rel="nofollow">https:&#x2F;&#x2F;peteshadbolt.co.uk&#x2F;posts&#x2F;ga&#x2F;</a>
评论 #40192964 未加载
评论 #40191184 未加载
评论 #40190892 未加载
评论 #40191147 未加载
评论 #40204428 未加载
评论 #40192907 未加载
评论 #40212115 未加载
评论 #40190823 未加载
ryandrakeabout 1 year ago
It seems to always get into a rut where one design lucks out and dominates generation after generation, with no mutations producing anything even close to working. Like, the top ten don&#x27;t change after hundreds of generations. Maybe this is just an attribute of genetic algorithms. They quickly zero in on something kind of good, and then get stuck at this local maxima. Or maybe I need to just play around with the Mutation Rate and Mutation Size settings.
评论 #40193096 未加载
评论 #40194945 未加载
评论 #40192857 未加载
评论 #40193520 未加载
评论 #40195569 未加载
评论 #40199077 未加载
评论 #40196398 未加载
评论 #40193507 未加载
jmoleabout 1 year ago
this is fun, even though the speed controls aren&#x27;t super intuitive. You can press &quot;Surprise&quot; to speed things up and go through a bunch of iterations quickly.<p>The mutation rate (likelihood that g changes) and mutation size (Δg) are fun hyperparameters to tweak while watching the population evolve over time.<p>It would be interesting to see a gene for &quot;compliance&quot; so the cars could have some kind of suspension. EVerything more or less evolved into a sort of tron-bike shape for most of the runs I tried.
评论 #40192607 未加载
gus_massaabout 1 year ago
Old discussions:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5942757">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5942757</a> (664 points | Jun 2013 | 169 comments)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10600486">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10600486</a> (162 points | Nov 2015 | 57 comments)
gavinsyanceyabout 1 year ago
So boxcar2d, but without flash.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2196747">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2196747</a>
评论 #40191008 未加载
评论 #40195498 未加载
评论 #40190451 未加载
khqcabout 1 year ago
Slight bug: there&#x27;s no road past about 280m, all cars fall into an endless pit
评论 #40193194 未加载
评论 #40193094 未加载
评论 #40193598 未加载
dustfingerabout 1 year ago
&gt; evolve random two-wheeled shapes into cars over generations<p>Where I come from, we call two-wheeled automobiles motorbikes. Very cool simulation though!
评论 #40194841 未加载
trekhlebabout 1 year ago
It is a very visual and entertaining visualization, I love it.<p>It inspired me to experiment with a genetic algorithm in &quot;Self-parking car evolution&quot;:<p><a href="https:&#x2F;&#x2F;trekhleb.dev&#x2F;self-parking-car-evolution&#x2F;" rel="nofollow">https:&#x2F;&#x2F;trekhleb.dev&#x2F;self-parking-car-evolution&#x2F;</a>
aqfamnzcabout 1 year ago
Reminds me of a phenomenal Android app called Cell Lab where you could create all kinds of multi- or single-celled organisms to live in a petri dish. You could crank up the radiation levels to let things mutate and evolve if so desired.
diydspabout 1 year ago
If you like things like this, join us at <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;WatchMachinesLearn&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;WatchMachinesLearn&#x2F;</a>
评论 #40198299 未加载
sssilverabout 1 year ago
Am I correct that it’s impossible for this system to evolve any kind of a suspension mechanism, no matter what the mutation parameters are?
dexderpabout 1 year ago
Interesting. Is there a way to do this in a 3d physics based simulation environment. It would be cool to see if a genetic algorithm could be used to discover new aerodynamic configurations for drones&#x2F;other platforms in simulation.<p>I don&#x27;t know enough about genetic algorithms to say for certain. Anyone have any reference materials for someone that&#x27;s just started looking into this?
评论 #40192929 未加载
评论 #40193172 未加载
评论 #40191123 未加载
amenghraabout 1 year ago
Reminds me dirt bike on Apple Macintosh -- you could edit pretty much every aspect of your dirt bike. Would be fun to make a car&#x2F;bike game where you play against the GA. <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=siiho5IVAdg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=siiho5IVAdg</a>
logicprogabout 1 year ago
I spent <i>hours</i> as a kid playing with Boxcar 2D. This brings back memories, and I&#x27;m not even that old!
nullcabout 1 year ago
might go much faster if it recorded a set of states where ancestors died shortly after and then test all the new candidates against those states.<p>The new candidate might actually survive because its prior history kept it from ever getting into that particular death state, but I think biasing towards designs that don&#x27;t immediately die in those hard cases is good anyways, since given a long enough run it would likely encounter a similar state.<p>One could co-evolve the test case collection by simulating only the best candidates according to the test cases, and then retaining test cases based on a running score for how well they predicted the actual performance.
评论 #40212152 未加载
Genboxabout 1 year ago
It references Box2D as the physics engine, but it seems to be a JavaScript port of Box2D. I&#x27;m unfamiliar with the JavaScript ports, but if it is a copy of one of the existing ports, the port should be referenced instead.
xuhuabout 1 year ago
Btw, how much AI goes into designing the exterior of a car (panels, lights, windows, grill) ? Can they just drag a slider for &quot;How much muscle do you want&quot; from &quot;Yes&quot; to &quot;Beige&quot; ?
评论 #40190316 未加载
评论 #40191574 未加载
anonuabout 1 year ago
so whats the optimal design?
评论 #40198479 未加载
hinkleyabout 1 year ago
Why are the cars so spiky and why do they stay that way? Mostly what I saw was the wheels move and change size.
评论 #40190945 未加载
fredoraliveabout 1 year ago
Considering the 2D nature of the simulation, aren&#x27;t they more motorbikes than cars?
评论 #40193684 未加载
YeGoblynQueenneabout 1 year ago
Funny how the landscape never changes, even though the generations come and go.
评论 #40195987 未加载
Applejinxabout 1 year ago
This isn&#x27;t genetic algorithm, though. It&#x27;s mutation.<p>To do it with a serious model of a genetic algorithm, you need crossover, not mutation. It&#x27;s fun, but this is sort of a lottery of randomized cars with some capacity for copying winning ones over to successive runs.<p>Breed the cars ;)
评论 #40193744 未加载
评论 #40192394 未加载
iancmceachernabout 1 year ago
Reminds me of that game Detroit
lwansbroughabout 1 year ago
How many generations does it take to start destroying communities? :)
hereme888about 1 year ago
Ok, that&#x27;s proof evolution isn&#x27;t real. lol
评论 #40195131 未加载
jeffbeeabout 1 year ago
Or &quot;overfitting as a service&quot;.