Gabriele Cimolino

My Little Paddle

2021  ·  C#  ·  Unity WebGL  ·  DQN

My Little Paddle is a shared-control Pong game with a DQN copilot. The AI monitors the player's inputs, estimates the future value of each move, and overrides only when it predicts the player's chosen action will lead to failure. The rest of the time the player is in full control.

The copilot runs on a custom ML framework written in C# for Unity. This makes it possible to train the DQN during play in a WebGL build — something Unity's built-in tools don't support. The network is trained continuously against a prioritized replay buffer of observed situations, joint actions, and outcomes, and calculates the advantage of its move over the player's before deciding whether to intervene.

There was no general-purpose ML framework for Unity when this was built — the gap was visible in Oui, Chef!!, which required its own purpose-built solution for running supervised training during play. The C# framework here is the generalization: a reusable toolkit for training agents in real time in any Unity project.

My Little Paddle preview
Open in full window →