❖ why the AI never loses ❖
This AI uses the Minimax algorithm — a recursive decision rule that evaluates every possible board state until the end of the game. It assumes you also play optimally and always chooses the move that guarantees at least a draw. Against perfect minimax, victory is impossible. Your best outcome is a tie. Every move is calculated in real time.