Historical Adventures
A history game for classrooms. A teacher uploads the historical sources they're teaching from, and it turns them into a small world students can play through: people to talk to, evidence to find and decisions to make.
How it works
Each world has a map, characters who want different things, and objectives. Students explore, question the characters and make choices, and those choices change what happens next. At the end there's a debrief that separates what the sources actually say, with a reference for each point, from what the game made up to fill the gaps.
We built it as a team of four for CS3216 at NUS: Yi Hao Hon, Di Heng Hoo, Damian Liew Cho Xiang and me.
My part
I built the characters and the rules behind them. Each character is its own AI agent with a private brief, and it only knows what was said when it was in the room. Something called the resolver decides what your choices lead to. It rolls the dice on the server, so they can't be tampered with.
A lot of my time went into making the AI safe to use in a game. I checked everything it produced before the game used it, limited what actions a character could take, guarded against prompt injection, and wrote tests to make sure no character's private brief could leak. Close to the deadline I also fixed two problems that took the whole game down: world generation running past Vercel's time limit, and a clash between database migrations.