metadata
title: Neural Pong
emoji: 🎮
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
Neural Pong
A real-time Pong game where frames are generated by a diffusion model trained with rectified flow matching. Control the blue paddle using arrow keys or WASD to play!
Features
- Real-time frame generation: Uses a frame-autoregressive transformer with diffusion sampling
- Interactive gameplay: Control the paddle with keyboard inputs
- Configurable parameters: Adjust FPS and diffusion steps
- Low-latency streaming: Achieves ~16 FPS with 4 diffusion steps
How to Play
- Wait for the model to load (you'll see a loading spinner)
- Click "Start Stream" to begin generating frames
- Use Arrow Keys or WASD to control the blue paddle:
- Up/W: Move paddle up
- Down/S: Move paddle down
- Adjust the FPS and diffusion steps using the controls
- Click "Stop Stream" when done
Technical Details
This demo uses a small transformer model trained with rectified flow matching to simulate Pong game frames conditioned on user inputs. The model generates 24×24 pixel frames in real-time using diffusion sampling with configurable steps. Performance targets ~16 FPS with 4 diffusion steps on GPU hardware.
Model Architecture
- Frame-autoregressive transformer
- Rectified flow matching training
- Caching for efficient inference
- GPU-accelerated generation