An unofficial, fan-made digital variant of Kulami a territory-control abstract strategy game with a search-based AI engine and a chess engine style post-game analysis.
Play it in your browser on itch.io
- Play vs. a friend (local, same device) or vs. the AI (three difficulty levels)
- A minimax, alpha-beta search engine strong enough that no human has beaten it yet
- A full move-by-move analysis screen, in the style of chess engines like Stockfish/Lichess, showing the top candidate moves at every point in the game
- Interactive in-game tutorial
- A board editor with a compact, shareable base-32 board-code system
- English, Turkish, and German localization
- Runs both as a native desktop app and directly in the browser (compiled to WebAssembly via pygbag)
pip install pygame
python main.py
pip install pygbag
pygbag .
Then open http://localhost:8000 in your browser. To build a distributable web package:
pygbag --archive .
This produces build/web.zip, ready to upload as an HTML5 project (e.g. to itch.io).
shredderagent.py implements the main search: iterative-deepening minimax with alpha-beta pruning,
a transposition table, and an adaptive time-budget manager that allocates more thinking time to
the midgame/endgame than the opening. Both the bot's move search and the analysis screen's search
run as Python generators (yield-based), so they can be paused and resumed one time-slice per frame
instead of blocking on a background thread — this is what keeps the game responsive both on desktop
and in the browser, where threads aren't available.
main.py # App/state machine, main loop
engine.py # Core rules engine — board state, move validation, scoring
shredderagent.py # Search-based AI (used for "hard" difficulty and the analysis screen)
ai_agent.py # Simpler minimax AI (used for "medium" difficulty)
ai_agent_new.py # Thin wrapper exposing ShredderAgent with the same AI interface
tutorial.py # Interactive in-game tutorial state machine
map_utils.py # Board validation + base-32 board-code encode/decode
ui/ # Scenes, HUD, and reusable widgets
graphics/ # Board rendering
core/ # Config, audio, i18n, paths
Sound effects sourced from freesound.org (CC0 / CC BY) — full attribution list is available in-game under Credits.
Source code: all rights reserved (for now — may open this up later). Not affiliated with or endorsed by FoxMind.