Pac-Man turns 40 today, and even though the days of quarter-munching arcade machines in hazy bars are long behind us, the legendary game’s still helping to push the industry forward. On Friday, Nvidia announced that its researchers have trained an AI to create working Pac-Man games without teaching it about the game’s rules or giving it access to an underlying game engine. Nvidia’s “GameGAN” simply watched 50,000 Pac-Man games to learn the ropes.
That’s an impressive feat in its own right, but Nvidia hopes the “generative adversarial network” (GAN) technology underpinning the project can be used in the future to help developers create games faster and train autonomous robots.
“This is the first research to emulate a game engine using GAN-based neural networks,” Nvidia researcher Seung-Wook Kim said in a press release. “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.”
GameGAN works by using two competing neural networks, running on four of Nvidia’s GV100 “Volta” GPUs. A discriminator network plays the actual game, while a generator network creates new frames of the game in real-time, responding to the discriminator’s actions. After 50,000 matches, Nvidia says GameGAN is now smart enough to create fully functional Pac-Man games on the fly, to the point that the company plans to release a playable version of its AI-generated Pac-Man matches later this year.
Nvidia hopes this is just the beginning. In a press briefing, Nvidia’s Rev Lebaredian and Sanja Fidler said that generative adversarial networks like GameGAN could eventually make it easier for developers to create games. The concept could be used to automatically create basic games like Pac-Man or a version of the Marbles RTX demo Nvidia showed off at GTC 2020, Lebaredian said. You could theoretically even train the AI to create some sort of original “mash-up” game using behaviors and models from a handful of different games.
But there seems to be even more promise in tools that work at a deeper level of the software. Without the need to teach GameGAN fundamental rules or even provide it with a game engine, Nvidia envisions the technology being used to prototype level designs and character models quickly in the future. “No matter the game, the GAN can learn its rules simply by ingesting screen recordings and agent keystrokes from past gameplay,” Nvidia’s release says. “Game developers could use such a tool to automatically design new level layouts for existing games, using screenplay from the original levels as training data.”
Lebaredian pointed to the living world of Grand Theft Auto V as an example, saying that GameGAN could be used to help develop hordes of roaming NPCs and determine how they interact with their environment. The technology could help developers try out new environments quickly in a later iteration as well, Nvidia’s announcement says.
“Since the model can disentangle the background from the moving characters, it’s possible to recast the game to take place in an outdoor hedge maze, or swap out Pac-Man for your favorite emoji. Developers could use this capability to experiment with new character ideas or game themes.”
GameGAN could also be used to help train autonomous robots. Before robots get plopped onto assembly lines, they’re trained on the rules of environment using a simulator. Creating those simulators can take a lot of time. Nvidia thinks GameGAN could eventually be used to train robots using videos of activities happening in the real world.
“We could eventually have an AI that can learn to mimic the rules of driving, the laws of physics, just by watching videos and seeing agents take actions in an environment,” Fidler said. “GameGAN is the first step toward that.”
Those are far-out hopes, though. Currently, GameGAN can output only about 50 frames per second at a 128-pixel resolution. It is a research project, and not optimized for high-resolution video output just yet. Nevertheless, it’s exciting stuff—and we’ll take any excuse to spend more time playing Pac-Man.
This story, “For Pac-Man’s 40th birthday, Nvidia uses AI to make new levels” was originally published by