Ants have a complicated social structure, so much so that it's almost impossible to track their interactions. Now, researchers have individually tagged every single worker ant within an entire colony and tracked them with a computer in order to learn more about how they network. The result is the largest-ever data set of ant interactions.

Over the course of 41 days, a team of biologists tagged and studied six different colonies of more than 100 carpenter ants each in the lab. In order to better observe them, the insects lived in flat, easily filmed and studied enclosures rather than in the complicated tunnels that they usually call home. In addition, these ants were constantly filmed with overhead cameras, which allowed the researchers to gather 2.4 billion readings with a total of 9.4 million documented interactions between ants.

The data wouldn't have been possible to gather without the use of the tags that the researchers put on the ants, though. The unique barcode-like symbols could be automatically recognized by a computer, which then recorded each individual's position about twice per second, according to Geekosystem.

So what exactly did the researchers find? It turns out that about 40 percent of the workers were nurses, according to Nature. These individuals almost always stayed with the queen and her brood, fetching and caring for young ants. Another 30 percent of the insects were foragers, which gathered most of the colony's food; they were found near the entrance of the nest. The rest of the workers were the janitors of the ant world; they cleaned the colony and were most likely to visit the rubbish heaps that the ants created.

Yet while these ants each had a job, they didn't necessarily stay in the one position their entire lives. It turned out that, like people, the insects moved between jobs as they got older. The researchers found that, in general, nurses were younger than cleaners, which were usually younger than foragers. What was more interesting was the fact that these ants usually kept among others of the same "profession" and seldom mixed with one another.

The findings could allow researchers to better understand the social hierarchy of ants and, in consequence, better understand how disease and parasites can spread through a colony. The research was published in the journal Science.

Want to see the ants in action? Check out the video of how they interact below, originally appearing here.