The 50-year-old table tennis game 'Pong' was cloned using a neural network.



' Neural Pong ' has been released, a clone of the table tennis game '

Pong ,' released in 1972, using a neural network. The revolutionary aspect of this 'Neural Pong' is that rather than a neural network playing Pong, 'the neural network itself learns the rules and physical laws of the game Pong and functions as the game itself.'

GitHub - nickbild/game_clone: I cloned Pong with a neural network. The neural network is not playing Pong, it is Pong, and you can play it.
https://github.com/nickbild/game_clone



The unique feature of Neural Pong is that the neural network itself is the game of Pong, rather than a player. Instead of humans programming the laws of physics as in a typical game, the neural network learns hundreds of thousands of frames of continuous data, including paddle positions, ball coordinates, and user inputs collected from actual gameplay.

Pong, released in 1972, looks like this: a simple game where you bounce a moving ball with paddles at either end.

Arcade Game: Pong (1972 Atari) [Re-Uploaded] - YouTube


The following movie shows Neural Pong in action. The AI doesn't play the game as a player, but rather as the game's rulebook and physics engine, recreating the game's movements, such as bouncing the ball and colliding the paddle. There are no sound effects played during the game.

I Cloned Pong With a Neural Network — It's Not Playing Pong, It IS Pong - YouTube


Developer Nick Bild said he initially thought he could implement Neural Pong with a simple feedforward network, but it took months of work to figure out how to learn the laws of physics. He ultimately succeeded by separating the processing of the paddle and the ball, and adopting a Transformer- based architecture that uses an attention mechanism to capture temporal relationships.



He then collected training data from a simple Pong-like game he created, exporting the paddle position, ball coordinates, and user input information to a text file. However, he discovered that normal gameplay rarely triggered events that were important to the game's rules, such as the paddle missing the ball.

To eliminate this bias in the data, we used a special script to generate synthetic data that intentionally simulates situations in which the paddle misses the ball, and added this data as supplementary information to the actual play data. This approach of combining real data and synthetic data contributed to improving the accuracy of the model.

The game itself is played by an inference model. When the game starts, four consecutive frames of data are given to the model as a 'seed' to set the initial state. The model uses the information from these four frames to predict the state of the next frame. The new predicted frame is then added to a list of past frames, and the oldest frame is deleted, so that the most recent four frames are always used for the next prediction, and the cycle continues.

This mechanism allows the model to progress through the game autonomously after the initial seed data, using its own prediction results as new inputs.



Bild reports that he developed this project under the significant constraint of not having a GPU. He initially had a more ambitious goal: to use game screen images themselves as training data and predict the next image frame. However, this method required enormous computational power, making it unrealistic for Bild, who does not own an expensive GPU for training.

Neural Pong's training data is text-based, and training was performed on a 10-year-old machine equipped with two Xeon CPUs. Bild previously worked on a project to run an image generation AI on a Commodore 64, and this experience was applied to Neural Pong's training.

Commodore 64 AI Image Generator - YouTube


in Video,   Software,   Game, Posted by log1i_yk