Feb 2025
Dansing FairKalah β Mancala AI
An alpha-beta Mancala bot with a regression-tuned heuristic. Play it in the Arcade!

A competitive agent for Kalah and FairKalah, a variant whose 254 starting boards remove the first-move advantage. Built with Rajwat Singh on Todd W. Neller's Mancala framework.
It holds the top record in the course's four-year tournament history.
How it plays
- Alpha-beta search with a depth limit that scales with the remaining clock time and how "obvious" the position is (free moves and capture threats shrink the search; empty pits deepen it).
- Regression-tuned heuristic: score difference, mobility, free moves, and capturable vs. vulnerable stones, with weights fit by linear regression on game data.
On this website
The original Java engine was ported line for line to Rust and compiled to a ~37 KB WebAssembly module that runs in a Web Worker in your browser. A parity suite replays positions recorded from the Java bot and requires the same move and a bit-identical heuristic value.