You might not realize it, but birds are very intelligent creatures. Crows, for instance, can recognize human faces. Magpies, a relative of crows, are also known for their smarts as well as their affinity for picking up objects and finagling with things like locks. Artificial intelligence researcher Hans Forsberg noticed these clever creatures around his neighborhood and was able to train them to trade in pieces of litter for food. Using a combination of mechanical design, electronics, software, and a 3D printer, he produced a machine called BirdBox that senses when a bird drops a bottle cap into it and then dispenses peanuts in return.
To get to this point took years of work and testing. “I spent remarkably much time creating the actual food dispenser,” Forsberg explains. What he landed on was a vibrating feeder to which he added extensions and funnels. Once a magpie deposits the bottle cap into the hole, it triggers the reward to be delivered via a tube. This is made possible using the Raspberry Pi system that has a camera monitor and a detection system located underneath the table that can sense when something has been placed in the trash hole.
So, how did Forsberg train the magpies? It’s something that he had to figure out for himself. “It all ended up quite simple,” he says. “I arranged a ‘scene' where the bird ‘accidentally' pushed down bottle caps into a larger funnel, and while they were investigating the BirdBox trying to understand why it randomly distributed food. As the bottle caps fell down the funnel, the metal-detector tracked them and started the machine…then a few more steps (after that).”