Man Built A Bird Feeder That Trains Magpies To Exchange Trash For Food

Birds are surprisingly intelligent, though not all birds are created equal. National Geographic reports that members of the corvid family (magpies, ravens, crows, and jays) are particularly smart and can remember human faces, “expertly navigate human environments,” and they even have funerals for their dead loved ones. Crazy, right?

These birds are trainable and inquisitive, always taking in the world around them. And one artificial intelligence researcher, Hans Forsberg, decided to put this intelligence to good use.

Forsberg took an interest in his neighborhood’s magpies after observing how smart they seemed to be. It led him to a brilliant idea: he would train the birds to exchange pieces of litter for treats.

Man Builds A Bird Feeder That Trained Magpies To Exchange Trash For Food

After a little experimenting, Forsberg invented what’s known as the BirdBox. It’s a somewhat simple contraption that utilizes mechanical design, software, electronics, and 3D-printed machine parts to sense when a bottle cap is inserted. Once it senses this, it releases a peanut.

He posted about his invention on Thingiverse, sharing that he spent “remarkably much time” creating the actual food dispenser part. But after a few years of trial and error, he seems to have gotten it right!

How it works is based on the concept of a vibrating feeder. He added funnels and extensions so that when a magpie places a bottle cap in a specific hole, the BirdBox is triggered to dispense a single peanut through a tube. Forsberg says it’s all made possible through the Raspberry Pi system which allows a camera monitoring detection system to hide beneath the bottle cap hole and respond to each deposit.

Man Builds A Bird Feeder That Trained Magpies To Exchange Trash For Food

Once the machine was rigged to respond appropriately, it was time to train the magpies. Forsberg explained in a post on Hackster that a good way to approach this is to feed the birds regularly to get them accustomed to coming to the “site” of the BirdBox. In the comments of the post he shared, “i arranged a ‘scene’ where the bird ‘accidentally’ pushed down bottle-caps into a larger funnel, while they where investigating the BirdBox trying to understand why it randomly distributed food…as the botte-caps fell down the funnel, the metal-detector tracked them and started the machine.” The magpies were smart enough to recognize that when a bottle cap fell into the funnel, a peanut came out. So they started doing it intentionally.

He plans to continue working on the BirdBox and trying to expand to other pieces of trash beyond bottle caps. You can follow his YouTube channel for updates on the BirdBox. Hopefully this system can eventually be implemented all over and magpies can clean up their neighborhood litter!

Check out the video below:

Want to keep up to date with the latest with Dean?

Sign up to get notifications straight to your inbox