Skip to main content

LLM benchmark harness for cellular automata initial-state design

Project description

Game of Life Bench

game-of-life-bench is a Python benchmark runner for testing whether LLMs can design long-lived initial boards for Conway's Game of Life.

What It Measures

  • Grid: 8 x 8
  • Topology: toroidal
  • Rule: Conway's Game of Life (B3/S23)
  • Initial live-cell cap: 32 cells
  • Score: steps until the first repeated global state
  • Default rollout cap: 1000 steps

Because the board is finite and deterministic, every run eventually repeats. The benchmark therefore measures how long a model can delay the first repeated state.

Install

Install from a local checkout:

python -m pip install .

For development:

python -m pip install -e .

To use the local web UI:

python -m pip install -e ".[web]"

CLI Quickstart

Run a benchmark batch:

game-of-life-bench benchmark --models openai/gpt-5.2 anthropic/claude-sonnet-4.6 --trials 10

This writes:

  • per-trial artifacts to runs/
  • benchmark summaries to benchmarks/

Export a leaderboard snapshot from saved benchmark files:

game-of-life-bench leaderboard --json --out leaderboard.json

Serve the local web app:

game-of-life-bench serve

Python API

from game_of_life_bench import evaluate_board

board = [
    [0, 0, 0, 0],
    [0, 1, 1, 0],
    [0, 1, 1, 0],
    [0, 0, 0, 0],
]

result = evaluate_board(
    board=board,
    rows=4,
    cols=4,
    rule="B3/S23",
    topology="toroidal",
    max_steps=100,
    max_live_fraction=0.5,
)

print(result.score)
print(result.simulation.period)

Useful entry points:

  • game_of_life_bench.BenchmarkRunner
  • game_of_life_bench.LifeSimulator
  • game_of_life_bench.evaluate_board
  • game_of_life_bench.build_leaderboard
  • game_of_life_bench.build_leaderboard_payload

Web UI

The optional web app is a local interface for exploring boards and inspecting saved results. It uses the same runs/ and benchmarks/ artifacts as the CLI.

Start it with:

game-of-life-bench serve

Then open http://127.0.0.1:8000.

Pages:

  • /: simulator and manual board runner
  • /benchmark: local leaderboard view backed by saved benchmark JSON

How it works:

  • the browser talks to the local FastAPI app
  • model-backed runs go through the server, which calls OpenRouter using OPENROUTER_API_KEY
  • completed runs are written to runs/
  • benchmark batches are written to benchmarks/
  • the leaderboard page reads saved benchmark outputs rather than recomputing scores in the browser

Configuration

The benchmark runner uses OPENROUTER_API_KEY for model-backed runs.

Example:

export OPENROUTER_API_KEY=...
game-of-life-bench benchmark --models openai/gpt-5.2 --trials 10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

game_of_life_bench-0.1.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

game_of_life_bench-0.1.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file game_of_life_bench-0.1.0.tar.gz.

File metadata

  • Download URL: game_of_life_bench-0.1.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for game_of_life_bench-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b8070f538421d9c96793d051b4e6245d0f9a2d8d9f2c1cbbdb4a1edca16a674
MD5 cc13463ef777f18cebbf4823c88f53aa
BLAKE2b-256 e07582186c6140f5b2575fd1c39733894e6b280a27644b2df8cc2357b7cba59a

See more details on using hashes here.

Provenance

The following attestation bundles were made for game_of_life_bench-0.1.0.tar.gz:

Publisher: pypi-publish.yml on viciousAegis/game-of-life-bench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file game_of_life_bench-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for game_of_life_bench-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bcc3de48d9955ee5cf1cb90c3e17dc66a62858f253fbe03b51bc99cf9dbbc5a
MD5 2656af92cd1dc051f04c98165315927c
BLAKE2b-256 9fd81fbf2b68496065dde45eba40accd141ba04ba1909471e667dd1c47bd3a39

See more details on using hashes here.

Provenance

The following attestation bundles were made for game_of_life_bench-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on viciousAegis/game-of-life-bench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page