Skip to content
byebyebryanPublic

About

Local-first Gomoku and Renju with Rust/Wasm bots, tactical hints, and replay analysis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Gomoku2D

An old favorite, built properly.

Play Gomoku and Renju in your browser, review how a game turned, and try another line. Gomoku2D combines configurable bots, tactical hints, replay analysis, and practice from earlier positions.

Play in your browser — no account required.

Rules · Guide · Lab · Visuals · Docs

CI

Gomoku2D gameplay with tactical hints, bot response, and a terminal winning frame

These captures show the prepared 0.5.5 build; see media provenance and Project status.

Play

  • Start immediately against Easy, Normal, or Hard bots; no account is required.
  • Choose Freestyle or Renju, including recursive Renju forbidden-move checks.
  • Tune bot depth, width, scoring, and proof options through advanced settings.
  • Enable hints for immediate threats, imminent threats, counter threats, and the stones behind them.
  • Play on desktop or portrait mobile with dedicated touch controls.
  • Keep history locally, or sign in with Google for private cloud continuity.

Bot decisions use the same tactical model as hints, replays, and the lab, so you can examine the threats behind a move.

Analyze

Replay Analysis walks backward from the ending through the losing side's decisions. It looks for forcing sequences and possible alternatives within a bounded tactical model:

  • Combo onset: the lethal threat that settled the result.
  • Setup corridor: the forced sequence that led into that threat.
  • Last escape: the latest position where the model finds a confirmed or possible escape.
  • Failure step: the missed response, prevention, or escape when the analyzer can classify one.

The replay can still be scrubbed normally, and any eligible frame can become a new practice game.

Analysis is bounded: a confirmed escape clears the modeled forcing corridor; a possible escape still needs verification. It is not a full-game solution.

Replay Analysis walks backward through the last escape, setup corridor, and lethal onset.

Inspect The System

The Rust lab powers the browser bot, Replay Analysis, and the tactical vocabulary shared by the game. The published report lets you inspect bot rankings, search telemetry, and analyzed games.

The curated report data retains its historical measurement dates and source provenance.

The Lab report drills into bot rankings, search telemetry, and replay analysis examples.

The Visuals guide publishes the other half of the system: pixel sprites, icons, source sheets, design tokens, and the layering rules used on the board.

The Visuals guide shows the pixel-art style system, icons, sprites, and source sheets.

How It Was Built

Gomoku2D began as an unfinished project from nearly a decade ago and returned as a one-developer, agent-assisted production experiment. Agents made its breadth practical across implementation, analysis, review, docs, reports, and release work. The human still owns the decisions that define the project: taste, scope, domain reasoning, and technical judgment.

Inside The Repository

gomoku2d/
├── gomoku-web/         browser app: React shell, Phaser board, wasm bridge
├── gomoku-bot-lab/     Rust lab: rules, bots, analyzer, eval, CLI, wasm
├── reports/lab/        curated JSON artifacts rendered by /lab/
├── docs/               reference docs, working notes, and archives
└── scripts/            release and process-story helpers

Start in gomoku-web/ for product UI, browser state, board rendering, and cloud continuity. Start in gomoku-bot-lab/ for rules, bots, tactical facts, replay analysis, evaluation, and the wasm bridge. Shared game facts originate in Rust; the web app presents them rather than maintaining a second rules model.

Run Locally

Install Node 24, Rust stable, and wasm-pack. From a fresh checkout:

git clone https://github.com/byebyebryan/gomoku2d.git
cd gomoku2d
wasm-pack build gomoku-bot-lab/gomoku-wasm --target bundler
cd gomoku-web
npm ci
npm run dev

Open the local URL printed by Vite. Guest play needs no Firebase configuration. The web README covers optional cloud setup and rebuilding Wasm; the testing guide lists checks by area.

Project Status

The 0.5.x line packages the local-play and replay-analysis baseline. 0.5.5 includes the October correctness, recovery, accessibility, and mobile Rules/Guide fixes.

Published releases · Changelog · Roadmap

Verification evidence and the agreed account, device, and human accessibility deferrals are recorded in the release preparation record.

Project References

About

Local-first Gomoku and Renju with Rust/Wasm bots, tactical hints, and replay analysis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages