Welcome to the TIC-TAC-TOE game! This is an implementation of the classic game using Python with an AI algorithm.
- Player vs Player: Play against another human player.
- Player vs AI: Play against an AI opponent with intelligent decision-making.
- Command-Line Interface: Simple and interactive text-based interface.
- Language: Python
- AI Algorithm: Minimax algorithm
To run the game locally, follow these steps:
-
Clone the repository:
git clone https://github.com/KunalSingh5431/TIC-TAC-TOE.git cd TIC-TAC-TOE
-
Install dependencies: Ensure you have Python installed. You can install any necessary dependencies using:
pip install -r requirements.txt
-
Run the game:
python tic_tac_toe.py
- The game is played on a 3x3 grid.
- Player 1 is X and Player 2 (or the AI) is O. Players take turns putting their marks in empty squares.
- The first player to get 3 of their marks in a row (up, down, across, or diagonally) wins.
- If all 9 squares are full and no player has 3 marks in a row, the game is considered a draw.
The AI opponent uses the Minimax algorithm to make optimal moves. This ensures a challenging game experience for the player.
Contributions are welcome! If you have any improvements or suggestions, feel free to fork the repository and create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, feel free to reach out:
- Email: [email protected]
- GitHub: KunalSingh5431
Enjoy playing TIC-TAC-TOE with AI! 🛩️