Skip to content

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

License

Notifications You must be signed in to change notification settings

mtHuberty/Tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published