Ants may have the largest brains of any insect, but that doesn’t mean a single ant on its own is all that smart. As individual ants leave their nest in search of food, they walk in what appear to be random paths, hoping to come across something to eat. The behavior of hundreds of scout ants circling their nests on a hunt for sustenance can be chaotic as it looks, like drunks stumbling about the house in search of their keys. The ants will search for food until they’re exhausted, then return to the nest to briefly eat and rest before heading back out again.

But as a new study in the Proceedings of the National Academy of Sciences makes clear, something amazing happens when an individual ant finds a food source. The ant will take a bit of the food back to the nest, leaving a trail of pheromones behind them to mark the path. A wave of ants will then attempt to follow the path back to the food source, but because pheromones evaporate quickly, their behavior will still look chaotic as they attempt to home in on the food.

Over time, though, the ants will organize their search, optimizing the best and shortest path between the food and the nest. As more ants follow the optimal path back and forth, they leave more and more pheromones, which in turn attracts more and more ants, creating a self-reinforcing efficiency effect. The chaotic, seemingly random foraging of individual ants is replaced with organized precision. Working as one, the ants create the sort of distribution networks a traffic engineer could only dream of.

“While the single ant is certainly not smart, the collective acts in a way that I’m tempted to call intelligent,” said study co-author Jurgen Kurths of the Potsdam Institute for Climate Impact Reseaerch, in a statement. “The ants collectively form a highly efficient complex network.”

That’s not all the study found. The researchers also discovered that individual ants differ in their ability to find food. Over time older ants gather more experience about the environment surrounding their nests, which makes it easier for them to forage effectively, even though their age means they tire faster than young ants. The young ants are more like interns—their lack of experience means they can’t contribute much to foraging, but they are effectively learning on the job. (No word on whether they get course credit.)

Even though individual ants can get smarter over time as they learn more about their surrounding environment, the real ant intelligence is in the collective. Just how advanced are their search capabilities? Good enough to rival our best technology, at least. Google’s search engine forages for information on the Web in much the same way an ant colony looks for food. Google’s webcrawlers scour the Internet, bringing data about individual pages back to Google’s servers, where that information is indexed, sharpening the company’s picture of the ever-evolving Internet as it is—just as ants learn more and more about their environment over time. Google’s search algorithms use hundreds of signals to find the most efficient and accurate answer to any search query—just as the ant colony quickly organizes itself to find the most efficient path to a food source once it has been discovered by scouts.

But Kurths believes that ants are actually much more efficient at organizing data than a collective of human beings using the Internet could ever be, as he told the Independent:

I’d go so far as to say that the learning strategy involved in that, is more accurate and complex than a Google search. These insects are, without doubt, more efficient than Google in processing information about their surroundings.

Which doesn’t mean you should ask the closest ant colony, rather than Google, when you want to find out what time the Super Bowl is on. But in a digitally connected world where the network is quickly becoming smarter and more efficient than any individual, ants are apparently ahead of the game.

Contact us at letters@time.com.