Skip to content
⭕️ minimax tic tac toe
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Minimax Tic Tac Toe

Try it out:

This little app takes a board querystring. board should be a nine character string that represents a tic tac toe board, moving left to right beginning from the top row.

You, human, are x, the computer is o and spaces are represented with +.

The querystring ?board=ox+x+++++ would represent a board that looks like this:

//   o  |  x  |
// ----------------
//   x  |     |
// ----------------
//      |     |

The express server does basic board validation and implements a minimax algorithm in deciding the computer's next move.

What's next

The minimax implementation should rank available moves so that the computer wins in the fewest possible turns.

You can’t perform that action at this time.