In Isaac Asimov’s 1951 novel Foundation, the mathematician Hari Seldon coins the term “psychohistory” to describe his use of mathematics and statistical analysis to accurately predict future trends.
It’s an idea fit for science fiction – but it’s also been a consistent source of inspiration for University of Hong Kong Professor Chen Yuqi, a member of the Faculty of Arts and the Centre for Quantitative History, who’s using artificial intelligence (AI) tools to unlock the past.
Professor Chen, who graduated with a BA and PhD from Peking University before joining HKU in 2025, is at the forefront of history’s AI revolution.
During her PhD, she collected and built a database of 20,000 bronzes with inscriptions, which she used to reconstruct social networks in early Chinese history. While on a yearlong exchange at Harvard University in the United States, she worked with an interdisciplinary team collecting and organising a database of Chinese biographies. In turn, that sparked an interest in the historic roots of different psychologies across cultures – think collectivist versus individualistic – and historical psychology more broadly.
Those experiences – plus a formative internship at Tencent – gave Professor Chen valuable experience in coding. It also set her on a different path from many of her colleagues, as she immersed herself in the field of digital humanities, just as the advent of new AI tools opened up exciting possibilities for the study of history.
Now, she’s exploring these possibilities at HKU: everything from the psychology of ancient Chinese scholars to reconstructing the rise and fall of clans from their own histories. And on top of it all, she’s found time to release an AI-native game that builds on ideas pioneered at Stanford to immerse players in the world of the late Northern Song dynasty (960–1127 CE).
“I saw people experimenting with how AI communicates with AI,” Professor Chen says. “And as a historian, I thought: What would happen if we used different AIs to roleplay different historical figures?”
From psychohistory to historical psychology
Let’s say you want to survey a group to learn its views on a given topic – academics on individualism and collectivism, for example, or parents and children on filial piety and family values. How would you go about it?
The simplest answer is just to design a questionnaire and ask them. But what if you wanted to do the same thing for a group of people who have all been dead for hundreds of years, if not longer?
That’s where AI comes in, Professor Chen says. Using AI models finetuned on historical texts, she can trace psychological and ideological trends across millennia of history.
What would happen if we used different AIs to roleplay different historical figures?
– Professor Chen
The key – and the primary challenge – is verification. The AI models learn how ancient writers think, then she tests their training by looking at verifiable historical events such as the controversial Wang Anshi reforms that divided the Northern Song court almost until its collapse.
Almost every contemporary writer staked out an opinion on Wang’s policies, meaning it offers a perfect litmus test for the AI’s understanding of their beliefs. If the model returns correct predictions, then Professor Chen can use it to study how other attitudes may have changed over time.
For instance, Professor Chen’s models offer insight into how conservative/reformist tendencies predict scholar attitudes toward historical events, and how their relative power waxed and waned over time. They also let her see how core values, such as filial piety, are shaped by political and economic upheaval.
“In the past we couldn’t get a psychological values variable, because it’s very hard to measure from historical texts,” Professor Chen explains. “We can’t ask dead people to come to the lab and fill out questionnaires.”
Now she doesn’t have to.

Game theory
More recently, Professor Chen has been putting her time into a very different kind of project: an interactive historical simulation that lets students experience the past for themselves.
That’s the premise of “Into the Painting,” which lets players choose from hundreds of characters featured in the Song Dynasty masterpiece “Along the River During the Qingming Festival,” then play out their lives in the waning days of the Northern Song.
That’s actually a marked departure from Professor Chen’s original idea: Allowing users to play as great historical figures, from Qin Shihuang to Napoleon.
The problem, as she explains it, was that the game worked by changing history – limiting its potential as a teaching tool.
So, she went back to the drawing board in late 2025, spending six months designing, coding, and testing “Into the Painting.” The game ducks its predecessor’s issues by instead putting players in the shoes of ordinary Chinese, allowing them to change their lots in life while still remaining subject to broader historical forces.
It was a monumental undertaking. To date, Professor Chen has tagged over 200 figures in the painting, giving each a name and unique backstory in line with their depiction. Then she used a cutting-edge multi-agent AI approach to realise real-time simulation and create unique branching storylines, allowing players to navigate their characters through the Northern Song’s turbulent final years. Succeed, and you can play again as another character. Fail, and your storyline ends.
“Too much of history is about elites,” she says. “99% of individuals are absent from history. They aren’t the main characters, but they are important.”




AI-Driven
Professor Chen says it was important that “Into the Painting” be not just AI-powered – referring to the use of AI tools in the creation process – but also AI-driven.
That means the storylines are truly branching, with nearly limitless options available to players depending on their choices. In this, “Into the Painting” is a genuine step forward from previous experiments like “Stanford Town,” which saw Stanford researchers populate a town full of generative AIs to study how they would interact.
Professor Chen experimented with similar ideas, creating a sandbox to simulate debates among various Chinese literati.
99% of individuals are absent from history. They aren’t the main characters, but they are important.
– Professor Chen
But she harboured dreams of something bigger; even she was frustrated with the model’s limitations. “One thing about agent-based modelling is that you can’t always interact with it,” Professor Chen explains. “You can only observe.”
Her desire to change this paradigm led her to develop FISH – a Framework for the Interactive Simulation of History. Combining her previous experience at Tencent and her research, she wanted to push the boundaries of AI-based modelling to allow players to interact with the models, not just observe them.
“I don’t want ‘Into the Painting’ to just be a single, narrow game,” she says. “I want to develop it into a framework, creating general principles that anyone can use to develop interactive simulations of historical periods.”
“The thing about AI-driven games is that they are truly unlimited,” she adds. “You can have hundreds of different endings. It’s all open.”































