Player Lens
A live 2D football match where you pick any player and an AI commentator follows only them, with a rating that explains itself.
Built for the Microsoft x Premier League "Inside the Game" hackathon.
Microsoft Agent Framework · GPT-4.1 mini (Microsoft Foundry) · Azure AI Speech · Python · FastAPI · Docker · Azure Container Apps · Azure Files · pytest · React · TypeScript
5 AI agents
Plus a code-based Fact Guard on every line
~$1.80
AI cost for one full match, in 4 versions
17 of 245
AI lines Fact Guard flagged, then rewrote or removed
01. Overview
Football commentary follows the ball, but many fans follow players. Player Lens lets you pick any of the 22 players and get your own AI commentator talking about that player all match, including off-ball work like pressing that normal coverage skips. It was my entry to the Microsoft x Premier League "Inside the Game" hackathon.
02. Key features





03. How it's built
Calibrating the simulator
- Problem
- The hackathon required synthetic data, so I couldn't use real match data.
- What I did
- Built a seeded simulator (the same seed always makes the same match) and calibrated it against Premier League ranges.
- Result
- All 8 benchmarks landed in range across 200 simulated matches, including about 891 passes and 82.7% pass completion per match.
No made-up facts
- Problem
- Language models invent stats.
- What I did
- Code produces every fact, and a code check called Fact Guard rejects any line whose numbers, names or actions don't match the event log. It has the model fix the line, or falls back to a template.
- Result
- In one full match, it flagged 17 of 245 lines for claims the match log didn't support: 12 were rewritten and 5 removed.
A commentator that only praised
- Problem
- Listening to matches, I noticed the commentator rarely mentioned mistakes. A rule required a rating change of at least 0.10 before writing a line, so small negatives like losing the ball (−0.08) were skipped.
- What I did
- Removed the threshold so every rating change, up or down, gets a line.
- Result
- Commentary now covers mistakes as well as highlights, and every rating change is explained.
04. My role
I led Player Lens as its product owner. I wrote the plans and specs, decided what the rating rewards, how the commentator sounds and what it may cost, and set the simulator's calibration targets. I directed Claude Code through the build, had outside reviewers (CodeRabbit, a separate Claude review, and Codex on earlier phases) check the code, and tested and listened to the voice changes. The project has 200+ automated tests.