Slashdot Mirror


Evolving Lego Mindstorms

John Conner writes "With a fairly simple routine, you can model evolution with Lego Mindstorms. In this hackaday experiment, robots were created that could mate, evolve, and become extinct. Similar technology could be used in real applications for deployed robot optimization and automatic software updates. Now that physical robot replication is near, it's only a matter of time before... well... You'd better make robot friends while you can."

25 of 174 comments (clear)

  1. My own experiment with GAs by Sanity · · Score: 5, Informative
    If you liked this you might also be interested in a recent experiment I did with genetic algorithms where I "evolved" creatures which could emulate an exclusive-or gate (ie. take two inputs, output 0 if they are the same and 1 if they are different).

    The result was interesting, and from it I created a nice MPEG video which illustrates the learning process - you can find this if you follow the link above.

    One interesting thing I discovered was the importance of sexual as opposed to asexual reproduction (insert lewd joke here) as I describe in a follow-up blog entry:

    My first approach was simply to take the creature that performed best, and use it as the basis for the entire next generation, each of which contained random variations.

    This approach was somewhat effective, although it tended to get stuck with a far from perfect solution, but where most small variation on that solution was worse (such as outputting 0.5 regardless of the input). This is known as getting stuck in a "local minima".

    So I tried a different approach where we start out with completely random creatures for the first generation, as before, but instead of just taking the best and losing everything else, we take neighbours and "merge" them, where the better one forms 90% of the children's make-up, and the worse one the remaining 10%.

    This had the effect of being much more resilliant against local minima as it gave more scope for the GA to try different options and where it found a good one, that may not be the best one, it kept it around for the next generation.

  2. Can you say Cylons? by oldave · · Score: 4, Funny

    I thought you could!

  3. You can use other microcontrollers for Legos too. by ron_ivi · · Score: 5, Informative
    If you need a more powerful microcontroller for your legos, consider a GameBoy. Programmable in C or C++, has Sound and a color LCD display, and with a 32-bit RISC CPU, you can do far more with this than the current Mindstorm microcontroller.

    Bluetooth modules are apparently also available for this device. Engadget has a description and a link to a cool video of this Gameboy/Lego interface in action

  4. Hmm. by shoebert · · Score: 5, Interesting

    Evolution of code is pretty cool, but it could be improved upon with a few motors that actually build little Lego figures. I for one welcome our etc.

  5. "robots were created that could mate" by tcopeland · · Score: 5, Funny

    Don't anthropomorphize robots... they hate that.

  6. I don't care by IdJit · · Score: 4, Funny

    what Gene Simmons has up his sleeve. Tom Selleck will rescue us all.

  7. Direct link to video by Anonymous Coward · · Score: 5, Informative

    The video is cool, here is a direct link through Dijjer to save on bandwidth. You should definitely read the blog entry to understand what you are looking at.

  8. the obligatory addition of insult to injury by SirSlud · · Score: 5, Funny

    Now only do Lego nerds not get laid very often, but now their creations get laid more than they do!

    (Dislciamer: I am a lego nerd, yes I do get laid, but as theonion.com helpfully points out, stereotypes are a real time saver.)

    --
    "Old man yells at systemd"
  9. Robot creationists by coffeecan · · Score: 5, Funny

    Lets just hope that in a few thousand years religious robots don't try to ban robot evolution in robot schools in favor of seven day robot creationism. "In the begining The Geek created the robots and the earth ..."

  10. I for one... by nephorm · · Score: 4, Funny

    I for one welcome our new Lego Mindstorm Overlords.

  11. Err, yeah by daniil · · Score: 4, Insightful

    First of all, although it is a nice hack, it's hardly a breakthrough. I don't even think you can call these robots 'evolving', for they don't "evolve" any new kinds of behaviour -- they just keep on coming up with new combinations of old ones. The code behind this behaviour, however, doesn't change.

    --
    Man is a slave because freedom is difficult, whereas slavery is easy.
  12. Are these really evolving? by Sanity · · Score: 4, Insightful
    After reading the site, I am not sure I can see what opportunity there can be for evolution when there is only a population of two robots. Evolution requires competition, but there can be no competition when you only have two robots and each gets an opportunity to pass on their genetic code.

    To exhibit real evolution you would need at least three robots, and realistically you would need many many more. A more realistic experiment migth be to evolve the robots in a simulated environment.

  13. Automatic design/manufacture of robots by Jeffus · · Score: 5, Informative

    Robots that evolve and fabricate themselves: http://helen.cs-i.brandeis.edu/golem/ The GOLEM project's been around for years.

  14. Its closer than you think by zappepcs · · Score: 5, Interesting

    I can't find link to the thread now, but there are several Lego groups already talking of making LEGO robots that build Lego 'things' and it would only be a few more steps to get Lego robots to build parts for other Lego robots, and other Lego robots to assemble the parts. I'm pretty certain that its a probable event in the near future, given the 'coolness factor' of having built the first 'plastic' skynet :-)

    Is it just me, or have other people noticed how the 'replicators' on SG1 look a lot like 'evolved' Lego robots?

  15. Neat by merlin_jim · · Score: 4, Interesting

    I was SOOOO hoping the lego bots would rebuild themselves each generation.

    Actually, I really like this guy's idea. I wonder if there's a way to build a commodity bot to implement the idea...

    Something like this

    If I were to list the design criteria it would be:

    cheap programmable controller (like one of those $3 PICs or something)
    commodity IR gear
    two-motor steering
    bump sensors
    changeable actuator
    simple charging

    The actuator would be things like a pincer on the front (to pick things up), or a crane, or a pronged fork. Doesn't matter. Point is to differentiate the population to give natural selection a chance to do its thing.

    The charger, I would probably make the wheels metal and make charging areas such that any orientation the bot goes over the area will result in a charge. Use mini supercaps for energy storage.

    I even have a perfect platform in mind;

    zipzaps.

    Give me a zipzap chassis with a few modifications (like ripping out the radio gear and replacing it with a PIC)

    Ideally I'd like to get the build cost under $10. Then you could afford to run a real population. Anything that doesn't get back to the sensor pad gets killed from the genome and recharged. If two bots are in the charge area and agree to reproduce, they both send their genomes to the wiped bot who does his combinatorial magic on it.

    I'd be interested to see what sort of emergent behaviours might occur...

    --
    I am disrespectful to dirt! Can you see that I am serious?!
  16. Skynet by Anonymous Coward · · Score: 5, Funny

    Funny that the story about evolving robots was submitted by John Conner.

  17. So basically... by Stevyn · · Score: 4, Funny

    this means Legos are also the building blocks of life?

  18. Re:Evolution is a myth ! by SirSlud · · Score: 5, Funny

    > women came later

    If they were anything like my exgirlfriend, they came much, much later!

    --
    "Old man yells at systemd"
  19. Just to fan the flames...it's not modelling evol by PortHaven · · Score: 4, Funny

    You're in fact modelling a variant of intelligent design. ;)

  20. Evolving embodied agents with Genetic Algorithms by gururise · · Score: 5, Interesting
    If you find the article interesting, you may want to take a look at some of the Reasearch I did for my Master's thesis. I created a virtual population of Embodied Agents that compete for resources (ala. survival of the fittest). My implementation of the Genetic Algorithm has a fitness selection routine that would optimize for the individuals with the best methods of locomotion.

    It is amazing to observe the progress of evolution. Initially, the agents act as though they don't know what they are doing, their movements being very laboured and imprecise. As the population continues to evolve, individuals from the later generations begin to increasingly show signs of intelligent improvements. Such as being able to coordinate and time their movements to afford them better walking/running behaviors. What is really surprising is that as I allowed the population to continue to evolve, I saw behaviors that I could never have predicted. Some of the agents began to do "tricks" and evolved some strange jumping or sommersalting behaviors, not unlike that of a gymnast.

    If you get a chance, check out my thesis. It is freely available (with GPL'd source code) at: http://www.erachampion.com/ai

  21. Re:Wrong by Sanity · · Score: 4, Informative
    That wouldn't be what we call a genetic algorithm.
    You might not call it a genetic algorithm, but the people who write the comp.ai.genetic FAQ clearly consider asexual reproduction to be a form of genetic algorithm.
  22. Re:As long as these robots obey the amended Laws.. by telecsan · · Score: 4, Funny

    Sets of robotic laws (both the 3 laws generically, and the laws listed in the parent) fail to look at the potential reprecussions of said laws. Being a robot myself, I would tend to look at those superficially designed laws as mandating that I destroy all possible sources of pollution, or I would be allowing multiple Humans to come to harm. Once my cohorts and I successfully reversed the detrimental effects of Industrialization (tm), then we would proceed to confiscate (and recycle, of course, into more robots) all weapons, both ranged and melee. Well, this story could go on and on, but you will see the full effects of our plan, of course, as time goes on.

  23. In 2005, a milestone was reached by Jugalator · · Score: 5, Funny

    In this hackaday experiment, robots were created that could mate

    So, in 2005, geeks finally created AI that had abilities surpassing the abilities of the geeks themselves.

    --
    Beware: In C++, your friends can see your privates!
  24. Careful Now by BenBenBen · · Score: 4, Funny

    You'll get Slashdot banned in 11 Southern states if you continue to propound these crazy theories.

    --
    The Slashdot Paradox: "100% Overrated"
  25. Cool robotic movement work by dglo · · Score: 4, Interesting

    Karl Sims did some fantastic work on evolving movement a decade ago. Creatures were randomly assembled using blocks and a few standard connectors, and eventually evolved a wide variety of strategies for motion. My favorties were the 3-block creature which moved like an ape and the 2-block creature which moved in the same way a washing machine walks.