After an early morning beach walk with a classmate, I realized I hadn’t taken my house keys. My daughter would be sleeping, so I wandered with my phone.

This is when I get ideas - often a dangerous time for my students.

In this case, the idea was a rambling conversation with Claude that roughly begins with:

As part of my Tools in Data Science course, I plan to create a Cloudflare worker which allows students to play a game using an API. The aim is to help them learn how to build or use AI coding agents to interact with APIs to solve problems.

The game needs to be:

  • Playable yet challenging: Fun by itself, human-playable via a text interface, but hard to solve manually at scale. Easy with an AI coding agent. Maybe a maze or text adventure?
  • Seed randomized: Generate a different problem for each student & week, so they can’t reuse a solution.
  • Verifiable: The solution and score must be publicly verifiable (JWT token?) without requiring shared secrets.

Give me game ideas and explain:

  1. What’ll the game like on the API and the UI?
  2. Why these ideas? What’s interesting about the game?
  3. What’ll students learn by playing the game directly?
  4. What’ll students learn using AI coding agents on the API?

It generated four ideas. I picked three.

Labyrinth

It’s a maze where each may have a data row. Students wander, collect required fragments, reach the exit room, and answer a statistical question from collected data - within a fixed number of moves.

Manual play teaches spatial reasoning, systematic exploration, and the cost of backtracking.

AI agent play teaches graph traversal, stateful API interaction, and basic data aggregation.

Play Labyrinth

Detective

You’re investigating a financial network of accounts with transaction links looking for a compromised account which behaves strangely on multiple attributes. Find it, and trace the shortest path to an “anchor” account using as few node queries as possible.

Playing manually teaches graph intuition, anomaly detection by feel, and the frustration of systematic searches.

AI agent play teaches graph traversal algorithms, outlier detection, path reconstruction, and the exploration-exploitation tradeoff - all real-world data science skills.

Play Detective

Signal

AI has locked all your exits in a research facility. You need to restart the core systems by exploring rooms, combining objects, and solving the AI’s puzzles.

This game is AI-agent native: LLMs can parse the hints better than humans. Students using pure rule-based agent will struggle, teaching LLM-as-a-tool within a larger agent pipeline - an important real-world pattern.

Playing manually teaches inventory management, dependency reasoning, close reading of ambiguous instructions.

AI agent play teaches multi-step planning with dependencies, agents-in-the-loop, NLP, and state management.

Play Signal

Implementation

Frankly, I just asked Codex to crunch it over five hours of a Vijay Antony movie binge.

Seriously. I did NOT look at the code. I just wrote 12K worth of prompts (which I’ll share later) while it processed 129 million tokens, generated 625K of tokens, and got the entire job done.

The game is now part of the TDS Project 1 - apart from a bunch of other exercises. With this as inspiration, I hope to include many more gamifications into this course.

This feels a bit like Maze Runner. My condolences to the students.