Forty years after Pac-Man had his first taste of ghosts, an AI has given the ravenous puck a new maze to chew his way through ā without studying the game code.
That means it recreated the game without first being taught the rules. Instead, the AI mimics a computer game engine to create a new version of the arcade classic.
Researchers at GPU giant Nvidia recreated the game by feeding a model they call GameGAN 50,000 PacāMan episodes. After digesting the sample, it spat out a fully-functioning new version of the game.
The system uses generative adversarial networks (GANs), which Facebook Chief AI Scientist Yann LeCun called āthe most interesting idea in the last 10 years in ML.ā
[Read: DeepMindās new AI can beat humans at 57 Atari games]
GANs create new content ā such as photos of faces that donāt exist ā by pitting two neural networks against each other: a generator that creates samples and a discriminator that examines the designs to work out whether theyāre real.
GAN inventor Ian Goodfellow, a machine learning director at Apple, compares the process to a competition between counterfeiters and cops.
āCounterfeiters want to make fake money and have it look real, and police want to look at any particular bill and determine if itās fake, ā he said.
The two networks learn from each other to create new fakes that could pass as the real thing ā like a convincing Picasso forgery. Or in this case, a brand new version of a game.
Nvidia says that itās the first time that GANs have mimicked a computer game engine.
ā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,ā said Seung-Wook Kim, the lead author on the project. āAnd it did.ā
From Pac-Man to self-driving cars
AI has a long history of playing video games, such as the DeepMind system that mastered StarCraft II. But Nvidiaās research shows that it can also recreate them.
The companyās system learned to visually imitate Pac-Man by ingesting screenplay and keyboard actions from past gameplay. When the artificial agent presses a key, GameGAN generates new frames of the game environment in real-time until itās created a new layout.
The model can generate both the static maze shape and the moving elements of Pac-Man and his hated ghosts. It also learns all of the gameās rules, from sticking within the mazeās walls to avoiding ghosts until he munches a Power Pellet.
Nvidia says game developers could use the system to automatically generate new levels, characters, and even entirely new games. It can also separate the background from the characters so they can change the settings and the cast. If Pac-Manās suffering from indigestion, maybe Mario could take this place and chase mushrooms around an outdoor labyrinth.
The system currently is limited to 2D games, but Nvidia plans to make it work on more complex games and simulators.
Ultimately, the company envisions using the system beyond the world of gaming. They expect that it could create simulated environments for developing warehouse robots or autonomous vehicles.
ā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,ā said Sanja Fidler, the director of Nvidiaās Toronto research lab. āGameGAN is the first step toward that.ā
Even if that never happens, GameGAN has at least given Pac-Man a memorable gift for his 40th birthday. And Nvidia has invited everyone to his party on a date TBC later this year, when the game will be made available on the companyās AI Playground.
Get the TNW newsletter
Get the most important tech news in your inbox each week.