Io.horizon.tictactoe.aix
if isMaximizingPlayer: bestVal = -INFINITY for each cell in board: if cell is empty: place move value = minimax(board, depth+1, false) remove move bestVal = max(bestVal, value) return bestVal else: // Minimizing player (Human simulation) bestVal = +INFINITY for each cell in board: if cell is empty: place move value = minimax(board, depth+1, true) remove move bestVal = min(bestVal, value) return bestVal
To maintain cohesion with the io prefix, the aix module likely implements a standard interface, such as MoveEngine . This enforces a contract where the AI receives a BoardState object and returns a Move object, decoupling the UI from the logic. io.horizon.tictactoe.aix