Most people think of history as a series of stories—tales of one army unexpectedly defeating another, or a politician making a memorable speech, or an upstart overthrowing a sitting monarch.

Peter Turchin of the University of Connecticut sees things rather differently. Formally trained as a ecologist, he sees history as a series of equations. Specifically, he wants to bring the types of mathematical models used in fields such as wildlife ecology to explain population trends in a different species: humans.

In a paper published with colleagues today in the Proceedings of the National Academy of Sciences, he presents a mathematical model (shown on the left of the video above) that correlates well with historical data (shown on the right) on the development and spread of large-scale, complex societies (represented as red territories on the green area studied). The simulation runs from 1500 B.C.E. to 1500 C.E.—so it encompasses the growth of societies like Mesopotamia, ancient Egypt and the like—and replicates historical trends with 65 percent accuracy.

This might not sound like a perfect accounting of human history, but that’s not really the goal. Turchin simply wants to apply mathematical analysis to the field of history so that researchers can determine which factors are most influential in affecting the spread of human states and populations, just as ecologists have done when analyzing wildlife population dynamics. Essentially, he wants to answer a simple question: Why did complex societies develop and spread in some areas but not others?

In this study, Turchin’s team found that conflict between societies and the development of military technology as a result of war were the most important elements that predicted which states would develop and expand over the map—with those factors taken away, the model deteriorated, describing actual history with only 16 percent accuracy.

Turchin began thinking about applying math to history in general about 15 years ago. “I always enjoyed history, but I realized then that it was the last major discipline which was not mathematized,” he explains. “But mathematical approaches—modeling, statistics, etc.—are an inherent part of any real science.”

In bringing these sorts of tools into the arena of world history and developing a mathematical model, his team was inspired by a theory called cultural multilevel selection, which predicts that competition between different groups is the main driver of the evolution of large-scale, complex societies. To build that into the model, they divided all of Africa and Eurasia into gridded squares which were each categorized by a few environmental variables (the type of habitat, elevation, and whether it had agriculture in 1500 B.C.E.). They then “seeded” military technology in squares adjacent to the grasslands of central Asia, because the domestication of horses—the dominant military technology of the age—likely arose there initially.

Over time, the model allowed for domesticated horses to spread between adjacent squares. It also simulated conflict between various entities, allowing squares to take over nearby squares, determining victory based on the area each entity controlled, and thus growing the sizes of empires. After plugging in these variables, they let the model simulate 3,000 years of human history, then compared its results to actual data, gleaned from a variety of historical atlases.

Although it’s not perfect, the accuracy of their model—predicting the development and spread of empires in nearly all the right places—surprised even the researchers. “To tell the truth, the success of this enterprise exceeded my wildest expectations,” Turchin says. “Who would have thought that a simple model could explain 65% of variance in a large historical database?”

So why would conflict between societies prove to be such a crucial variable in predicting where empires would form? “To evolve to a large size, societies need special institutions that are necessary for holding them together,” Turchin proposes. “But such institutions have large internal costs, and without constant competition from other societies, they collapse. Only constant competition ensures that ultrasocial norms and institutions will persist and spread.”

The model shows that agriculture is a necessary but not sufficient precondition for a complex society, he says—these states can’t form without farming, but the persistent presence of competition and warfare is necessary to forge farming societies into durable, large-scale empires. Conventional analyses of history could come to this same conclusion, but they wouldn’t be able to demonstrate it in the same mathematically-based way. Using this approach, on the other hand, Turchin’s group could remove the influence of warfare and see the model’s accuracy in describing real historical data plummet.

Of course, there are limitations to viewing history through math—humans are more complicated than numbers. “Differences in culture, environmental factors and thousands of other variables not included in the model all have effect,” Turchin says. “A simple general model should not be able to capture actual history in all its glorious complexity.”

Still, the model is a unique and valuable tool. Going forward, Turchin’s team wants to develop it further—adding more nuance (such as including the quality of agricultural productivity, rather than merely toggling if farming exists in a given area or not) to improve on that 65 percent accuracy. Additionally, they’d like to expand the model, applying it to more recent world history and also pre-Columbian North America, if they can find relevant historical data.

Based on his experiences so far, Turchin thinks they’ll be successful in developing a model that better reflects the the rise and fall of civilizations. “It turns out that there is a lot of quantitative data in history,” he says, “you just have to be creative in looking for it.”