X
Innovation

Nvidia researchers use AI to recreate PAC-MAN, without a game engine

Using generative adversarial networks, Nvidia opens up a line of research that could have implications not just for game creation but for real-world settings like factory floors.
Written by Stephanie Condon, Senior Writer
embargoed-pac-man-nvidia-logos.jpg

Imagine going to an arcade and watching someone play PAC-MAN for the first time. Over time, you'd figure out the game's basic parameters -- how PAC-MAN moves through a maze, that he can't move through walls and what happens when PAC-MAN eats his Power Pellets. You'd learn how the actions of the game were controlled through various player keystrokes. Eventually, you could potentially write your own version of the game. 

That's effectively what Nvidia researchers have trained a unique AI model to do -- recreate a fully-functional version of the PAC-MAN game simply by observing hours of gameplay, without a game engine. 

Called GameGAN, the neural network model mimics a computer game engine by harnessing generative adversarial networks (GANs). GANs are effectively two AI systems that are pitted against each other -- one that tries to simulate original content, and one that spots its mistakes. By competing against each other, they jointly create content convincing enough to pass for the original. 
 
GameGAN was trained on 50,000 episodes of PAC-MAN, without having any concept of how the game mechanics work in the underlying code. Nvidia says this is the first research to emulate a game engine using GAN-based neural networks. 
 
"There have been many AIs created in recent years that can play games -- that are agents within the game --  but this is the first GAN that can actually reproduce the game itself," Rev Lebaredian, VP of simulation technology at Nvidia, said to reporters. 

The research has implications for the creation of games but also for real-world scenarios. You could imagine, for instance, this sort of GAN being used to develop simulators for training factory robots. 
 
"This is the beginning of a journey," Lebaredian said. "We're going to be applying this not just to 2D classic games like [PAC-MAN] but also to modern 3D style games, and even to things that aren't really games. We use game technology -- real-time rendering and physics -- for various uses these days, including robotic simulation."
 
GameGAN was trained over four days using four GV100 Volta GPUs. The 50,000 PAC-MAN episodes amounted to a few million frames, which were paired with data on the keystrokes of an AI agent playing the game. The trained GameGAN model would generate the static elements of the game -- such as a consistent maze shape, dots and Power Pellets -- as well as the moving elements, like the enemy ghosts and PAC-MAN itself. It would also learn the rules of the game. 
 
When an AI agent plays the GAN-generated game, GameGAN responds to the agent's actions by generating new frames of the game environment in real time. 
 
In the world of game creation, developers could use a GAN like this to automatically design new level layouts for existing games, using screenplay from the original levels as training data. They could also experiment with new characters or game themes. 
 
"You look at larger games like GTA 5, hundreds or thousands of artists work over many years to produce those worlds," Lebaredian said. "Any tools we can create to assist in generating all that content will be very valuable... We believe that GameGAN, or ideas that come from the research we're doing, will apply to new, sophisticated tools that will assist these artists."

Editorial standards