The Emergence Project

An experiment in group machine intellegence
(Or lack thereof...)

Similar projects worth following
The original impulse for this project was to make solar powered BEAM-style robots that would dart from light spot to light spot continually recharging themselves before moving on. As we were contemplating how to do this, we decided the use of a microcontroller was all but inevitable, and we wondered how we could utilize it's capabilities. At this point we began to run into the concept of emergence.

Emergence: In philosophy, systems theory, science, and art, emergence is conceived as a process whereby larger entities, patterns, and regularities arise through interactions among smaller or simpler entities that themselves do not exhibit such properties.

In other words, emergence happens when a group stops being just a collection of individuals, and starts to become a flock, or a hive, or a nest.

Our intention is to build a small swarm of robots and see if emergent behavior arises through their repeated cooperation and interaction with each other.

The idea is to build a number of small (palm sized), simple (using the BEAM 'less is more' philosophy), and relatively inexpensive ($50 is the target) robots, and give them the basic abilities to communicate with each other and adapt to their environment. The idea is to see what kind of complex social behavior we can coax out of a multiple of relatively simple machines, and hopefully be surprised by something we didn't explicitly program them to do.

The 'bots are eventually going to be solar powered. They will sit collecting energy until they have enough to run through a movement or communications cycle. When they decide to move (the target is to have them move for 15-20 seconds every 15-20 minutes) they will wander randomly for the first half the cycle to ensure that they spread and explore. During the second half, they will realize that they're 'hungry' and will use light detection to head for the brightest area they can see, bettering their chances of recharging quickly.

A few of the settings (ones for, say, motor speed or level of contrast it looks for when seeking light) will be left for them to decide for themselves. When they sit out a cycle and go into a communications phase, they'll use small radio transmitters to broadcast their efficiency level, and what their settings currently are. All the other 'bots in the immediate area will compare their own efficiency to the one broadcast, and nudge their own settings closer to the broadcasting 'bot's, or ignore them if they're doing better. Eventually, this yes/no better/worse behavior should help each other find the best settings for whatever environment that they're placed in.

To ensure that the 'bots go through the full range of their settings, random mutations will be introduced into their settings. Mutations that prove beneficial will spread through the swarm. The ones that don't will disappear within a few hours or days depending on how often they interact with their hivemates. This presented us with the first behavioral question we ran into before we'd even begun: Can the 'bots even exist individually? We didn't explicitly set out to design this behavioral aspect in, but a single 'bot might not be able to. It will still generate random mutations in it's code, but without at least one companion to compare it's efficiency with, it might get itself so far out of whack that the amount of power from sunlight it gathers during the day won't be sufficient for it to survive the night.

As for how the rest of the 'bots will spend the night, some members of the swarm may find themselves in a slightly better position than the rest. It may find it's way to a light that's been left on, or a bright spot beneath a window from a streetlight outside. If it manages to find one of these 'it's better than nothing' sources, it will remain in place and turn it's IR LED fully 'on'. This acts as a beacon for the rest of the members, who use the exact same light seeking script that they use to find sunlight during the day, except the brightest light it sees and steers towards is it's hivemate, and not the sun.

Once we get the 'bots built and programmed, we will wait and see how they act. Will they run about randomly during the day, or will they migrate from one side of the room to another following the sun's arc? Will they tend to roam alone, or will they travel in a pack? What happens when they reach a homeostasis with the environment we put them in? Will 'bots who have the same settings act exactly alike, or will individual traits arise? Will 'bots that live upstairs in the electronics area settle on the same settings as 'bots that live in the workshop, that gets no natural light at all? What happens if we introduce code that causes not just mutations in their settings, but also the code that they use to communicate with each other? We might wind up with two seperate subspecies that can't even communicate with each other. What happens if you mix them? Will one act as an invasive species, changing...

Read more »

