An expert in robotics and artificial intelligence has trained wild magpies to trade-in discarded bottles caps in exchange for food.

Hans Forsberg constructed a DIY ‘birdbox’ consisting of a dispenser that releases food pellets and another compartment fitted with sensors to detect when a cap is dropped into a hole.

A YouTube video shows a bird, with a bottle cap in its mouth, land on a table and make its way towards an opening that leads to a receptacle.

The magpie drops the cap through a hole, looks up at the tube eagerly waiting for its reward and grabs the treat when it lands at the base of the system.

Scroll down for videos 

An expert in robotics and artificial intelligence has trained wild magpies to trade-in discarded bottles caps in exchange for food

An expert in robotics and artificial intelligence has trained wild magpies to trade-in discarded bottles caps in exchange for food

An expert in robotics and artificial intelligence has trained wild magpies to trade-in discarded bottles caps in exchange for food

Forseberg was inspired after seeing the magpies fiddling with locks on lanterns in his backyard and began by training the birds to use these skills to collect garbage in the area.

The magpie is one of the most intelligent birds, with a brain-to-body mass ratio that is only unmatched by that of humans, according to Britannica

With that being said, Forseberg hoped he could train these feathered creatures to help clean up the environment – one bottle cap at a time. 

He began by tempting the birds with the feeder setup on a timer that released food every few minutes in a bid to gain their interest and trust.

Hans Forsberg constructed a DIY ‘birdbox' consisting of a dispenser that releases food pellets and another compartment fitted with sensors to detect when a cap is dropped into a hole. A YouTube video shows a bird, with a bottle cap in its mouth, land on a table and make its way towards an opening that leads to a receptacle

Hans Forsberg constructed a DIY ‘birdbox' consisting of a dispenser that releases food pellets and another compartment fitted with sensors to detect when a cap is dropped into a hole. A YouTube video shows a bird, with a bottle cap in its mouth, land on a table and make its way towards an opening that leads to a receptacle

Hans Forsberg constructed a DIY ‘birdbox’ consisting of a dispenser that releases food pellets and another compartment fitted with sensors to detect when a cap is dropped into a hole. A YouTube video shows a bird, with a bottle cap in its mouth, land on a table and make its way towards an opening that leads to a receptacle

The magpie drops the cap through a hole, looks up at the tube eagerly waiting for its reward and grabs the treat when it lands at the base of the system

The magpie drops the cap through a hole, looks up at the tube eagerly waiting for its reward and grabs the treat when it lands at the base of the system

The magpie drops the cap through a hole, looks up at the tube eagerly waiting for its reward and grabs the treat when it lands at the base of the system

‘I knew I had a team of two magpies in my garden that I could continue experimenting with, Forsberg says in a video.

The next step was training the birds to press a red button, which opened a door on the box that allowed access to food.

And then Forseberg placed a dozen bottle caps on the table around a receptacle.

The birds realized that when they pushed a cap down the hole, a motor began dispensing food. 

‘After a week or two, they got the idea that the bottle caps are interesting and they should be forced down into the hole,’ explains Forseberg.

Eventually the birds began picking up the caps with their beak and inserting them into the hole to retrieve food from the feeder.

The main box, attached to the fence, consists of a Raspberry Pi system with a camera, along with electronics and detectors on the table below that process the bottle caps and triggers the release of food. Pictured is Hans Forseberg, who created the high-tech bird feeder

The main box, attached to the fence, consists of a Raspberry Pi system with a camera, along with electronics and detectors on the table below that process the bottle caps and triggers the release of food. Pictured is Hans Forseberg, who created the high-tech bird feeder

The main box, attached to the fence, consists of a Raspberry Pi system with a camera, along with electronics and detectors on the table below that process the bottle caps and triggers the release of food. Pictured is Hans Forseberg, who created the high-tech bird feeder

Once the bird places the bottle cap through a hole, it knows food will be released into a side compartment. Hans Forseberg hopes the birds will soon move on to other bigger and better things than just bottle caps, such as collecting fallen fruit and cigarette butts

Once the bird places the bottle cap through a hole, it knows food will be released into a side compartment. Hans Forseberg hopes the birds will soon move on to other bigger and better things than just bottle caps, such as collecting fallen fruit and cigarette butts

Once the bird places the bottle cap through a hole, it knows food will be released into a side compartment. Hans Forseberg hopes the birds will soon move on to other bigger and better things than just bottle caps, such as collecting fallen fruit and cigarette butts

After the birds successfully completed these training steps, Forseberg believed it was time to move onto a more complex system. 

The main box, attached to the fence, consists of a Raspberry Pi system with a camera, along with electronics and detectors on the table below that process the bottle caps and triggers the release of food.

‘I have worked with this project to and from for several years, but now in recent months the project has had an exciting development,’ Forseberg shared on his blog. 

‘Now the magpies work as garbage collectors for payment in the form of food.’

Forseberg hopes the birds will soon move on to other bigger and better things than just bottle caps, such as collecting fallen fruit, cigarette butts and other things in his backyard as well as the entire neighborhood.  

Other than collecting trash, magpies have been observed in making use of tools, grieving and playing games. 

Magpies have also passed a cognitive experiment called the ‘mirror test,’ which is used to determine if an animal has the ability to recognize its own reflection – a feat of intelligence only four other animal species have achieved. 

This post first appeared on Dailymail.co.uk

You May Also Like

Three underused iPhone settings that could save you money instantly

YOUR iPhone is full of clever settings and some can even help…

Fossils of 160-million-year-old water bugs are earliest example of insects protecting offspring

Fossils of an ancient water bug that lived 160 million years ago…

Call of Duty teases fans with shocking reveal – but there’s more on the way

CALL of Duty developer Activision Blizzard has dropped a bombshell about the…

Sony PlayStation 5 Details: SSD and Backward Compatibility

Last month, Microsoft cast the first bet on the future of console…