Skip to content

Liburn-Krasniqi/Tictactoe-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe with Unbeatable AI

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.

Demo:

Untitled-ezgif com-optimize

🎮 Features

  • 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.

🛠️ Installation

To run this game on your machine, you'll need to install the required libraries and set up a Python virtual environment.

Prerequisites

  • Python 3.x installed on your system.
  • Pygame library for rendering the game interface.

Setup

  1. Clone this repository:
    git clone https://github.com/Liburn-Krasniqi/Tic-tac-toe.git
    cd tic-tac-toe-ai
  2. Create a Python virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install the dependencies:
    pip install -r requirements.txt
  4. Run the Game:
    python GUI.py
    

🧠 How the AI Works

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.


🚀 Planned Updates

  • Add difficulty levels for players of all skill ranges.
  • Implement a real-time multiplayer mode.
  • Optimize the game's performance for faster move calculations.

💡 Contribution

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.


📜 License

This project is licensed under the MIT License. See the LICENSE file for details.


🔗 Resources

About

Tic-tac-toe game in python, using pygame. (with AI adversary)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages