JavaScript Tic Tac Toe Project Tutorial – Unbeatable AI w/ Minimax Algorithm



A full web development tutorial for beginners that demonstrates how to create an unbeatable tic tac toe game using vanilla JavaScript, HTML, and CSS. Learn the Minimax algorithm!

⌨ Part 1: Introduction (0:00)
Code: none

⌨ Part 2: HTML (2:58)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/2

⌨ Part 3: CSS (4:23)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/3

⌨ Part 4: JavaScript: Basic Setup (10:28)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/4

⌨ Part 5: JavaScript: Determine Winner (20:32)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/5

⌨ Part 6: JavaScript: Basic AI & Winner Box (30:45)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/6

⌨ Part 7: JavaScript: Minimax Algorithm (39:25)
Code: https://github.com/beaucarnes/fcc-project-tutorials/tree/master/tictactoe/7


Special thanks to David Daly and myloginistaken who found a mistake where the game sometimes incorrectly shows a tie game. The ‘Part 7’ GitHub code now contains this fix.

🔗Minimax article: https://medium.freecodecamp.org/how-to-make-your-tic-tac-toe-game-unbeatable-by-using-the-minimax-algorithm-9d690bad4b37

🐦 Beau Carnes on Twitter: https://twitter.com/carnesbeau


Learn to code for free and get a developer job: https://www.freecodecamp.com

Read hundreds of articles on technology: https://medium.freecodecamp.com

And subscribe for new programming videos every day: https://youtube.com/subscription_center?add_user=freecodecamp

source

Reply


Build A Site Info