Play TicTacToe agains AI. The AI uses minmax algorithm.
The minimax function recursively evaluates all possible moves and assigns a score to each move.
The computer selects the move with the highest score.
Note that the computer's moves are deterministic in this implementation
, which means the computer will always make the optimal move. If you want to add more complexity or randomness to the computer's moves, you can modify the makeComputerMove function increasing or decreasing the depth.
-
Notifications
You must be signed in to change notification settings - Fork 0
WassimYazbekk/vanilla-js-tictactoe
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published