A pair of researchers recently developed a method for teaching AI to play first person shooters without cheating. Instead of giving a ‘computer’ opponent unfair access to game code or supernatural aiming abilities, the AI learns to aim and shoot the same way a human does: by practicing.
The duo, scientists at the National University of Ireland Galway’s computer science department, set out to develop a way for an AI bot in a video game to adapt to a human’s skill level. Traditionally the “AI” in a video game isn’t artificial intelligence at all, but merely scripted programming that tells a bot how to act. And most of the time, it cheats.
Do you want to be a cryptocurrency millionaire?
Don't get your hopes up.
According to one of the team’s white papers:
Consistently perfect accuracy and “locking on” to opponents in their visual field from any distance are indicative capabilities of bots that are not found in human players. Traditionally, the bot is handicapped in some way with either a timed reaction delay or a random perturbation to its aim, which doesn’t adapt or improve its technique over time.
Humans tend to adapt and learn on the fly, over time. Designing a game to provide a challenge to humans of all skill levels, that also evolves as players become both better gamers in general, and more proficient within the parameters of a specific game, is a challenge that requires real artificial intelligence to solve.
To train the AI, the researchers pitted it against humans, bots, and other AI in order to develop the Skilled Experience Catalog (SEC). SEC not only evaluates the AI’s overall skill, but provides level benchmarks which the AI can select from on the fly – it can choose it’s own level of skill relative to a player’s.
This is accomplished by making the AI play thousands of 30 minute one-on-one matches in the Unreal Tournament 2004 environment. The researchers’ focus, so far, has been teaching an AI to aim and shoot using a trial-and-error method.
At the beginning of training the AI performs horribly, effectively providing little to know challenge for human or bot opponents, but as the training continues over hundreds of matches it becomes more and more proficient with the aiming and shooting mechanisms until it can almost match the skill of the most difficult bots and expert humans.
It’s not perfect, and there’s still plenty of game behaviors to address before this technology starts showing up in modern shooters. But, as long as the AI doesn’t get any bright ideas about real-world target practice, this could eventually replace scripted bots in games with clever enemies.