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.

Genetic Algorithm Walkers

122 pointsby clukicover 10 years ago

23 comments

Animatsover 10 years ago
I&#x27;m currently stuck at 1233 after 250 generations. The last improvement was at gen 183. Walking gets part way down the first downslope, then falls. The current champions are far better than any of their mutations, so a local maximum has been reached. This is the fate of most evolutionary AI.<p>Once on the downslope, the controller for flat ground won&#x27;t work, so now it has to jump to something substantially more complex to progress. Making such jumps was an unsolved problem with genetic algorithms 20 years ago, and I commented back then that whoever solved it would win a Nobel Prize. Still waiting.<p>I suspect that a solution lies in work on neural nets where one net is trained, then a second, smaller, net is trained to match the first. This is a form of &quot;abstraction&quot;. Somewhere in that space is something very important to AI.
评论 #8920248 未加载
评论 #8914821 未加载
评论 #8914688 未加载
saganusover 10 years ago
A bit OT, but I remember a very cool Quake2 mod that basically built a neural network so that bots could learn how to play.<p>The useful part was that you could save the NN to a file, and so you could let Q2 run for hours (mostly I left it at night so it wouldn&#x27;t prevent me from playing :) ) and the hext day I would save the progress.<p>After about a week of doing this everynight, the bots evolved from just jumping around in their spawn points without moving, to actually run around the level and shoot the other bots on sight.<p>They didn&#x27;t really have a good aim, but sometimes they would land a rocket or a rail. I always wondered how much time would I have to let the bots evolve so that they would become competitive.<p>Unfortunately after some time I lost my NN files and lost the project page. Some time later I found again the project but it was not updated and the download files were broken.<p>Wish I had saved the mod :(<p>Now, honest question: would this kind of approach work for, say, programming a Hello World program? or would the number of variables and possibilities is too big?<p>It would be interesting to put several of these bots to compete against each other, but in different languages and see which one is &quot;easier&quot; to grasp by the bot.
评论 #8914519 未加载
评论 #8917542 未加载
评论 #8914376 未加载
sinwaveover 10 years ago
I suspect that the best way to tackle this problem is to treat &quot;learning to walk&quot; as a reinforcement learning problem. This way you can evaluate actions within each episode rather than waiting until the end of each trial to adjust parameters encoding the walking strategy.<p>As karpathy suggests below (and he&#x27;s certainly much more qualified than me), an evolutionary method such as GA&#x27;s, while apparently fairly effective, could well be wasting valuable information learned in real time through interaction.
lukevover 10 years ago
One interesting thing is that progress very much happens by fits and starts, as it waits for the &quot;lucky mutation&quot; that will enable evolution to continue.<p>For example,<p><pre><code> 0 Bedaaa Ceeici 6.07 1 Bocodo Bidobo 105.93 3 Aibebe Docoeo 107.74 7 Diaebe Eocoeu 107.88 10 Ciaabe Eocoeo 107.95 25 Diaebe Facodu 108.19 28 Biaebe Eocoeo 108.20 30 Biaeae Eacoeo 108.47 35 Beaebi Fucieo 109.88 36 Biaebi Eucici 203.60 42 Biaibi Fuceci 204.65 45 Aiaibi Fuceeo 206.30 47 Aiaibi Fucici 206.60 48 Aeaebe Eoceeo 412.96 56 Beaebe Euceeo 414.05 59 Beaebi Fubiei 415.76 73 Beaebi Focieu 519.01 75 Beaebi Eocido 519.39 96 Baaebi Gidido 521.00 99 Baaebe Focedo 627.14 </code></pre> There are pretty massive jumps at generation 36, 48, 73 and 99.<p>By the way, this is at 50% mutation probability and 25% mutation amount. It got stuck way earlier with large less frequent mutations (as one would expect, if the probability of a beneficial mutation occurring is the limiting factor).
评论 #8914342 未加载
kendallparkover 10 years ago
Ah. Aiaeca Eeaeci rocking it at 1048.50 at gen 256.<p>EDIT I&#x27;ve heavily tweaked my config throughout depending on whether I thought I was trapped at a local maxima, etc. Right now I think I&#x27;ve settled on for late-game:<p>10% mutation prob 1% mutation amount 3 to copy<p>Currently: 1056.91 @ 338.
freehunterover 10 years ago
With a Core i7, I wasn&#x27;t expecting the simulation to run so slow, even at the lowest settings.. Maybe Firefox on RHEL 6 isn&#x27;t the optimal platform for this little toy?<p>--edit: it runs much, much faster on Firefox with Windows 8.1. Not a Core i7, but an AMD 8-core thing. Must be Firefox on Linux&#x27;s implementation, unless it&#x27;s a video card&#x2F;driver thing.
评论 #8913670 未加载
评论 #8913554 未加载
Houshalterover 10 years ago
What exactly is evolving? How is the genome represented, how does it control the walking?
评论 #8913771 未加载
Aqwisover 10 years ago
Fun, but even after hundreds of generations the walkers are still pretty bad. How good would they be after thousands or millions of generations? Is it even feasible to create a decent walker using genetic algorithms?
评论 #8913932 未加载
评论 #8913767 未加载
V-2over 10 years ago
I&#x27;d like to see a genetic algorithm evolutionarily figuring out what parameters give you best performing walkers in shortest time ;) Meta-genetic if you will
评论 #8914532 未加载
nhzmjuover 10 years ago
I was just about to give up at 70th generation, when the walkers suddenly evolved from 1 to 4 steps in 5 generations.<p>Currently at generation 120 with 7 steps, looks like it is &quot;evolving&quot; in bursts, with long periods of nothing.<p>Well it is stuck at 9 steps at gen 400+.<p><pre><code> 327 aibobe baeado 948.93 &gt;&gt; 548 aibobe baeado 1058.76 </code></pre> I wonder if the author got any further. I would say this is close to the limit.
评论 #8913508 未加载
评论 #8914483 未加载
评论 #8913651 未加载
评论 #8913704 未加载
评论 #8913891 未加载
ColinWrightover 10 years ago
So is this really a genetic algorithm, or is it hill-climbing? Are you combining genomes from different individuals? Or are you just mutating a single genome? There are no controls for crossing genomes, so it seems likely to be hill-climbing.<p>If not, how are you mapping the genome to the phenome?
评论 #8914966 未加载
mmanfrinover 10 years ago
Reminds me of this really fantastic video of finding the gaits of different sized&#x2F;legged &#x27;animals&#x27; at different speeds: <a href="http://vimeo.com/79098420" rel="nofollow">http:&#x2F;&#x2F;vimeo.com&#x2F;79098420</a>
gus_massaover 10 years ago
I just got one that evolved kneeling to last a few more seconds: <a href="http://imgur.com/mii9N8J" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;mii9N8J</a>
hellbannerover 10 years ago
Please make one for QWOP <a href="http://www.foddy.net/Athletics.html" rel="nofollow">http:&#x2F;&#x2F;www.foddy.net&#x2F;Athletics.html</a>
评论 #8914434 未加载
V-2over 10 years ago
Reminded me about <a href="http://rednuht.org/genetic_cars_2/" rel="nofollow">http:&#x2F;&#x2F;rednuht.org&#x2F;genetic_cars_2&#x2F;</a><p>If you&#x27;re disappointed with walkers&#x27; performance, try cars, they improve much more. The principle remains the same of course. Attention: addictive.
评论 #8914837 未加载
评论 #8914734 未加载
shkkmoover 10 years ago
You seem to have some bugs with the copying of champions and&#x2F;or the identical reproduction of walks at the very short simulation length. Without having adjusted simulation parameters I no longer have my highest scoring walker saved as a champion.
评论 #8914692 未加载
ehtdover 10 years ago
Very cool! I did my master thesis in Genetic Algorithms and bipedal robots. You can watch the results here: <a href="https://www.youtube.com/watch?v=SYONnbvsxz0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SYONnbvsxz0</a>
clemsenover 10 years ago
This looks like fun! It seems that the copied champions are simulated in every run. As long there is no random influence you can probably skip this simulation, as the simulation of the champions is also most likely the most CPU intensive.<p>EDIT: Grammar.
评论 #8913652 未加载
评论 #8914070 未加载
评论 #8913739 未加载
hcarvalhoalvesover 10 years ago
Converged pretty fast to the first step on the 10th gen, then got stuck having a seizure and falling on it&#x27;s head &quot;forever&quot;.<p>I bet this would be interesting evolving a simpler movement mechanic, like in bacteria.
sagoover 10 years ago
This is how NaturalMotion started. I remember their CEO Torsten evolving muscle controllers on the Mathengine physics engine (1999?). Get it right, and you get to build a pretty nice business out of it!
bryogenicover 10 years ago
You could optimize the no-graphics&#x2F;high speed even more by not simulating the copied champions (since their end score is pre-determined)
comboyover 10 years ago
I always spend way too much time on these sites. Not a new idea, but the visualization is awesome.
yuashizukiover 10 years ago
its not improving after gen 190. Its stuck.
评论 #8913413 未加载