Mladen Draganović portrait

TacToe16: a 4×4 game built for a hackathon

Published on:

Most small games become less small the moment the computer has to play well. For the DressCode Christmas Hackathon in 2020, I built TacToe16, a solo project that takes tic-tac-toe from a 3×3 board to 4×4.

TacToe16’s 4×4 game board

The TacToe16 algorithm opens with X.

The larger board changes the decisions without losing the rule everyone already knows. I wrote the opponent in plain JavaScript with Minimax and alpha-beta pruning, then moved that work into a Web Worker so the interface would stay responsive while it calculated a move.

TacToe16 also has Progressive Web App support, because a small browser game should be easy to revisit. It placed second in the challenge, as DressCode announced on Instagram. More importantly, it taught me to resist turning a short project into a pile of half-finished ideas.

The best constraint was working alone. There was nobody to hand an awkward detail to, so I had to keep the rules, AI, and interface within a scope I could actually finish.