Computer Scientist Trains Magpies To Exchange Bottle Caps For Food

by : Daniel Richardson on : 03 Nov 2020 13:40
Computer Scientist Trains Magpies To Exchange Bottle Caps For FoodHans Forsberg/YouTube

Despite people knowing how to dispose of their waste, it seems that litter is a continuous problem. However, one man has made a clever solution to bottle caps being discarded – by using magpies to collect them.

Hans Forsberg is an expert in AI and robotics, and decided to turn his attention to litter with a homemade solution. Forsberg decided to create a food-dispensing mechanism, designed to encourage magpies to clean up bottle caps in the surrounding area. The idea has quickly turned into a success and, on his YouTube channel, the inventor showcased a magpie exchanging bottle caps for food.


The magpie is an incredibly intelligent bird; it is one of four animals that can pass the ‘mirror test’ that measures whether animals can recognise themselves in a reflection. The intelligence of the bird was illustrated quickly, and Forsberg noted, ‘After a week or two, they got the idea that the bottle caps are interesting and they should be forced down into the hole’.

The system was developed with a Raspberry Pi system in the main box that also has detectors and a camera. The system detects when a bottle cap has been given and rewards the bird with food, such as peanuts.


This technology appears to combine the good thinking of people with the intelligence of birds, and Forsberg has high hopes for the future. The robotics expert wants to expand the technology to encourage magpies to collect different types of litter in a similar exchange system.

If this project continues to develop positively, then who knows, magpies may take full-time jobs as litter collectors.

If you have a story you want to tell, send it to UNILAD via [email protected]

Most Read StoriesMost Read


Woman Who Started To Drive Over Insulate Britain Protesters Speaks Out

Daniel Richardson

After graduating from university, Dan went on to work with a variety of tech startups and media outlets. Through working with the likes of Game Rant, The Hook and What Culture, Dan pursued his interests in technology. The skills he picked up along the way are now being utilised with UNILAD.

Topics: Animals, AI, Now, Robotics, Tech


Hans Forsberg/YouTube
  1. Hans Forsberg/YouTube

    Magpie_trades 3 bottle-caps for food. High definition