/Tic-tac-toe

Simple tic-tac-toe game where the AI can win or lose depending on how you play.

Primary LanguageJavaScriptOtherNOASSERTION

A Pen created at CodePen.io. You can find this one at https://codepen.io/mtHuberty/pen/wPyQaL.

Basic tic tac toe game with a simple computer AI/algorithm that attempts to defeat the player. It can only see when the
player is one step from winning the game (ie, when the player has 2/3 in a row) and it's priorities are #1: Win if it can
#2: Block the player if needed #3: Mark an open square adjacent to where a mark already is (assuming the 3rd square is also
open) and #4: Make a random move. 

CPU can be defeated by using the split strategy, which is also effective at defeating children in tic tac toe.