— Pixel art, port and AI opponents
Colonizing Pirkanmaa
A turn-based strategy game from university, ported to the browser with three computer opponents, one of them trained with AlphaZero.

Colonizing Pirkanmaa began as a C++ and Qt game for a university programming course: two to four players claim tiles of a generated map, build farms, mines and villages, pay their workers and soldiers every turn, and try to end up the sole ruler of the region. Version 2.0 is a one-to-one port to TypeScript and Phaser that runs in any browser with nothing to install. Every cost, wage and growth timer matches the original, and the map generator reproduces the old Windows build's random numbers bit for bit, so a seed still draws the same map it drew in 2020. The pixel art is the original's too: I drew every tile, building and worker by hand, and animated them frame by frame.
The new part is who you play against. The game logic has no dependency on the rendering, so it runs headless: a Rust simulator plays it millions of times, and an AlphaZero-style training loop turns those games into two neural opponents, with a heuristic bot as the third. The nets run in a web worker so the interface never freezes while an opponent thinks. Simulated games also showed that the original rules stalemated too often, which is where the Strange Device came from: a late-game building that starts a countdown and wins for whoever keeps it standing. Saves live in the browser, and finished games can be replayed. The whole port took six days with Claude Code.