Project

Tic-Tac-Toe with AI (Python)

Challenging
1177 completions
~ 20 hours
4.4

Build a Tic-Tac-Toe game with dynamic AI difficulty levels, from random moves to advanced strategies like the minimax optimization.

Provided by

JetBrains Academy JetBrains Academy

About

Everybody remembers this paper-and-pencil game from childhood: Tic-Tac-Toe, also known as Noughts and Crosses or X's and O's. A single mistake usually costs you the game, but thankfully it's simple enough that most players discover the best strategy quickly. Let’s program Tic-Tac-Toe and create an AI opponent to do battle with!

Graduate project icon

Graduate project

This project covers the core topics of the Python OOP course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Create an easy difficulty level where the computer just makes random moves: simple to write and not too challenging to beat.
Choose whether you want to play with a friend or take a break and watch computers battle it out!
It's time to add a medium difficulty level. This AI should be a lot harder to beat! Are you up to the challenge?
Oh no, what have we created here? An unbeatable AI monster! Indeed, this complex algorithm guarantees a win or a draw.

Reviews

Daniel Lopez
3 months ago
To maximize functions and use GLOBAL variables, learning the difference between minimax and additionally alpha-beta minimax (it's more than what was asked). A great experience.
Kateryna Bohuslavska avatar
Kateryna Bohuslavska
5 months ago
During this project, I learned how to implement different levels of AI logic, from simple random moves to a more advanced strategy using the minimax algorithm. I also gained a better understanding of game state evaluation and recursive thinking.
Zelandini Borromeu Guterres
8 months ago
I liked it, but I really thought there was AI involved. But it was just algorithms implemented

4.4

Learners who completed this project within the Python OOP course rated it as follows:
Usefulness
4.6
Fun
4.5
Clarity
4.2