How we test games with bots: fair rivals and puzzles you can finish
2026-11-29 · Sagar Studio
Two promises are easy to make and hard to keep. A computer opponent set to hard should be harder than one set to medium, and a puzzle should always be possible to finish. You cannot confirm either by playing a handful of rounds yourself, so we let programs play thousands. Here is how that works in a few of our games.
Games that can run without a screen
The trick is to keep the rules and the physics separate from the drawing. Table Tennis Darbar has a simulation file that knows nothing about graphics: ball, table, net, paddles and scoring, all as plain code. The same file runs in the game and in the test, which is why a test can play a whole match in a fraction of a second.
The simulation uses its own seeded random number generator instead of the browser's, so a match is repeatable. One of our checks plays a match twice with the same seed and demands identical results, then plays it with another seed and demands a different one. When a test fails, that repeatability lets us replay exactly the match that went wrong.
Measuring easy, medium and hard
A computer opponent in Table Tennis Darbar is a character with a playing style plus a skill tier. There are four tiers: easy, medium, hard and pro. A tier is a set of numbers: how long the bot takes to react, how fast it moves, how much it errs, how far it reaches, how hard it hits, how well it aims and how aggressive it is. Nothing is hidden or rigged. A harder bot is simply better at the same things a person does.
To check the ladder, the test plays 200 matches for each pairing with the same character on both sides, so only the tier differs, and it swaps who serves first and which side each bot plays, so neither gets an unfair start. The test then requires hard to beat medium in more than 58 percent of matches, medium to beat easy in more than 58 percent, and hard to beat easy in more than 80 percent. A smaller run requires pro to beat hard more often than not.
Bots playing bots does not tell you how a person will fare, so there is a second check with simple models of human players: a beginner, a good player and a skilled player, each with their own reaction time, speed and error rate. The test sets some limits that describe how we want the game to feel. A beginner should be able to beat easy, but not every time, and should lose to hard. A good player should beat medium most of the time, and hard should be an even contest for them. A skilled player should beat hard more often than not, but still lose sometimes. The point is that hard is meant to be beatable, and easy is not a gift.
Proving a puzzle can be finished
Haveli Escape is a room-escape game with 20 levels, and a level that cannot be finished is the worst bug a puzzle game can have. So the game ships with a solver. It works the way a patient person would: from where you stand, find the nearest thing that makes progress, whether that is tapping an object, using an item on a hotspot or combining two items, walk there with a breadth-first search, do it, and repeat. Any step that turns out not to be needed for the win, a red herring picked up on the way, is pruned afterwards, which leaves the essential steps.
One rule keeps the solver honest. It may only solve a puzzle after it has read the clues for it, because a real player has no other way to know the answer. If a clue were unreachable, the solver would get stuck and the check would fail.
The checks then ask several questions. Is every level solvable from the start? Is there a softlock: after random play of every kind of action, wrong guesses included, can the solver still finish from wherever the random player ended up? Does every hint point at a real next step, and does following only the hints win every level? And for each of the 12 kinds of puzzle, over 120 different seeds, does the correct answer work and does a wrong one get rejected?
A rival that replays the solver
The computer detective you can race in Haveli Escape is not guessing. It replays the solver's winning plan as a timeline, with each step's duration based on its cost, and scales the total time by a factor for its level. The check requires hard to be faster than medium, and medium faster than easy, on every level, and requires even the hard detective to finish inside one and a half times the level's par time.
Farm bots and challenge farms
Khet Kahani, our farm game, uses the same idea. Its farm bots play identical farms at easy, medium and hard skill. The test requires the average score of hard to beat medium by at least 10 percent, and medium to beat easy by the same margin, and also that hard wins at least 70 percent of the head-to-head farms against medium. The 20 challenge farms are checked by letting a perfect bot and a hard bot attempt each one: the perfect bot must earn three stars, and the hard bot must at least solve it. That tells us the star thresholds are possible and in the right order.
What bots cannot tell us
A bot can tell us a level is finishable and a difficulty ladder is in order. It cannot tell us whether a game is fun, whether a clue is clear to a person, or whether a button is easy to hit with a thumb. For that we still play every mode ourselves, on a phone-sized screen and a desktop one, before a game goes live. The bots do the repetitive part so that our own time goes on the part only a person can judge.