Simple Tic Tac Toe

This is a simple tic tac toe app built with React and Javascript for a coding challenge. It uses the Minimax Algorithm to run the computer AI which is essentially a search of a tree of possible outcomes of a game, finding the most optimal move that lets the computer win in the least number of moves.

Minimax Wikipedia Article

There are a ton of comments in the actual code to better help you along through the process (especially findBestMove if you’re looking for the algorithm) of understanding what was done here and why.

To load this locally, you can simply git clone the repository, and then run npm install and then npm run start to see the code running on http://localhost:4000/.

Alternatively, it’s also available HERE, running on the web using firebase.

Thanks for taking a look!

GitHub

View Github