July 20, 2022
Also, the ‘best’ and ‘worst’ AI in games
Atari, one of the pioneering companies in video gaming, turned 50 years old this year. To commemorate the event, Lego is releasing in August an Atari 2600 console made entirely from its bricks .
While Atari ultimately fell to the wayside after losing in the console market, beloved units such as the Atari 2600 and 2700 that hosted iconic games such as Pong, Pac-Man and Space Invaders mean its legacy endures.
Given its place in history as one of the first home console makers, Atari brought rules-based programming – and precursor to true AI − to the home through computer-controlled characters in video games. These non-playable characters (NPCs) could be that shopkeeper who gives players a clue to finding treasure, or the medieval maiden who serves drinks at an inn to a group of rowdy swashbucklers.
Algorithms found in those old games, however, do not involve machine learning – with many in the wider AI sphere often turning their noses up at video game AI as a mere marketing description.
Today, AI is an integral part of video gaming, with algorithms able to improve things such as the behavior of NPCs and player experiences. As Atari has evolved in its 50-year existence, so too has AI in gaming, with developers able to create impressive experiences.
AI in gaming: A short history
Gaming and AI have worked in tandem long before Atari was born.
In the early 50s, engineers from the W. L. Maxon Corporation developed a computerized version of the game Nim. The 50-pound machine regularly defeated human opponents and was among the first examples of algorithms in gaming.
In the early days of gaming, titles like Pong and Gotcha were built on discrete logic rather than algorithmic models. The 70s would see more single-player-focused games begin to appear, with arcade and text-based games featuring enemy characters whose movement would be dictated by stored patterns.
As time went on and microprocessors began to become a thing, the increased computation power would improve things such as movement patterns.
Fast-forward to today, and the gaming market stands as an important market in the media space.
In 2020, the games industry earned more revenue than home video, streaming, cinema, music, books, and all other forms of entertainment combined – hitting the $152.1 billion mark, according to Newzoo.
AI in gaming is still used to determine NPC movements and behaviors but has become incredibly more sophisticated than it was in the early days of gaming. Algorithms are now used to determine who to shoot, how to navigate and when to perform certain actions.
Alien: A perfectly terrifying AI organism
Image: A tense alien encounter with one of gaming’s greatest AI achievements |Sega
Arguably the greatest utilization of AI in gaming can be seen in the 2014 survival horror game, Alien: Isolation. Derived from the movie series starring Sigourney Weaver, the game is set 15 years after the original 1979 Alien film and follows her character’s daughter who investigates the disappearance of her mother at Sebastopol space station.
Developer Creative Assembly managed to create a system that enables the Xenomorph monster from the Aliens films – the one with the elongated head and extended tongue − intelligently stalk players as they make their way through Sebastopol.
The alien was programmed with a complex set of behavioral designs that kick in each time it encounters the player — effectively showing that it is learning from previous encounters and adjusting how it hunts them.
"You're going to die a lot, which means restarting (your character) a lot, and if the alien was scripted, you'd see the same behavior. That makes the alien become predictable, and a lot less scary."
- Gary Napper, gameplay designer
The lack of predictability increases the game’s fear factor.
"We needed something that would be different every time you played it,” said gameplay designer Gary Napper during a 2014 MCV/Develop event. “You're going to die a lot, which means restarting (your character) a lot, and if the alien was scripted, you'd see the same behavior. That makes the alien become predictable, and a lot less scary.”
The alien itself is designed to build tension while hunting the player – and arguably balances the scariness without going overboard as making the game too terrifying would make it unplayable for some.
There are two systems at work throughout Alien: Isolation - the ‘macro’ or AI controlling the director character who manages the player, and the ‘micro’ or alien-AI that controls the monster. The director monitors the player, knowing at all times his or her location while the alien-AI is driven by both sensors and behaviors that let it hunt the player.
The director also sporadically guides the alien in the direction of the player, giving the enemy hints. The system works so that the director will never tell the alien exactly where you are – meaning the NPC is forced to hunt you. While it is hunting you, it will follow a behavior tree system consisting of over 100 inputs, with some more complex behaviors unlocked as the story progresses.
The alien is designed to sweep around the environment, devising a path to search likely hiding spots organically, meaning no player can work out an exact path it will take.
And given you can’t kill the alien – but it can kill you in one hit − it’s a frightening yet thrilling game that needs to be experienced.
And the not so perfect
But just because algorithms have been in video games for half a century does not mean they have worked out all the flaws.
Ironically, the worst of AI in gaming, as well as the best, arguably comes from the Aliens franchise.
Aliens: Colonial Marines developed by Gearbox was showcased at the 2011 Electronic Entertainment Expo in Los Angeles and blew away fans with impressive graphics.
Upon release in 2013, the game's enemies were programmed so badly, that it made the game unplayable. The intelligent Xenomorph was shown in Isolation to be smart and learn from its surroundings, and in Colonial Marines, the enemies would just charge at the player – and if they were bugged out so badly they wouldn't move.
In 2017, a modder (someone who alters the back end of games to perform functions not originally intended by the designer) managed to improve the game's problematic AI. The reason for the poor performance? An error in the game's code. All it needed was a simple fix but it was already too late by that point, as players had long moved on.
An important takeaway is never to hype up a video game’s AI in marketing. Crysis II, The Walking Dead: Survival Instinct and CyberPunk 2077 all did this – only to have some of the most poorly received AI systems ever programmed into a game. AI can make or break a game – developers that neglect it or over-promise usually flamed out.
Gaming has allowed AI to evolve beyond merely improving in-game enemies. AI has reached a point where it can potentially play games better than humans.
And the implications of such research has caught the military's eyes – both DARPA, the U.S. defense research agency, and the U.S. Air Force sought to use AI-based systems trained using video games for warfighting systems.
And OpenAI recently created a model capable of playing Minecraft having been trained on unlabeled video data available online.
The semi-supervised imitation learning method, Video PreTraining, or VPT, could provide a path towards general computer-using agents given the model’s focus on general aspects such as mouse movements, OpenAI’s research team suggested.
Given AI’s potential in and around gaming, it will be exciting to see what other milestones will be achieved within the next 50 years of Atari’s lifespan.