View all 10 components

  • Bouncin' Right Along...

    Greg Daneau11/09/2015 at 03:31 0 comments

    Greetings True Believers! A quick project update...

    We've finally, positively identified the gremlin that's been plaguing the project for so long. As we've long suspected, it was something simple that our Fearless Leader managed to overlook while doing his pre-project research. This phenomenon is known as 'contact bounce'.

    When mechanical switches like the ones we use for obstacle avoidance are tripped, they don't make positive contact instantaneously. In that split second it takes to go from 'off' to 'on', it may arc hundreds, or even thousands, of times. This understandably freaks out the controller, making the action it decides to implement erratic. It also explains why the problem seemed to be getting worse over time. When we thought the problem was faulty switches, we were replacing the relatively expensive switches we had bought for the prototypes with the cheaper ones that we're going to use for the swarm. The more switches we replaced, the worse the problem got. The worse the problem got, the more switches we replaced, and so on.

    Now that we've gotten the problem identified, we need to do two things:

    First, we need to eliminate the noise. You can use capacitors to try to smooth out the noise, but most of the material we've read on the subject suggests that it's easier and more effective to take care of the problem in the software. That's the tactic we're going to try first.

    The second thing we need to do is to throw an evil glance and a wagging finger at you, True Believers. We know some of you out there are electronics gurus. You could have spoken up when these problems began, but you chose to let us fumble in the dark for months. We place this whole affair squarely on your shoulders...

    It's all your fault...

    Shame on you...

  • Success in Failure

    Greg Daneau10/22/2015 at 05:26 0 comments

    Sometimes you just need things to go wrong so you can eventually get them to go right. It seems that our latest frustrating setback might have an upside, though. First off, we decided to give our original prototypes, Frankie and Johnny, a rest since they'd been crosswired, changed, shorted out, and otherwise abused during our first round of building. We decided that the first 'bot to use the final electronics should start over as a blank slate. We randomly selected one of our future swarm, and it turned out to be 'Jan'.

    We went back to the breadboard, so we could iron out any systems intigration problems with the new components easier. But, an old nemesis came roaring back: intermittent and often random problems with the obstace and edge avoidence. But, it seemed a bit different this time. With the new Arduino Mini Pro controllers, it wasn't as random as it was with the previous controller. It wasn't working any better, but it was more consistent. We noticed that when it acted up, there was a delay before it would begin to move again. It was exactly the same delay we built into the beginning of the program to give us a chance to put the 'bots on the floor before they started off. It seems that the microswitches we use as obstacle detectors generate either a voltage spike, or enough EM noise, to make the controller reset itself. This was both disheartening and encouraging at the same time. We may still have a problem to resolve, but FINALLY know what's causing the problems to begin with.

  • The Emergence 'Bots Roll Again

    Greg Daneau09/28/2015 at 03:30 0 comments

    True Believers! The Emergence Project is back in gear. Our Fearless Leader is a season-ticket holding Chicago Blackhawks fan, and their successful Stanley Cup win left the project a bit scarce of both initiative and disposable income. However, the project is gathering steam once again.

    After having so much free time to think, we've made a couple of changes. First off, the operating voltage. When we last heard from the 'bots, we were switching from the original 5v to 3v, to keep everything consistant with the new charging boards and batteries. We're changing back to 5v. It was a nice idea, but two things prompted the change. First, we managed to find a 5v step-up board that could bump the power components' lower voltage to that of the 'bot's nervous system. We didn't initially want to do this because we were worried that the conversion would be inefficient and cost precious power, and more components adds cost and extra points of failure. But, we happened across a new board that wasn't available when we changed things, and claims to do it efficiently without breaking the bank. We'll see if they're telling the truth...

    The second change is to the communication system. We've scrapped the IR pulses in favor of FM radio. We've been kicking the idea of going to radio since the projects inception, and it became apparent that it was likely a better system. When the Emergence 'bots were initially concieved, we imagined that they would communicate with each other via sound, sending information chirping like crickets. Radio is actually a bit closer to the initial concept, since it has the ability to go a fair distance, as opposed to infrared, which need line-of-sight contact. Another advantage is that with radio, we can have another reciever listening to the cross-talk, recording an log of exactly who is saying what to who, and when. Lastly, the radio transmitter and reciever aren't all that much more expensive IR components, and they will plug in neatly to the same Rx and Tx pins on the Arduino.

    Well, that's the news for now. We'd like to thank all the True Believers out there that have stuck around during all the stop, start, then stop again road the Emergence Project has been on. As for the new True Believers, welcome! Hopefully the road ahead will be a bit less bumpy...

  • Progress! No Kidding!

    Greg Daneau03/30/2015 at 03:15 0 comments

    Greetings True Believers! We have actually made some headway!

    Bad news: We had to move to 3v Arduinos. The last thing we wanted to do was order all new microcontrollers, but we did so in the best interests of the project. It's time to get moving for cryin' out loud...

    Good news: We seriously doubt the old controllers will go to waste (we are in a hackerspace, after all). The other upshot is that we weren't sure everything was going to work together at our previous voltage. 5v was on the edge of the electronics' tolerances, and we had our fingers crossed for much of the time. But now, we know that everything is compatable with everything else. Hopefully, this will keep gremlins to a minimum.

    We've also veered a bit with our testing direction. These power problems have convinced us to forgo any further sensor or behavior testing until we get everything else ironed out. So, we decided that the next goal we should attempt to hurdle is to have the 'bots moving on their own (as we've already done) but now on their own solar power. One upshot of this is that with the solar cell added, we can see if everything fits, and get closer to the final size and layout. Since Frankie's brain got scrambled and circuit board fried due to bad soldering, we decided that he would undergo the retrofit first.

    Frankie's now a bit wider and longer than Johnny, to accommodate the solar cell, but only a minimal amount. Our first guess at the bot's size was pretty damn close. Also, we're now using the electronics that were purchased for the final swarm for Frankie's new brain. Johnny's got his own new brain as well, but it will remain in the job tray until his own retrofit. Everything is still breadboards and jumper wires, but the earlier rat's nest has been cleaned up considerably and contained inside the 'bot. The next step will be getting Frankie's obstacle sensors hooked up, then we'll see how long the solar cell takes to charge him, and how well and how long he can move on that power.

    See? Progress!

  • Our Kingdom for a Charge...

    Greg Daneau03/01/2015 at 04:31 0 comments

    Well, the battery charging boards have arrived. As much as we hate to admit it, this might have been the way to go from the very beginning. The new boards have more than a few advantages. They are specifically designed to charge Li-Ion batteries from solar cells, and it adds the capability of charging the 'bots via USB. As an added benefit, it also allows you to patch into the status LEDs (ready, charging, low) and use them as digital inputs to the Arduino. In short, we can let the charging board monitor the battery voltage without having to write a separate voltage monitoring script for the Arduino. Any chance we can get away with writing less code to debug, the better.

    There has been another complication, however. The cheap Li-Ion batteries we were going to use are essentially useless. We assembled the first of the boards, plugged in the solar cell, and set it aside to charge. We were alarmed when it claimed to be 'ready' after just a couple minutes. A quick test with a voltage meter confirmed our fears. The batteries had been allowed to go totally and completely flat, which is a death sentence for Li-Ion batteries. They wouldn't take any charge at all.

    This is a major stumbling block. The vast majority of available Li-Ion choices out there are 3.7v. Our choice of components was geared towards 7v. If we dropped the operating voltage we would have to order all new electronics. Another problem with dropping the voltage down was that it limited future versatility. If someone later decides to expand on what we do with the Emergence Project, we would almost guarantee the first thing that will be tried is to bump the processor up to a Raspberry Pi or a BeagleBone Black. Both run on 5v, just like our Arduino. We wanted to make building a Raspberry or BeagleBone based 'bot (or upgrading older, existing 'bots) as easy as swapping out the processor without changing any of the other components.

    However, the is a ray of hope. After a quick look on eBay, it seems that comparable new batteries of the type we wanted to use aren't hideously expensive. It does mean going even further over budget (from $3 per battery to $10-15) but at this point, it seems the way to go. Sheesh... More money. What next?

  • We're Back! (Again)

    Greg Daneau02/18/2015 at 04:22 0 comments

    Greetings True Believers! We're back! Again! I'd like to thank all of you that have kept the faith, and also welcome the newcomers.


    All right, here's the latest: the Emergence Project lost momentum for a while, but we're back up and running again. The last week has been spent trying various solar cell / battery / charging circuit combinations, attempting to hit the bots' butter zone for power use vs. charge rate, as well the components that would be needed. This process has proved to be incredibly irritating. So, seeing as how the credit cards are finally clear of the holiday purchases, it was decided to cut through the Gordian Knot and just order a battery charging board.

    The board is specifically made for use with solar cells, and will also allow us to move to lithium ion batteries as opposed to NiCads. As an added benefit, we found some very cheap lithium batteries, originally made for use with Canon camcorders.

    The power system is the last of our major technical hurdles. While the charging boards have officially put us over budget, we've decided that just biting the financial bullet is the best thing to do for the project. At some later date we may come back to revisit the issue and drop the price per bot back down, but right now, it's time to put our collective heads down and power forward. The vast majority of our parts are in and ready to go, so once we get this issue nailed down, we should start rolling downhill fairly quickly. Hopefully.

  • Getting Our Groove Back

    Greg Daneau10/27/2014 at 02:27 0 comments

    We would like to apologize to all the True Believers for our near month long absence. Work and a number of personal issues had to take priority. If things weren't bad enough, Greg is also picking himself up after the untimely passing of his beloved Welsh Corgi, Aeron.

    However, time heals all, and enough has passed for us to think about diving back into the Emergence Project again. Even with everything else going on, we still managed to get some work done.

    The motors and wheels arrived a couple weeks ago. It almost felt like Christmas. For some reason gathering electronic parts didn't really feel like we were making progress. Getting the motors really brought things into focus. 'Man, that's a lot of motors... Holy Cow, this IS going to be a swarm! Cooool...' The motors and wheels were the last of the major components needed to really start on the final design, aside from the batteries.

    We have done a touch of testing in this area too. We got a couple of our candidate batteries wired to a breadboard, along with one of the solar cells, and a blocking diode for the absolutely simplest solar circuit ever made. We let them go for a time, and it does seem the solar cell puts out enough power to get past the internal resistance of the batteries and charge them. We don't know yet if they will fully charge them, because staring at a solar cell while it silently charges batteries is very, very, very boring. Hopefully in the next few days we can test the batteries a bit more and see if it's enough power to move our future robot army.

  • Driving Forward (Now With Motors!)

    Greg Daneau10/03/2014 at 08:10 0 comments

    Just a quick note to all the True Believers out there! Our job(s) have taken priority over the past few weeks, but we haven't been idle. We have the Arduino controllers in hand now, and American Science and Surplus had a special on used microswitches. They were pulled from equipment, but we built a quick breadboard circuit to test them. We were very pleased that we only found two dead ones in the bunch. It was also rather amusing to watch the reactions of the AS&S employees when we presented our request.

    "Now, you DO realize that you have to purchase 5 in order to get the special price, right?"

    "I don't think that will be a problem."

    "OK, so how many do you want?"

    "A hundred. Got any more in the back?"


    The special saved us another couple bucks per 'bot as well, so we're still on budget. It doesn't really matter in the grand scheme of things, but we've always envisioned the Emergence Bots' design morphing into a low cost educational kit that any school can afford, so the price will definitely matter then.

    The last of the solar cells have arrived, and we have a good candidate for our backup batteries. The focus for this weekend will be testing the battery candidate, while simultaniously trying out the power control code. The plan is to take the batteries, solar cell, Arduino, and a motor and wire them together in a simplified version of the bot's power system. The Arduino will monitor it's own power level, turn the motor on when the power is at it's peak, then shut itself down again when the voltage drops. Then the solar cell can set about recharging it. If we can get this simplified version to work, we see no great technical hurdles in this area.

    Finally, the motors and wheels have finally been ordered from Solarbotics! It took longer than we wanted, but we're not working with grant money here. Sometimes us members of the working class have to wait for a decent paycheck to afford this kind of thing. Hopefully when we get all of the parts in we can start playing a little Tetris and figure out what's going where, and start on the actual construction of the swarm. We're comin' along!

  • Surrender? Never!

    Greg Daneau09/09/2014 at 03:22 0 comments

    It's been a couple of weeks since our last update. Some may have thought the Emergence Project would fade away into the night after we didn't make the cut for the Hackaday Prize. HA! This was in the planning stages in one way or another for years, and we're gonna see it through. Let me assure all True Believers that our coverage gap was caused by the Labor Day holiday, and an unexpected burst of activity at the annoying (but still essential) day job.

    We're still working with Johnny on the light seeking behavior, but it's a slow slog. We've basically been working with him using the Scientific Method. We change X in his programming, then go into the back stairwell that has no windows, turn the lights out, and wave a flashlight in front of his nose to see how he reacts. Then we go back into the code, restore X, and change Y. We're slowly learning what parts of the code are responsible for which behavioral aspects.

    Frankie, on the other hand, is as disobedient as ever. We put together a semi-permanent circuit board for him, which worked fine the night we installed it. When we turned him on the next day, however, he refused to move, and when we picked him up to see what was wrong his voltage regulator was almost hot enough to light a cigarette off of. We instantly disconnected the power, but it's painfully obvious that we have a short somewhere in the maze of solder joints.

    However, we still have faith in the design and don't plan to change it. Johnny and Frankie have had enough successful run time to demonstrate that they do work as envisioned, with the inconsistancies explained by use of plug in breadboards and a string of software bugs.

    So, while we fuss with our original two, the Great Parts Gathering for the final swarm has begun. The processors are on the way, and we have our casters and motor driver boards, as well as 13 of the 15 solar cells. We found the cells at a Tiger Direct brick and mortar location, and cleaned them out. The last two are on the way.

    We have made some subtle changes, though. We went with a different motor driver, which is identical in all but name, but from a different manufacturer at a few dollars less a copy. We've also changed our main processor from the Ardweeny to the Arduino Mini Pro. It's a shade cheaper, and has the benefit of a couple extra I/O locations. With the extra versatility, we can include a small LCD display to read the bots' settings at a glance, instead of having to plug in and suck it out of their brains. The extra cost is being mitigated by the dollars we're shaving off here and there with the other components. Our original budget for each 'bot was $50, and our present projection is putting the actual cost at around $56. Not too bad, considering that every other robot we've ever built has usually come out double what was projected!

  • Another Sunday, Another Update

    Greg Daneau08/25/2014 at 02:19 0 comments

    It's Sunday, which means it's time for another Emergence Project update. It should be noted that we will still be bringing you updates even if the Hackaday Prize judges deem us unworthy. We're in this for the long haul!

    Frankie's brain transplant is done. We haven't had the opportunity to really put it through it's paces yet, but it has had some immediate impact regardless...

    You can see how much less room the soldered perf board takes up as opposed to the plug-in breadboard. So much less, in fact, that we were able to move the battery pack we've been using for testing to the top of the 'bot, instead of having it slung underneath. While ground clearance wasn't a huge concern, it does give us some comfort knowing that anything that manages to sneak under the obstacle sensors is also low enough for the 'bots to drive over. It also illustrates that the robots' hardware will all fit within the current size and shape footprint, so we won't have to change either of those, either.

    So, things are looking good. Good enough that Greg decided to take a leap of faith and has begun to order parts for the full swarm. This will be done gradually over the next few weeks (and paychecks). The final number settled on is 15. This gives us the dozen we envisioned when starting the project, as well as parts to make another 3, or to be used as spare parts if (or when) we fry something.

View all 23 project logs

Enjoy this project?



Adam Fabio wrote 07/07/2014 at 05:55 point
Great project Greg! I miss those old BEAM bots. Thanks for entering your robot in The Hackaday Prize. Keep the updates coming! can't wait to see when you have the solar system working!

  Are you sure? yes | no

Greg Daneau wrote 07/07/2014 at 06:57 point
Thanks for your vote of confidence Adam! I believe I may have bitten off a bit more than I can chew, but I've already taken the leap. I'll be sure to keep the updates coming, I'm sure there will be plenty of entertaining misadventures to come!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates