Examples/Pac-Man

Pac-Man

Created from a prompt

OpenCode (DeepSeek V4 Pro via OpenRouter) in a Vercel Sandbox. Starter only (AGENTS.md, serve.py, player/, helpers/dom/view_kit). No hardcoded demo code. Cursor did not edit workspace/.

2026-10-15 · task 5E2R0sMUweDe · opencode · openrouter/deepseek/deepseek-v4-pro-0813

The prompt

Build a small Pac-Man maze, about ten by ten, with dots, a few power pellets in the corners, and two ghosts. I move one cell at a time. Walking into a wall still uses the turn. The ghosts step toward me after I move. Eating a power pellet lets me eat the ghosts for a short while, and an eaten ghost goes home. A ghost touching me otherwise ends the game. Eating every dot wins. There is also a step limit so I cannot wander forever.

Winning should matter most. Score from dots and ghosts should matter too, and so should how much of the board I cleared if I die. Show the maze, the ghosts, whether I can eat them, and the score. Arrow keys or WASD. Clicking a key does the same. Several mazes. The same one should place the ghosts the same way.

Live environment

Running the prompt-created workspace on this machine — not a mock. Save an episode, then open Replay below to scrub the timeline.

opening · 0 ms

Generated workspace

Exact files the agent wrote — not rewritten by hand.

# AI : shared Action contract — the page posts {"move": "..."}; keep this shape.
from pydantic import BaseModel


class Action(BaseModel):
    move: str