A high-performance Gomoku AI written in Rust and compiled to WebAssembly.
The project implements the complete 42 Gomoku ruleset, including captures, endgame capture validation, and double-three detection, while focusing on strong search performance, modern web technologies, and a polished user experience.
- Alpha-Beta search with depth 10+ exploration
- Late Move Reductions (LMR)
- Advanced move ordering
- Zobrist hashing
- Transposition tables
- Bitwise pattern detection
- Threat-based position evaluation
- Capture mechanics
- Double-three detection
- Endgame capture validation
- Five-or-more alignment victory
- Full 42 Gomoku rules compliance
- Human vs AI
- Human vs Human
- Move suggestions
- AI thinking timer
- Position analysis
- Game replay system
- Persistent game history
┌─────────────────────┐
│ Visualizer │
│ (Bun + Vite + TS) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ WebAssembly │
│ Rust Bindings │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Gomoku Engine │
│ Rust │
└─────────────────────┘
All game logic lives inside the Rust engine.
The frontend is responsible only for rendering, user interactions, and visualization.
- Rust
- WebAssembly
- Bun
- Vite
- TypeScript
- Zustand
- Web Workers (multithreaded search)
- IndexedDB (local persistence)
- GitHub Actions (CI/CD)
- GitHub Pages (deployment)
- Iterative Deepening
- Alpha-Beta Pruning
- Late Move Reductions (LMR)
- Principal Variation ordering
- Transposition Table best move ordering
- Heuristic move sorting
- Pattern-based evaluation
- Threat detection
- Incremental board analysis
- Zobrist Hashing
- Transposition Tables
- Bitwise pattern scanning
- Incremental state updates
.
├── engine/ # Core game engine
├── engine-wasm/ # WASM bindings
├── visualizer/ # Frontend application
└── docs/ # Documentation
make devBuilds the WASM package and starts the development server.
make buildmake testmake watchmake cleanmake fcleanmake re- Post-game analysis
- Alternative move suggestions
- Position review
- Stored game history
- Move-by-move navigation
- Replay past games
- Human vs Human
- Human vs AI
- Automated documentation publishing
- GitHub Pages deployment
- GitHub Actions CI/CD pipeline