You may be familiar with the Infinite Monkey Theorem, an oft-cited (and often incorrectly quoted) claim that thousands of monkeys could bang on thousands of typewriters and eventually produce a work of art equivalent to William Shakespeare. (Yes, Simpsons did it.)

This week, Nvidia confirms that it has taken this theory quite seriously with its own twist: an army of AI routines, dubbed GameGAN (short for “generative adversarial networks”), trained to build a playable video game from scratch. More precisely, they’ve chosen one of the industry’s biggest, most recognizable games, celebrating its 40th anniversary today: Pac-Man.

If you’ve seen other farms of computers trained on existing games, this has usually come in the form of them learning how to play the game in question. After watching thousands of hours of a particular game and tracking the most successful moves and reactions in the course of a versus match, these AI routines can then control games, repeat and juggle thousands of strategies, and battle humans. (Sometimes the results go well for the computers, but not always.)

Nvidia’s latest experiment starts in similar fashion, as its AI research team trained a farm of four computers—each equipped with a Quadro GV100 workstation-grade GPU—on 50,000 hours of Pac-Man gameplay. That gameplay, conveniently enough, was also played by a separate AI. Trained on this footage, the computers in question then turned around and created their own identical-looking clone… with some exceptions.

Watch Pac-Man, write Pac-Man

“Our AI didn’t see any of [Pac-Man‘s] code, just pixels coming out of the game engine,” Nvidia representative Hector Marinez said to Ars Technica. “By watching this, it learned the rules.” Those included specifics like: Pac-Man’s speed, movement abilities, and inability to go through walls; the four ghosts’ movement patterns; what happens when Pac-Man eats a power pellet; and what happens when ghosts touch Pac-Man, super-charged or otherwise.