Tic-Tac-Toe is a classic two-player game where you can now challenge an impossible-to-beat AI. This project implements the Minimax algorithm to ensure the AI plays optimally, making it an excellent test of your strategic thinking.
- Unbeatable AI: The Minimax algorithm guarantees perfect play.
- Future Updates:
- Multiple difficulty levels for a more relaxed or challenging experience.
- Multiplayer mode for playing with friends.
- Performance optimizations to ensure smooth gameplay.
To run this game on your machine, you'll need to install the required libraries and set up a Python virtual environment.
- Python 3.x installed on your system.
- Pygame library for rendering the game interface.
- Clone this repository:
git clone https://github.com/Liburn-Krasniqi/Tic-tac-toe.git cd tic-tac-toe-ai
- Create a Python virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the dependencies:
pip install -r requirements.txt
- Run the Game:
python GUI.py
The AI bot uses the Minimax algorithm, which evaluates all possible moves to choose the one that maximizes its chances of winning while minimizing yours. This makes the bot impossible to beat but an excellent way to hone your skills.
- Add difficulty levels for players of all skill ranges.
- Implement a real-time multiplayer mode.
- Optimize the game's performance for faster move calculations.
Feel free to fork this repository and submit pull requests for any improvements or new features! Bug reports and feedback are always welcome in the Issues section.
This project is licensed under the MIT License. See the LICENSE
file for details.