BlitzVolley
A two-player online volleyball game in the browser: ranked matches, Elo rating, bots and a career mode.
Try it

Loads in the page, only when clicked.
It is real time, so the whole set of problems that make an online game hard: latency, state synchronisation, and the question of who has authority when two machines disagree. Around that, it took matchmaking, an Elo rating, bots to fill empty games and a career mode to give a reason to come back.
Looping animation of a full match between a human and a neural-network bot, point by point, with the score.
The bots then got a learning module: a neural network trained by reinforcement learning (PPO) on the game’s own physics, replayed headless by parallel workers. It improves against a ladder of scripted bots, then against its own past versions. The network and its training are written without any library: one inference costs well under a tenth of a millisecond, which fits the budget of a server computing 120 frames per second. Difficulty levels are snapshots of the same bot at different stages of its training.
The core of the physics predates the online game: it comes from Blobby Volley, a two-player, same-keyboard game written in Python during the preparatory classes. That first game already sketched an opponent driven by a neural network, meant to improve through random mutations; it never learned to play.
The server runs on a self-administered machine: updates, monitoring, backups, incidents at two in the morning. None of that is visible from the volleyball court, which is the intended result.
It is also the most instructive project on what is not code, starting with the considerable distance between a game that works and a game you want to launch again.