Skip to content

A version of tic-tac-toe where you can play against the computer - with three difficulty settings.

Notifications You must be signed in to change notification settings

JohnathonHutt/tic-tac-toe-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe-ai

Challenge the computer in three different AI modes.

Just select a difficulty setting at the top and begin by selecting your first move (by clicking on a tile).

The 'easy' AI chooses its moves at random.

In medium the AI will 'look ahead' and play either a winning move (if it exists), block the players winning move or move randomly (in that order).

The hard ('ultron') setting is unbeatable. Since tic-tac-toe is a solved game with a small and finite number of possible moves, setting the computer to hard (i.e. play with perfect strategy) means that you can only tie or lose on this setting.

This game was written with vanilla javascript, HTML and CSS.

About

A version of tic-tac-toe where you can play against the computer - with three difficulty settings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published