A timeless childhood game is tic-tac-toe, also known as naughts and crosses. It’s a simple and enjoyable game, and coding a Python version of it can be a fun project. But why stop at a regular tic-tac-toe game? Adding artificial intelligence (AI) using Python can take this classic favorite to a whole new level of excitement.
In this video course, you’ll create a flexible game engine that will not only allow you to play tic-tac-toe but also include an unbeatable computer player that utilizes the powerful minimax algorithm.
During this video course, you’ll learn how to:
- Develop a reusable Python library for the tic-tac-toe game engine
- Build a Pythonic code style that models the tic-tac-toe domain
- Implement different artificial players, including one that uses the unbeatable minimax algorithm
- Create a text-based console front end for the game, allowing human players to participate
- Discover effective strategies for optimizing performance
Throughout the course, you’ll explore important concepts such as designing immutable classes, implementing a generic plug-in architecture, and applying modern Python coding practices and patterns.