8000 GitHub - Merve00akckaya/tictactoe_AI: Play classic Tic-Tac-Toe against an intelligent AI opponent in your terminal.
[go: up one dir, main page]

Skip to content

Merve00akckaya/tictactoe_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic-Tac-Toe AI: Challenge Your Skills! 🤖

Welcome to the Tic-Tac-Toe AI repository! Here, you can play the classic game of Tic-Tac-Toe against an intelligent AI opponent right in your terminal. Whether you're a seasoned player or new to the game, our AI will provide a fun and engaging challenge.

Download the latest release here!


📖 Table of Contents


📝 Introduction

Tic-Tac-Toe is a simple yet classic game that has entertained players for generations. With this project, you can enjoy the game in a new way by challenging an AI opponent. The AI uses advanced algorithms to make decisions, ensuring a challenging experience every time you play.


🚀 Features

  • Intelligent AI: The AI opponent uses strategic algorithms to provide a competitive game.
  • Command Line Interface: Play directly in your terminal for a straightforward experience.
  • Multiple Game Modes: Choose between playing against the AI or against another player.
  • Customizable Settings: Adjust the difficulty level of the AI to match your skills.
  • Cross-Platform Compatibility: Runs on any system with Python 3 installed.

💻 Installation

To get started, you need to have Python 3 installed on your system. If you haven't installed it yet, download it from the official Python website.

Step-by-Step Installation

  1. Clone the Repository: Open your terminal and run:

    git clone https://github.com/Merve00akckaya/tictactoe_AI.git
  2. Navigate to the Directory: Change into the project directory:

    cd tictactoe_AI
  3. Install Dependencies: Use pip to install the required packages:

    pip install -r requirements.txt
  4. Run the Game: After installation, you can start the game by executing:

    python main.py

🎮 Usage

Once you have the game running, follow these simple steps to play:

  1. Select Game Mode: Choose whether you want to play against the AI or another player.

  2. Make Your Move: Enter the row and column where you want to place your mark (X or O).

  3. Watch the AI Respond: The AI will make its move based on its strategy.

  4. Continue Until the Game Ends: The game will end when one player wins or the board is full.

  5. Play Again: After the game, you can choose to play again or exit.


📜 Game Rules

Tic-Tac-Toe is played on a 3x3 grid. Players take turns placing their marks (X or O) in an empty cell. The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins the game. If all cells are filled and no player has three in a row, the game ends in a draw.


🤖 AI Logic

The AI in this game uses a combination of strategies to make its moves. It employs the Minimax algorithm, which evaluates possible moves and chooses the one that maximizes its chances of winning while minimizing the player's chances. This ensures a challenging experience for players of all skill levels.

Key Features of the AI:

  • Defensive Moves: The AI will block the player if they are about to win.
  • Offensive Moves: The AI will prioritize moves that lead to a win.
  • Randomized Responses: To keep the game interesting, the AI may make random moves when there are multiple options.

🤝 Contributing

We welcome contributions to improve the Tic-Tac-Toe AI project! If you want to help, please follow these steps:

  1. Fork the Repository: Click the "Fork" button on the top right of this page.

  2. Create a Branch: Create a new branch for your feature or fix:

    git checkout -b feature/YourFeatureName
  3. Make Your Changes: Implement your changes and test them thoroughly.

  4. Commit Your Changes: Use clear commit messages:

    git commit -m "Add feature: YourFeatureName"
  5. Push to Your Fork: Push your changes to your forked repository:

    git push origin feature/YourFeatureName
  6. Open a Pull Request: Go to the original repository and open a pull request.


📄 License

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


📬 Contact

For questions or feedback, feel free to reach out:


Download the latest release here!

Thank you for checking out the Tic-Tac-Toe AI project! We hope you enjoy playing and challenging yourself against our intelligent AI. Happy gaming!

0