Skip to main content

A reproducible search-vs-LLM Gomoku benchmark for AI labs, model builders, and researchers.

Project description

GomokuBench

GomokuBench is a lightweight benchmark for testing frontier LLMs against a search-powered Gomoku engine in a setting that is simple, adversarial, reproducible, and easy to inspect move by move.

It is built for AI companies, model builders, and researchers who want a fast way to answer a practical question:

Can a general-purpose language model consistently beat a classical search algorithm in a fully specified board game?

Until 2026.4.26, no LLM in this benchmark has beaten the built-in AlphaBeta search engine. If you find one, please share it with us.

GomokuBench is designed to be easy to plug into model APIs, easy to run from the command line, and easy to audit after the game ends. Every move can be replayed, every prompt is explicit, and every result is saved as structured JSON.

Author: Homer Quan
GitHub: homerquan/GomokuBench

Why This Benchmark

  • Simple game, hard reasoning: Gomoku has clear rules and no hidden information, so failures are easier to interpret.
  • Search vs LLM: benchmark a deterministic AlphaBeta engine against modern chat models under the same rules.
  • Fast iteration: add a new model with a small JSON config and start benchmarking right away.
  • Useful outputs: save per-game logs, final boards, and aggregate win/loss results for later analysis.
  • Good for demos and research: use it for model evals, prompting experiments, tool-use studies, and public scoreboards.

Current Results

As of 2026.4.26, every model listed below is still down 10:0 against the built-in AlphaBeta search engine.

Model AlphaBeta (Search) LLM
nemotron-3-super 10 0
gemma4:latest 10 0
deepseek-v4-pro-together 10 0
kimi-k2.6-novita 10 0
gpt-5.5-pro-openrouter 10 0
gpt-5-mini 10 0
gemini-3-flash-preview 10 0

Quick Start

Install from PyPI:

pip install gomokubench

If your Python install does not put console scripts on PATH, use the module form:

python -m gomoku play
python -m gomoku benchmark --model nemotron-3-super -r 10

Play against the engine:

gomoku play

Benchmark an LLM:

gomoku benchmark --model nemotron-3-super -r 10

Benchmark with a custom model config file:

gomoku benchmark --model-file ./my-model.json -r 10

Give the model a better chance with a weaker engine:

gomoku benchmark --model nemotron-3-super -r 10 --ai-level easy

Requirements

  • Python 3
  • numpy

Install

Or install from source:

pip install .

The package installs a gomoku console command. Some native Python installations place that command in a user scripts directory that is not on PATH, so gomoku may not be found immediately after pip install.

You can always run GomokuBench through Python instead:

python -m gomoku play
python -m gomoku benchmark --model nemotron-3-super -r 10

If python -m gomoku works but gomoku does not, add Python's scripts directory to PATH. On macOS and Linux this is often ~/.local/bin; on Windows it is often %APPDATA%\Python\Python3x\Scripts.

Play

gomoku play

Optional flags:

  • --player black|white
  • --ai-first
  • --ai-level easy|standard|hard

The CLI always uses a 19x19 board.

AI levels:

  • easy: shallower search with a small amount of move randomness
  • standard: the default benchmark setting
  • hard: deeper search

Moves use x,y with 1-based coordinates, for example 10,10.

Benchmark

Run an LLM against the built-in alpha-beta AI:

gomoku benchmark --model nemotron-3-super -r 10

You can also point directly at a custom model config JSON file:

gomoku benchmark --model-file ./my-model.json -r 10

To give the LLM a better chance, benchmark against a weaker engine:

gomoku benchmark --model nemotron-3-super -r 10 --ai-level easy

To watch the rounds play out in the console while benchmarking:

gomoku benchmark --model nemotron-3-super -r 10 -v

What this does:

  • Loads the model config from models/nemotron-3-super.json
  • Or, with --model-file, loads the model config from the JSON path you provide
  • Runs 10 rounds total
  • Uses balanced starts: 5 rounds with the AI moving first and 5 rounds with the LLM moving first
  • Always uses a 19x19 board
  • Uses the selected AI level, defaulting to standard
  • -v prints each round, move, and board state in the console
  • Saves the benchmark report to benchmarks/nemotron-3-super.json

The benchmark report is saved as JSON and includes the summary plus per-game move logs and final boards.

What Gets Saved

Each benchmark run saves a JSON report in benchmarks/ with:

  • model name and provider
  • board size and AI level
  • total wins, losses, and draws
  • which side moved first in each round
  • full move logs
  • final board states

That makes GomokuBench useful both as a quick CLI demo and as a small research harness for repeatable comparisons across model versions and providers.

Adding Models

This repo now includes a few example model configs in the models/ folder.

You can add another model by creating a new JSON config that uses an OpenAI-compatible chat completions API format.

See the models folder on GitHub for example config files.

In general, either:

  • add a new config file under models/
  • or keep it anywhere and pass it with --model-file /path/to/model.json
  • point it at an OpenAI-compatible baseURL
  • set the remote model name
  • add any required API key env var to .env

Examples in this repo include Ollama-compatible, Hugging Face Router, and OpenRouter model configs.

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

gomokubench-0.1.3.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

gomokubench-0.1.3-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file gomokubench-0.1.3.tar.gz.

File metadata

  • Download URL: gomokubench-0.1.3.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gomokubench-0.1.3.tar.gz
Algorithm Hash digest
SHA256 41fb7aba11446fde8f94c20b90d09f97b458a29e696bdc1f1b2c12fd391d2cfc
MD5 b9ef0ac36e4199653223acafc2bb5067
BLAKE2b-256 8edcad92561dbce4d29a0952da081cf8edac5e2a23d95dc2d5e13414a448da5a

See more details on using hashes here.

File details

Details for the file gomokubench-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gomokubench-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gomokubench-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa49c5f2b40542afe40f594439b5be985f2518af459ebe764f3a0b74660ef3c3
MD5 e22955ee36a34a2d635ff6d23f0320fb
BLAKE2b-256 594d5c90002cd98935b833bc4ed6c9e8ad62c8074190125b8671c37c8327d515

See more details on using hashes here.

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