P
Pac-Bench
Open Source๐ Alt to SWE-benchTest LLM spatial reasoning by one-shot building a Pac-Man game
๐ณ Self-Hostable๐ No Sign-upโก Editorial Signal: 71/100โ
17 Stars
git clone https://github.com/jonclegg/pacman-bakeoff.gitPac-Bench is an interactive evaluation framework designed to test frontier models on complete game development and spatial reasoning tasks. It challenges LLMs to one-shot build a fully working Pac-Man game, providing a standardized benchmark for complex code generation.
Challenges models to generate an entire playable Pac-Man game in a single prompt response.
Evaluates how well models understand coordinate geometry, collision detection, and grid mechanics.
Provides instant feedback loops to verify if the generated code results in an executable, playable game.
Benchmarking the spatial reasoning and code synthesis limits of newly released frontier LLMs
Comparing coding agent capabilities across complex, multi-component application development
Researching failure modes of LLMs when handling game loop architecture and state management
Unlike SWE-bench which focuses on real-world GitHub issues, Pac-Bench specifically targets spatial reasoning and end-to-end creative code generation in a controlled sandbox environment.
AI researchers, ML engineers, and developer tool creators evaluating frontier code generation models.
Pac-Bench is engineered to eliminate critical operational friction in ai & machine learning. From an architectural standpoint, the system adopts a local-first, self-contained deployment posture, ensuring streamlined onboarding and minimal setup overhead.
Because the underlying code is fully open-source, engineering teams can audit security implementations, inspect telemetry vectors, and extend functionality via custom fork without risk of sudden vendor deprecation.
Pac-Bench is an open-source evaluation benchmark and automated testing framework engineered by Jon Clegg to evaluate frontier large language models on complex spatial reasoning and complete software synthesis. While standard benchmarks like HumanEval or SWE-bench evaluate isolated algorithmic functions or specific patch edits, Pac-Bench challenges models to generate an entire, self-contained HTML5/JavaScript Pac-Man game from a single concise prompt. The evaluation architecture automates headless browser orchestration via Playwright and Puppeteer. Upon receiving the generated artifact, the benchmark parses the Abstract Syntax Tree (AST), validates HTML5 canvas elements, and executes the game in an isolated browser sandbox. The framework evaluates spatial reasoning across rigorous functional vectors: discrete 2D grid matrix mapping, tile-based coordinate transformations, wall collision detection, pellet consumption state machines, ghost pursuit and scatter pathfinding heuristics (Blinky, Pinky, Inky, Clyde), and game loop synchronization via requestAnimationFrame. High-frequency telemetry monitors canvas rendering frame rates, keyboard event listeners, and unhandled browser console exceptions during automated gameplay simulation, measuring multi-component stability. Synthesized ASTs are analyzed for cyclomatic complexity, event loop coupling, and code modularity, providing researchers with quantitative software architectural metrics alongside visual execution scores.
Developer ergonomics in Pac-Bench are streamlined for rapid, reproducible benchmark execution and qualitative model comparison across diverse AI systems. Researchers execute benchmarks via a clean Node.js command-line interface: node run-benchmark.js --model claude-3-5-sonnet --output ./runs. The benchmark accepts customizable prompt manifests (prompt.txt) to test prompt engineering variations and system instructions. During execution, the harness captures automated gameplay screenshots and records WebM video streams of the game loop, providing immediate visual verification alongside automated programmatic checks. Output data is compiled into standardized JSON reports (results.json) capturing generation wall-clock latency, token usage, AST node counts, and playability scores. An integrated web leaderboard allows researchers to inspect model rankings and interactively play generated Pac-Man games directly in their browsers. The harness supports testing both raw model APIs and agentic coding harnesses (Claude Code, Cursor, Aider), exposing clear CLI flags to compare standalone completion capabilities against agentic iteration loops, giving engineers deep comparative visibility. Comprehensive test matrices can be scripted across dozens of frontier model endpoints simultaneously, generating comparative Markdown tables, reproducible telemetry traces, and visual gallery cards ready for academic publication and community evaluation.
Pac-Bench is published under the permissive open-source MIT license, allowing AI research labs, universities, and commercial AI vendors to execute, extend, and embed the benchmark without licensing royalties. From a Total Cost of Ownership perspective, operational expenses are governed exclusively by upstream model API token costs. A typical benchmark evaluation requires between four thousand and twelve thousand output tokens per candidate model, translating to approximately six to thirty cents per test run on frontier commercial models like GPT-4o or Claude 3.5 Sonnet. Infrastructure requirements for the evaluation harness are minimal: the Node.js runner and headless Chromium browser execute comfortably on standard developer laptops or continuous integration agents with less than 500MB of RAM and a single CPU core. Telemetry audits confirm zero telemetry collection or external data tracking. All generated code artifacts, benchmark metrics, and video recordings remain strictly stored within the local filesystem, providing complete privacy for evaluating proprietary, unreleased, or fine-tuned foundation models before public deployment. The zero-overhead design ensures that evaluation suites can be executed repeatedly during continuous model pre-training or fine-tuning without incurring supplementary software licensing or cloud infrastructure expenses.
Pac-Bench is production-ready as an indispensable evaluation instrument for AI researchers, foundation model developers, and coding agent architects who require a holistic, visually verifiable metric for spatial reasoning and end-to-end code synthesis. It cuts through synthetic benchmark saturation by presenting a complex, multi-system architectural challenge that models cannot solve by reciting memorized coding snippets. However, Pac-Bench is strictly an evaluation benchmark; it is not a commercial game engine, game development framework, or general-purpose test runner. Organizations deploying Pac-Bench should integrate the CLI runner into automated model evaluation pipelines via GitHub Actions, running evaluations against new model releases or prompt iterations. Configure headless Chromium with virtual GPU flags to ensure hardware-accelerated canvas rendering in headless Linux runners. Implement strict process timeouts to isolate models that generate infinite loops in game logic, and persist generated JSON summaries to build longitudinal leaderboards of model coding capabilities over time, tracking spatial reasoning progress systematically. Incorporating automated video artifact archiving into CI pipelines provides clear visual regression records, allowing engineering teams to detect subtle degradation in model spatial understanding across iterative prompt adjustments or domain-specific fine-tuning rounds.
Pac-Bench is 100% free and open-source under an open software license. There are no mandatory monthly subscription fees to access the source code or run it locally.
Unlike SWE-bench which focuses on real-world GitHub issues, Pac-Bench specifically targets spatial reasoning and end-to-end creative code generation in a controlled sandbox environment.
Yes. Pac-Bench is designed for self-hosting via Docker or direct server deployment. Running on your own infrastructure allows you to maintain direct control over your local compute, database storage, and operational environment.
No account creation or credit card is required to evaluate Pac-Bench. You can immediately access core features or run it locally without onboarding friction.
You can launch or test Pac-Bench quickly using the following command: git clone https://github.com/jonclegg/pacman-bakeoff.git Visit the official portal at https://jonclegg.github.io/pacman-bakeoff/ for documentation and guides.
ToolsRadar maintains strict editorial independence. This review of Pac-Bench was conducted using our standardized 5-pillar evaluation framework (Setup, Code Auditability, Maintenance Vitality, Cost Advantage, and Community Signal). We do not accept paid placements to inflate benchmark scores.
Maintainers of Pac-Bench and community advocates can display this real-time verification badge in your GitHub README, official documentation, or landing page.
[](https://lordorange.top/tool/pac-bench)<a href="https://lordorange.top/tool/pac-bench" target="_blank"><img src="https://lordorange.top/badge/pac-bench.svg" alt="Featured on ToolsRadar" /></a>Compare other trending developer tools and open-source projects in this space.
Cross-referenced architectural playbooks and category rankings featuring Pac-Bench.
High-signal, production-tested utilities with transparent codebases and active communities.
Take back data ownership by replacing expensive monthly cloud subscriptions with self-hosted software.
The definitive guide to escaping SaaS subscription sprawl with Coolify, Traefik, Tailscale, and automated S3 backup pipelines.
Replace sluggish 1970s Unix utilities with blisteringly fast, memory-safe Rust and Go modern CLI powerhouses.