Nvidia is best known for its graphics cards, but the company conducts some serious research into artificial intelligence, too. For its latest project, Nvidia researchers taught an AI system to recreate the game of Pac-Man simply by watching it being played.
To celebrate Pac-Man’s 40th anniversary, the hardware maker fed a computer farm a whopping 50,000 “episodes” of gameplay from the title but not to teach it to be a better player.
Instead, Nvidia taught its AI to recreate a playable version of Pac-Man within a matter of days. Impressively, it did so without being given a single line of the game’s source code. It seems that, after watching all that gameplay, the AI was able to figure out not just how the game looks, but how it’s supposed to function it determined what power-ups are, what movements are allowed in which areas, and how the antagonistic ghosts behave.
Obviously, the quality of the end result isn’t perfect, and we certainly don’t expect to see Nvidia’s AI called GameGAN recreate the likes of the Witcher 3 or Skyrim anytime soon, but it’s fascinating to see what this technology is capable of.
“This is the first research to emulate a game engine using GAN-based neural networks,” Nvidia researcher Seung-Wook Kim explains. “We wanted to see whether the AI could learn the rules of an environment just by looking at the screenplay of an agent moving through the game. And it did.”
Some elements of the process definitely need tweaking, though, and demonstrate the particular fragility of artificial intelligence when learning new tasks. Fidler told journalists that to recreate Pac-Man, GameGAN had to be trained on some 50,000 episodes. Getting that gameplay data from humans wasn’t feasible, so the team used an AI agent to generate the data. Unfortunately, the AI agent was so good at the game that it hardly ever died.
“That made it hard for the AI trying to recreate the game to learn the concept of dying,” says Fidler. Instead, in early versions of the AI-generated Pac-Man, GameGAN tweaked the game so that ghosts never actually reached the title character but trail directly behind it like baby ducks following a parent. “It’s a funny effect of the way we trained it,” says Fidler.