Project
Tic-Tac-Toe with AI (Java)
Hard
1639 completions
~ 24 hours
4.5After finishing this project, you'll get to know a lot about planning and developing a complex program from scratch, using classes and methods, handling errors, and processing user input. You will also learn to use OOP (Object-Oriented Programming) in the process.
Provided by
JetBrains Academy
About
Everybody remembers this paper-and-pencil game from childhood: Tic-Tac-Toe, also known as Noughts and crosses or Xs and Os. A single mistake usually costs you the game, but thankfully it is simple enough that most players discover the best strategy quickly. Let’s program Tic-Tac-Toe and get playing!
Training project
This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.
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:
Learn how to work with the table and its coordinates.
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
TB
Trayana Boykova1 week ago
During this project, I learned how to structure a complete interactive program, manage game logic, and implement different AI behaviors. The minimax algorithm was the most challenging part, especially understanding recursion and evaluating board states, but overcoming it helped me improve my problem ...
4.5
Learners who completed this project within the Java Desktop Application Developer course rated it as follows: