The fate of the whole colony depends on a Raspberry Pi

Flies crawl around inside a transparent sphere, spied on by a camera, as a disembodied voice reads out image recognition data that determines whether or not they will be fed. This is the unsettling theme of flyAI, a Pi-powered art installation by David Bowen, who was inspired to create it after reading philosopher Nick Bostrom’s Superintelligence: Paths, Dangers, Strategies. The book explores the prospective effects of future super-intelligent AI on the human race and while there are some utopian possibilities, David says there are also dangers: “The AI could end up repurposing our atoms for food!”

The full article can be found in The MagPi 56 and was written by Phil King.

David tells us why he uses houseflies in some of his work: “They’re often a stand-in for the absurd or, thinking about collective behaviour, the will of the collective,” although their actions aren’t quite as random as you might expect: “They do like to work their way to the tops of containers; they’re attracted to light.

“Also, they don’t elicit as much empathy from viewers as another living creature,” adds David. That’s probably just as well given the nature of flyAI, in which the flies’ survival depends on the accuracy of image recognition. A regular USB webcam positioned at the top of the custom-built fly chamber is connected to a Raspberry Pi 3 which employs OpenCV to determine when a fly is in view and take a still. The photo is then classified by the Google TensorFlow image recognition algorithm which ranks the top five possibilities in order, along with their percentages. The results are revealed gradually on an LCD screen, as if being typed, and also read out aloud using the Festival text-to-speech system.

 The capture is analysed and classified by Google TensorFlow, which lists the top five possibilities

If ‘fly’ is ranked number one by the algorithm – which happens around 60% of the time according to David – the flies are given some food. “So their fate is determined by how accurate this AI is.” The feeding process is also controlled by the Pi, which triggers a relay to start a pump to supply sugar water from a bucket, up through tubes into the middle of the chamber.

Having run the experiment for six weeks in his workshop, David reveals that the survival rate is good: “They live for about 30-40 days, which I’m told is longer than they live in the wild… they were getting kind of geriatric!” This is despite them interfering with the image recognition in a certain way: “The flies poop all over the inside of the sphere, including where the camera is.” While David obtains his flies from an online source, he thinks they could possibly reproduce within the chamber if given the right conditions to lay their eggs.

Looking to add further elements to the project, David is exploring the possibility of using the fly corpses to provide material for a microbial fuel cell that he’s working on, which in turn will power the Raspberry Pi. He would also like to implement machine learning so that the image recognition gets smarter, “so the two [Pi and flies] could be more interdependent.”

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.