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 PyPI:

python -m pip install game-of-life-bench

Package page:

https://pypi.org/project/game-of-life-bench/

To use the local web UI:

python -m pip install "game-of-life-bench[web]"

For development from a local checkout:

python -m pip install -e .

For development with the web extras:

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.1.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.1-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: game_of_life_bench-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6e8ea7917d8c9ed277c711c34abb64907cf364de737f22ee66a8d70173bad204
MD5 2652a62eea352f3bdb15d01faac815a1
BLAKE2b-256 c6407e7056ab1a20efe11a8431225b5b2dd911029c3fe6eb2e3aadba3af57ecd

See more details on using hashes here.

Provenance

The following attestation bundles were made for game_of_life_bench-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for game_of_life_bench-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b85b608ff77013b722c8fccf6136b619a84e218d3e2702fca7f904c8ba59fc4b
MD5 e0bf9a3501979978aaa3b4aa96cc2a02
BLAKE2b-256 52c134ab76db266fbfaa974ae5e629c0e99d17a8df8810610de6c4aef7114cf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for game_of_life_bench-0.1.1-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