Kim Voll of Radial Games has a PhD in AI with a background in human perception specializing in games. Imagine someone who would be interested in Ultron to the extent that she's curious about whether he would be a fun opponent in Go. She designed Stanley, the AI that drives the single-player portion of the local multiplayer game Rocketsrocketsrockets.
"The brain is very good at calling unnatural behaviour as well as attributed intelligent behavior in the face of missing information," Voll told Polygon. This is what makes bad AI so apparent, and AI in general such a hard nut to crack.
Start simple, and go from there
"When we set out to create a complex AI we often shoot ourselves in the foot by over engineering, creating a commitment to fidelity that we simply cannot uphold. The more complex a solution, the more likely it is that it will fail due to an out-of-control number of behavior edge cases."
So she went in the opposite direction by studying the players themselves, and starting small. The first version of Stanley was a single line of code that allowed him to follow human players.
"This allowed me to see how other players reacted to Stanley and also to really get a sense of what was unnatural about his behavior and improve incrementally from there," she explained. "Most importantly, it allowed me to see what behavior just seemed natural without any intervention from me. Case in point, even with Stanley v1.0, people were finding his behavior very convincing, at least for shorter stretches. My goal became how can I stretch believability."
The concepts used to create Stanley would work in any genre
She always kept the game and the AI in a playable state in order to bring out small changes and test them extensively. It was a slow addition of behaviors and ideas, built on top of the very simple "follow the player" idea, that created the illusion of complexity. The important thing was that the AI look and act like a player.
"We started with a flying demo before anything else, so it was easy to just watch people fly and really figure out what was natural. In a game such as ours it's normal to crash into obstacles, there are really certain believable mistakes. As well, the natural, swirling dance that arises out of game play gave me a space in which I could hide some of Stanley's less natural, more scripted behaviors," she explained.
"In a tight spot? Do a loop and it will likely distract the player and it will look natural. Not to mention that with such an intense game players are focused pretty closely on the action. If Stanley is in the periphery it's less important that he always be perfect."
While Rocketsrocketsrockets is a rather abstract game, the concepts used to create Stanley would work in any genre.
"The principle is still the same: study people playing when possible, or at least think long and hard about what natural play will look like; starting with a mental model of the player helps, then start with the simplest AI you can, see how believable the result, and very slowly add complexity to address only the most egregious issues," Voll explained. "I find it very helpful to ask myself every time I see something I don't like why that wasn't believable, i.e. what would a human have done?"
The results speak for themselves. Playing against the AI feels both natural and enjoyable, and adds significant value to a game that would otherwise just be a local multiplayer game.
"Stanley and Zenly [the version of the AI for the Zen game mode] aren't perfect, but I tried to help them make intelligent mistakes, that is to say I worked to not overcomplicate them and instead have their mistakes seem part of natural human-like behavior," Voll said.
"Of course I could think of a million things to fix, but overall I'm happy and people seem to really enjoy playing the AI. When people, myself included, can watch a match between a human and Stanley and not tell who's who, that's a win to me."
Rocketsrocketsrockets is available now on PC, Mac and Linux.