You are browsing as a guest. Sign up (or log in) to start making projects!

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.

Open comments for this post

15m 7s logged

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.

0
0
16
Ship #1

I built a Tic-Tac-Toe game with 4 different AI bots, each with its own difficulty level.

The most challenging parts were building the Minimax AI and the reinforcement learning-based AI. I also spent a lot of time fixing bugs and handling different edge cases.

The game has different levels, starting with an easy bot that makes random moves and going all the way to an impossible bot trained using reinforcement learning.

Through this project, I learned a lot about reinforcement learning and solving problems with minimal use of external AI.

It was a fun project to build, and now it’s finally ready to be shipped!

  • 6 devlogs
  • 12h
Try project → See source code →
Open comments for this post

2h 9m 2s logged

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.

0
0
8
Open comments for this post

31m 39s logged

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)

0
0
4
Open comments for this post

3h 13m 36s logged

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)

0
0
31
Open comments for this post

1h 20m 23s logged

🤖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. 🧠

0
0
63
Open comments for this post

1h 56m 9s logged

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 🚀

0
0
37
Open comments for this post

2h 52m 29s logged

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

3
0
98

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…