Fire ants build rafts, composed of themselves, to escape floods. As it turns out, they can also build towers. And for David Hu, an engineering professor at Georgia Tech, that turned out to be trouble.

“We had these ants in the lab, studying the rafts for several years,” he said. They were kept “behind locked doors” and lived in bins coated with something slippery like talc, he explained, so the ants could not climb out.

But they did. On long weekends, they would remain in their bins on Saturday and Sunday, but by Monday they would be out the door. On Tuesday, a neighboring professor would call, unhappily describing the big colony under his desk.

The ants were using their own bodies to build towers against the sides of their bins. Like raft-building, tower-building was a technique they use to escape floods in nature. In academia, the ants used it to escape the lab.

Dr. Hu, Sulisay Phonekeo and others set to work observing just how the ants were producing the structures, which, in overall shape, resemble the Eiffel Tower.

The ants had no architectural plan; they operated on a few rules. Like: Wander aimlessly — upward. And: If you find a nonmoving ant, attach yourself to that ant and become a building block.

When the ants did fall, they simply slid through the growing tower and climbed back up again.

The result was a structure built on wide rings at the bottom and narrow rings at the top, spreading out the weight so that any individual ant had to support the weight of three other ants at most.

The structure was not fixed, like Gustave Eiffel’s creation. It was constantly in flux, with ants climbing, falling and building all the time.

The rules that govern their tower-building behavior could be useful in developing strategies for tiny, self-assembling robots to create structures, Dr. Hu said.

And he and his colleagues, who published their findings this month in Royal Society Open Science, have new rules for ant containment: two bins, one inside the other. That should work, he said, as long as there are no six-day weekends.