The creation of an AI for IoHoriZonticTacToe is more than a programming exercise; it is a microcosm of frontier AI research. Where classic Tic-Tac-Toe represents closed, solvable systems, IoHoriZonticTacToe embodies open-ended, horizon-rich environments akin to real-world strategy, financial markets, or exploration robotics. An AI that can master this game must abandon exhaustive search in favor of intelligent heuristics, statistical simulation, and deep pattern recognition. Ultimately, building such an AI teaches us that the difference between a trivial game and a profound one is not the rules themselves — but the horizon of possibilities that lies beyond the visible board.
Here are the eight winning combinations:
This algorithm can be further optimized for speed with techniques like , which efficiently cuts off branches of the game tree that don't need to be explored.
The depth factor encourages the AI to win as quickly as possible (prefer shorter wins) and delay losses.
: If the AI has two in a row, it immediately places the third to win.
grid with 8 winning vectors. The horizontal expansion completely alters this paradigm. It shifts the game state into either: