Tic Tac Toe
- 8 Devlogs
- 14 Total hours
A Tic-Tac-Toe game featuring multiple bot difficulty levels, from random moves to an unbeatable Minimax AI and a reinforcement learning-based AI.
A Tic-Tac-Toe game featuring multiple bot difficulty levels, from random moves to an unbeatable Minimax AI and a reinforcement learning-based AI.
Fixed a bug inside my impossible level
Bug: My AI got stuck on “AI is thinking…”
Cause: I used grid instead of grids.Therefore, JS threw a reference error that grid is not defined and this error was stopping the function.
Fix: I have replaced grid with grids.
Lesson: When something appears stuck or not working as intended then check browser console first.
I have changed my UI
Completed the Impossible Level
Finally finished the impossible level using Q-learning. The bot learns from thousands of games and uses the trained Q-table to decide its moves instead of following fixed rules.
And with that, the Tic Tac Toe AI journey is complete. I started with simpler random moves and gradually moved to rule-based AI, Minimax and finally reinforcement learning.
Now it’s time to upload the project.
Hard Level is finally completed
I have upgraded the Tic-Tac-Toe AI from rule based decisions to Minimax. Instead of only looking at current board, the bot now stimulates possible future moves, considers how the player could respond, and chooses the move with the best possible outcome.
**Next: Impossible Mode (Reinforcement Learning)
Finished the Medium Level bot
I manually built the bot’s decision making logic. It can now look for winning move, block opponents winning move, prioritize the center and corner and fallback to a random move when there is no better option.
Next: Hard Level (Minimax)
🤖Easy Mode is now complete!
The bot makes random moves, with win and draw detection working properly.
Next up: Medium Mode — making the bot actually think. 🧠
Added a Bot Selection area to the game!
Players can now choose different AI difficulty levels — from random moves to an unbeatable Minimax AI.
Next up: making each bot smarter 🚀
Tic Tac Toe — Entrance Screen
I started building my tic-tac-toe game.
I created a responsive screen with full-screen background, glass-style card, title and play button.
Next: I will build the bot selection screen