A three-dimensional variant of the classic game Go, played on a tetrahedral lattice structure. Experience the ancient strategy game in a whole new dimension!
This project reimagines the classic game of Go in three dimensions. Instead of placing stones on a flat 2D board, you play on a tetrahedral lattice - a 3D structure where each position connects to exactly four neighbors, maintaining the strategic essence of Go while adding spatial complexity.
The tetrahedral lattice topology is particularly interesting because it preserves many of the strategic properties of traditional Go better than a simple 3D grid would, as inner nodes maintain the characteristic four-neighbor connectivity.
- Explore Mode: Free placement to learn the 3D board structure
- vs Computer: Play against AI opponents with varying difficulty levels
- Challenge Mode: Progressive difficulty with unlockable levels
- Random: Basic random stone placement
- Attack: Aggressive capture-focused strategy
- Greedy: Territory-maximizing approach
- Advanced: Sophisticated multi-objective strategy
- Capture 1 Stone: Quick games for learning
- Capture 3 Stones: Medium-length strategic games
- Territory + Captures: Traditional Go scoring with territory control
- Smooth mouse controls for rotation, zoom, and pan
- Real-time stone placement and capture visualization
- Territory highlighting and score tracking
- Modern dark theme with clean Material-UI design
- Node.js (version 14 or higher)
-
Clone the repository
git clone https://github.com/lukas/go-game.git cd go-game -
Start the game
./start.sh
The start script will automatically install dependencies and launch the development server at
http://localhost:5173
# Development server only
npm run dev
# Production build
npm run build
# Preview production build
npm run preview
# Run tests
npm run test- Stone Placement: Click on any empty node to place your stone
- Capturing: Surround enemy groups by removing all their liberties (adjacent empty spaces)
- Winning: Achieve the selected win condition (captures or territory control)
- Rotate: Click and drag to rotate the board
- Zoom: Scroll wheel to zoom in/out
- Pan: Right-click and drag to pan the view
The 3D nature adds fascinating strategic depth:
- Multiple attack angles and defensive positions
- Complex territory shapes and boundaries
- Three-dimensional thinking required for optimal play
- React 19 - Modern UI framework
- Three.js + React Three Fiber - 3D graphics and visualization
- Material-UI - Component library and theming
- Vite - Fast build tool and development server
- Playwright - End-to-end testing
/src/App.jsx- Main application with game state management/src/components/TetrahedralLattice.jsx- Core 3D game logic and rendering/public/help.md- In-game help content/tests/- Playwright end-to-end tests
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test - Submit a pull request
Run the comprehensive test suite:
# All tests
npm run test
# Headed mode (see browser)
npm run test:headed
# Interactive UI mode
npm run test:uiThe game follows traditional Go rules adapted for 3D:
- Liberties: Empty adjacent nodes (each node has exactly 4 neighbors)
- Captures: Groups with no liberties are removed
- Territory: Connected empty regions controlled by one player
- Scoring: Points for captured stones + controlled territory
The tetrahedral lattice creates unique strategic situations not found in 2D Go, making this both familiar and refreshingly challenging for Go players.
Created by Lukas Biewald using Claude Code for rapid development. The tetrahedral lattice concept was inspired by mathematician Henry Segerman.
This project is open source. Feel free to explore, modify, and share!
Ready to experience Go in a whole new dimension? Install and start playing! 🚀
