--- title: Mr. Pong emoji: πŸ“ colorFrom: blue colorTo: gray sdk: gradio sdk_version: 6.24.0 app_file: app.py short_description: Play table tennis against a PPO agent python_version: "3.12" startup_duration_timeout: 30m models: - fromziro/MrPong tags: - reinforcement-learning - ppo - game --- # πŸ“ Mr. Pong An interactive demo for [**fromziro/MrPong**](https://huggingface.co/fromziro/MrPong) β€” a 28,484-parameter actor–critic MLP trained with PPO and self-play for 10M steps to play 2D table tennis. Three tabs: - **Play Mr. Pong** β€” the policy is exported from the checkpoint and evaluated in your browser (plain JavaScript, ~26K MACs per decision), so the agent's paddle reacts at the same 40 sub-steps/second the physics runs at, with no network latency. The critic's value estimate `V(s)` is shown live. - **Watch a match** β€” the real PyTorch checkpoint plays a full match against one of the scripted baselines from the model card, rendered to video server-side. - **Benchmark** β€” replays the model card's evaluation protocol over N matches. The physics environment (`pong_engine.py`) and the baseline opponents are a 1:1 port of the author's reference `inference.py`, so behaviour matches the reported numbers. Runs entirely on CPU: a policy forward pass is a 12β†’160β†’160β†’3 MLP. Model, environment and baselines by [FromZero](https://huggingface.co/fromziro), Apache-2.0.