Project

Tic-Tac-Toe with AI (Python)

Challenging
1162 completions
~ 21 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

Neil avatar
Neil
2 weeks ago
Good project and a good follow on from the earlier simple TicTacToe. It's interesting to review the AI-generated code for the minimax solution, it's going to take me a while to figure out what's going on there...
Guillaume Konen avatar
Guillaume Konen
2 months ago
The project challenge myself really tohave a good structure with the correct class and their responsabilities. Each step become more difficult to the last with the implement of minimax algorithm. As advised, I use AI agent which greatly help me for the different step and finalize the project.
NURGUL SALMAN
1 year ago
I have covered using classes and functions, handling errors, and processing user input

4.4

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