Sometimes, at the start of a lecture, Michael Dickinson will set a wineglass of vinegar or whisky down on the edge of his lectern. Dickinson, a professor of bioengineering at Caltech, is one of the world's experts on the flight mechanics of fruit flies. He has spent years fitting them with tiny harnesses, rotating them in a virtual-reality chamber, filming their wings with ultrahigh-speed cameras to catch them as they change direction in one fifth the duration of an eye blink. He has modeled their aerodynamics with an oversize robot fly whose wings flap mechanically in a fluid-filled tank. As he has begun to understand how they fly, his interest has turned to the related question of how they know where to go. How, with eyes so simple that they render the world in a matrix of just 25 by 25 pixels, can they find a wineglass in a classroom and land unerringly on its edge? To demonstrate the point, he holds up the glass at the end of his lecture, and there they are.

Entomologists have long been fascinated by the ability of insects to track odors to their sources from as far as one kilometer away. Dickinson sees a potential application. Consider the problem of finding a lost hiker in the woods. Who will reach him first--the park police or the mosquitoes? But now suppose we could deploy a fleet of drone aircraft equipped, like mosquitoes, with sensitive detectors for carbon dioxide. Could we build such devices, and make them cheap and robust enough to cover a large territory? In part, this is a software problem: how to conduct a search in the real world of three dimensions, with its shifting wind currents and unpredictable obstacles. Insects solve it with a brain--in the case of fruit flies--the size of a poppy seed, containing perhaps 300,000 neurons. The average human has 100 billion.

To investigate how they do it, Dickinson has built a miniature fly world, a cylindrical cage about a meter across and high, with varying obstacles and background patterns projected on the walls, and electronic cameras recording the fly's movement at speeds up to 6,000 frames per second. The fly's task is to find an odor source on the floor of the apparatus. "The animal wants to track the plume to its source. So the first thing it has to do is orient upwind. But the plume is snaking around, the fly may have to avoid a visual obstacle, so there's a good chance it will lose it. What does it do then?" Dickinson is in effect reverse-engineering a living creature, taking it apart to see how it was built and how it functions, with the goal of someday replicating at least part of its behavior. We are far from being able to build machines that can walk upside down or hover like an insect, at least on those size scales, he says. But it would be nice to be able to think like them.