Back to projects

London, Ontario

4 min read

Spot the Checkmate

Automated mate-in-N puzzle Shorts on YouTube: positions from the Lichess database, rendered with Remotion on AWS Lambda.

TypeScript · Remotion · AWS Lambda · EventBridge · DynamoDB · AWS CDK · YouTube Data API

Three frames of a Spot the Checkmate Short: the puzzle with a countdown, a hint, and the checkmate with the answer line Three frames from one Short, taken from a render of the pipeline: the puzzle, a hint, the checkmate.

Spot the Checkmate is a YouTube channel that runs itself. Four times a day, a pipeline on AWS picks a mate-in-N puzzle, renders it as a Short and publishes it, with no editing and no one pressing upload. Every video is also a data point in an experiment about what makes a puzzle Short work. Watch it at youtube.com/@SpotTheCheckmate.

What it does

Each Short poses a real position from the Lichess puzzle database: the side to move, mate in how many, and the puzzle’s rating. A countdown runs while you look, and on longer mates a hint names the piece that moves first. The answer card sits locked under the board from the first frame; when time is up, the solution plays out, the card unlocks move by move, and the tactic behind it is named at mate. The answer also goes in a comment, and every video carries a small badge for BeaconChess.

How it’s built

  • Puzzles — forced-mate positions filtered from the Lichess puzzle database, stored in DynamoDB with their status
  • Rendering — the Short is a Remotion composition (React), rendered at 1080×1920 on AWS Lambda
  • Scheduling — EventBridge triggers an orchestrator Lambda at 06:00, 10:00, 14:00 and 18:00 UTC; it picks the puzzle, renders it and uploads the result
  • Publishing — the YouTube Data API uploads the video, adds captions, posts the answer comment and files it into a playlist. That costs about 2,100 of the API’s 10,000 daily quota units per video, which is why four a day is the ceiling
  • Analytics — a daily job refreshes YouTube metrics for every video and keeps a 7-day and a 28-day snapshot of each
  • Infrastructure — AWS CDK, with secrets in Secrets Manager; merging to main deploys

What it’s testing

Every upload is tagged with a variant — one value on each presentation axis, such as the hook line, whether the answer is shown, or the pacing — and with the presentation that rendered it. The orchestrator always fills the live variant with the fewest uploads, so every arm grows at the same rate, and results are read one axis at a time, pooled across the others, among videos that ran at the same time. Results use engaged views rather than raw views, because a looping Short inflates the raw count.

Most axes have since been frozen. What the data has settled so far:

  • Upload time — the 01:00 UTC slot drew 166 fewer engaged views than the other three over 70 videos’ first 7 days (bootstrap 95% CI [−253, −61]), so it moved to 10:00 UTC in September 2026
  • Showing the answer — at the switch, the 7-day read (withhold n=14, show n=17) found no significant difference in engaged views (CI [−103, +275]). The answer is now always shown, because the current format is built around the reveal
  • Pace — the live test compares the current solve pauses (5, 7 or 9 seconds, by mate depth) with a brisker 4, 5 or 6

FAQ

Does anyone edit the videos? No. Choosing the puzzle, rendering and uploading are all automatic, on a fixed schedule.

Where do the puzzles come from? The Lichess puzzle database, filtered to forced mates. Each Short shows the puzzle’s Lichess rating.

How often does it post? Four Shorts a day, spread across the clock.