Consider the problem of job allocation. In the Arizona desert where Deborah Gordon studies red harvester ants (Pogonomyrmex barbatus), a colony calculates each morning how many workers to send out foraging for food. The number can change, depending on conditions. Have foragers recently discovered a bonanza of tasty seeds? More ants may be needed to haul the bounty home. Was the nest damaged by a storm last night? Additional maintenance workers may be held back to make repairs. An ant might be a nest worker one day, a trash collector the next. But how does a colony make such adjustments if no one's in charge? Gordon has a theory.

Ants communicate by touch and smell. When one ant bumps into another, it sniffs with its antennae to find out if the other belongs to the same nest and where it has been working. (Ants that work outside the nest smell different from those that stay inside.) Before they leave the nest each day, foragers normally wait for early morning patrollers to return. As patrollers enter the nest, they touch antennae briefly with foragers.

"When a forager has contact with a patroller, it's a stimulus for the forager to go out," Gordon says. "But the forager needs several contacts no more than ten seconds apart before it will go out."

To see how this works, Gordon and her collaborator Michael Greene of the University of Colorado at Denver captured patroller ants as they left a nest one morning. After waiting half an hour, they simulated the ants' return by dropping glass beads into the nest entrance at regular intervals—some coated with patroller scent, some with maintenance worker scent, some with no scent. Only the beads coated with patroller scent stimulated foragers to leave the nest. Their conclusion: Foragers use the rate of their encounters with patrollers to tell if it's safe to go out. (If you bump into patrollers at the right rate, it's time to go foraging. If not, better wait. It might be too windy, or there might be a hungry lizard waiting out there.) Once the ants start foraging and bringing back food, other ants join the effort, depending on the rate at which they encounter returning foragers.

"A forager won't come back until it finds something," Gordon says. "The less food there is, the longer it takes the forager to find it and get back. The more food there is, the faster it comes back. So nobody's deciding whether it's a good day to forage. The collective is, but no particular ant is."

That's how swarm intelligence works: simple creatures following simple rules, each one acting on local information. No ant sees the big picture. No ant tells any other ant what to do. Some ant species may go about this with more sophistication than others. (Temnothorax albipennis, for example, can rate the quality of a potential nest site using multiple criteria.) But the bottom line, says Iain Couzin, a biologist at Oxford and Princeton Universities, is that no leadership is required. "Even complex behavior may be coordinated by relatively simple interactions," he says.