BOARD GAMES have long fascinated artificial-intelligence (AI) researchers. They have clear rules, well-defined playing fields and objective winners and losers. This makes them perfect “sandpits” for training AI software. Sometimes, though, their rules contain glitches. Aficionados of Go will be familiar with ko fights—situations in which the basic rule set would permit a game to carry on for ever, and for which an exception had to be created. Avoiding similar problems in newly invented games is something AI can help with.
That, at least, is the experience of Alan Wallat, a board-game designer from London. His latest offering is Sirius Smugglers, in which interstellar merchants try to make an illicit profit. In the olden days, checking its rules would have involved lots of tests by human players, who would probably have wanted to be paid—in beer, perhaps, if not in cash.
Instead, he took his brainchild to Tabletop R&D, an AI startup, where a game-playing algorithm allowed him to play thousands of times in the blink of an eye. He was then able to scan the results for irregularities, statistical biases and any features that were under- or over-used.
It was here he discovered a problem. A quirk in the rules meant the decision to end the game could rest with the losing players. Whoever was ahead, and therefore had the greatest incentive to bring matters to a close, was sometimes unable, alone, to trigger the condition which would finish the game. Like Go without the ko-fight exception, Sirius Smugglers could thus go on indefinitely.
The minds behind Tabletop, Diego Perez-Liebana and Raluca Gaina, are computer scientists at Queen Mary, a college of the University of London, who wanted to build a general games-playing AI platform on the cheap. The approach which built the AI models that could play Go well enough to beat world champions involved a system playing itself, over and over again, and learning from its victories and defeats until it reached superhuman potential.
But that requires a lot of computing time. Instead, they chose to use a less resource-intensive approach called a Monte Carlo tree search, to look forward to possible future positions and choose appropriate play from among them. It was intended as an academic exercise, says Dr Perez-Liebana, but in doing it they realised they had accidentally developed a tool that had value in its own right as an aid for game designers seeking to perfect their creations.
Thinking caps on
For this to happen, the AI must be taught to play like a human. Unless told otherwise, AIs are liable to chase victory single-mindedly but without strategic vision, like a chess player who refuses to sacrifice pieces for a stronger long-term position. This training can be subtle. In games where players are assigned information hidden from their opponents (for example, in card games like bridge or poker, where others cannot see a player’s hand), designers must decide whether to give the AI the ability to memorise play so far and to count the pack perfectly, or else to act in a sloppier—and more humanlike—manner.
Giving the AI more time to think, and so plan for a wider range of outcomes, is equivalent to adjusting the skill with which it plays. To simulate beginners, it can be set to act as if on instinct, after less than a tenth of a second. To mimic competence it is allowed to think for as long as five seconds per move, and is therefore able to plan many moves ahead.
When they’re good, they’re good, says Dr Gaina of the resulting models. Testing the approach with a copy of Terraforming Mars, a famously weighty strategy title, she admits she found the system was more than capable of defeating her.
A game-run provides enough detailed data to let designers tweak the parameters they care about, from ensuring proceedings are fair to avoiding long periods of dull gameplay. At least, that is the plan. Mr Wallat is Tabletop’s first customer. More may soon be tempted. Fun is hard to measure, says Dr Gaina, but things that make a game bad, never-endingness among them, are easier to spot. ■
Curious about the world? To enjoy our mind-expanding science coverage, sign up to Simply Science, our weekly subscriber-only newsletter.