Asteroids on a Sphere.
A monorepo containing a 3D Asteroids-style game rendered on a hexagonal sphere, along with a NEAT (NeuroEvolution of Augmenting Topologies) training system that uses Tic-Tac-Toe as a demonstration environment for evolving neural network agents.
- Play Hexagonoids
- Play Tic-Tac-Toe NEAT Demo
- Read the Hexagonoids Blog Post
- Read the Tic-Tac-Toe NEAT Blog Post
- 3D Game Development: Explore rendering games on spherical surfaces using hexagonal grids (H3) and Babylon.js
- NEAT Training: Demonstrate neural network evolution using a simple game environment (Tic-Tac-Toe)
- Tournament Systems: Implement rating systems (Glicko-2) and tournament formats (Swiss) for agent evaluation
| Package | Description |
|---|---|
| @heygrady/hexagonoids-app | Main web application (Astro + SolidJS + Babylon.js) |
| @heygrady/h3-babylon | H3 hexagonal coordinates to Babylon.js Vector3 conversion |
| @heygrady/tictactoe-game | Pure Tic-Tac-Toe game logic with multiple AI player types |
| @heygrady/tictactoe-environment | NEAT environment adapter for training agents on Tic-Tac-Toe |
| @heygrady/tictactoe-demo | Training pipeline and CLI for NEAT agents |
| @heygrady/tournament-strategy | Swiss tournament and Glicko-2 rating implementations |
- Node.js 22.14.0 (managed via Volta)
- Yarn 3.6.1
# Clone the repository
git clone https://github.com/heygrady/hexagonoids.git
cd hexagonoids
# Install dependencies
yarn install
# Build all packages
yarn build# Start the web app dev server
yarn dev
# Run the NEAT training demo
yarn demo
# Play against a trained agent
yarn play# Run all tests
yarn test
# Run tests with coverage
yarn coverage
# Lint all packages
yarn lint
# Format all packages
yarn formathexagonoids/
├── apps/
│ └── hexagonoids/ # Main web application
├── packages/
│ ├── h3-babylon/ # H3 ↔ Babylon.js coordinate conversion
│ ├── tictactoe-game/ # Core game logic + AI players
│ ├── tictactoe-environment/# NEAT environment adapter
│ ├── tictactoe-demo/ # Training pipeline + CLI
│ └── tournament-strategy/ # Tournament + rating systems
└── scripts/ # Build and development scripts
tictactoe-demo
├── tictactoe-environment
│ ├── tictactoe-game
│ └── tournament-strategy
└── @neat-evolution/* (external)
hexagonoids-app
├── h3-babylon
├── tictactoe-game
└── tictactoe-environment
MIT License - see LICENSE for details.