Seeley built 252 wooden boxes of different shapes and sizes and scattered them in forests and fields to test how particular bees were about these qualities. Swarms only moved into boxes that had the same features that Seeley had found in their tree cavities. “It’s really important to get them all right,” Seeley said.

The architectural tastes of honeybees are not mere whims. If honeybees live in an undersized cavity, they won’t be able to store enough honey to survive the winter. If the opening is too wide, the bees won’t be able to fight off invaders.

He took his research to Appledore Island because no native honeybees live here, and it has no big trees where the insects could make their homes. Seeley and his colleagues would bring their own honeybees and nest boxes. “This is our laboratory,” Seeley said. “This is where we gain control.”

In one experiment, Seeley set up five boxes of different sizes. Four of the boxes were mediocre, by honeybee standards, while one was a dream home. In 80 percent of the trials, the swarms chose the dream home.

Through years of study, Seeley and his colleagues have uncovered a few principles honeybees use to make these smart decisions. The first is enthusiasm. A scout coming back from an ideal cavity will dance with passion, making 200 circuits or more and waggling violently all the way. But if she inspects a mediocre cavity, she will dance fewer circuits.

Enthusiasm translates into attention. An enthusiastic scout will inspire more bees to go check out her site. And when the second-wave scouts return, they persuade more scouts to investigate the better site.

The second principle is flexibility. Once a scout finds a site, she travels back and forth from site to hive. Each time she returns, she dances to win over other scouts. But the number of dance repetitions declines, until she stops dancing altogether. Seeley and his colleagues found that honeybees that visit good sites keep dancing for more trips than honeybees from mediocre ones.

This decaying dance allows a swarm to avoid getting stuck in a bad decision. Even when a mediocre site has attracted a lot of scouts, a single scout returning from a better one can cause the hive to change its collective mind.

“It’s beautiful when you see how well it works,” Seeley said. “Things don’t bog down when individuals get too stubborn. In fact, they’re all pretty modest. They say, ‘Well, I found something, and I think it’s interesting. I don’t know if it’s the best, but I’ll report what I found and let the best site win.’”

During the time I visited Seeley, he was in the midst of discovering a new principle. Scouts, he found, purposefully ram one another head-on while deciding on a new nest location. They head-butt scouts coming from other locations—pink scouts bumping into blue scouts and vice versa—causing the rammed bee to stop dancing. As more scouts dance for a popular site, they also, by head-butting, drive down the number of dancers for other sites.