INF310 | Minimax

Tic-Tac-Toe

Every move is validated and saved in SQL Server. In Minimax mode the AI explores the game tree with backtracking.

You play X. In Minimax mode the AI plays O.

{{ game ? 'Game #' + game.id : 'No game yet' }}

{{ statusText }}

{{ ms }} ms | {{ nodes.toLocaleString() }} nodes explored

{{ error }}

How the ML agent chose its move

The model predicted cell {{ mlExplanation.predicted_cell }} and chose cell {{ mlExplanation.selected_cell }}. The predicted cell was occupied, so it used the first available cell instead.

Test accuracy: {{ (mlExplanation.accuracy * 100).toFixed(1) }}%.

Cells are numbered left to right, top to bottom. X = 1, O = -1, empty = 0.

The highlighted route shows the rules the decision tree followed:

  1. Question {{ index + 1 }} Is the value in cell {{ rule.cell }} ({{ rule.value }}) ≤ {{ rule.threshold }}?
    {{ rule.went_left ? 'Yes — left branch' : 'No — right branch' }}
  2. Decision Play cell {{ mlExplanation.selected_cell }}
Decision at the root Play cell {{ mlExplanation.selected_cell }}