Skip to content

Rishita-rm/TicTacToe-Mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI-Powered Tic Tac Toe

A Python-based Tic Tac Toe game featuring an AI opponent with the Minimax algorithm.

๐Ÿ”น Overview

This project is a Tic Tac Toe Game where users can play against an AI opponent. The AI utilizes the Minimax algorithm to make optimal moves, ensuring a challenging gameplay experience.

โœ… Key Features:

  • Play Tic Tac Toe against an AI opponent ๐Ÿค–
  • Uses Minimax algorithm for strategic AI moves ๐Ÿ”„
  • Interactive game board in the terminal ๐ŸŽฎ
  • ASCII Art Display for a visually appealing experience ๐Ÿ–ผ๏ธ
  • Smart AI that adapts its strategy for optimal performance ๐Ÿ†

๐Ÿ”น Tech Stack

  • ๐ŸŸข Python (Core logic & game mechanics)
  • ๐ŸŸข NumPy (Game state management)
  • ๐ŸŸข OS & Time modules (Screen clearing & delays for better UX)

๐Ÿ”น How It Works?

  1. Start the game and view the board layout.
  2. Enter your move (1-9) corresponding to board positions.
  3. AI responds with the best possible move.
  4. Game continues until a win or draw occurs.
  5. Results displayed with a congratulatory or game-over message.

๐Ÿ”น Installation & Setup

# Clone the repository
git clone https://github.com/your-username/AI-TicTacToe.git

# Navigate to the project folder
cd AI-TicTacToe

# Run the game
python tic_tac_toe.py

๐Ÿ”น Example Gameplay

๐Ÿ“Œ Board Layout (User plays 'X', AI plays 'O')

 X | O | X
-----------
 O | X | O
-----------
 X | O | X

๐Ÿ“Œ AI Makes a Move:

AI is making a move...

๐Ÿ”น Future Enhancements

โœ… Add a GUI version using Tkinter or PyGame ๐Ÿ–ฅ๏ธ
โœ… Implement difficulty levels for AI ๐ŸŒŸ
โœ… Multiplayer mode with online gameplay ๐ŸŽญ
โœ… Add voice command support ๐ŸŽ™๏ธ

๐Ÿ”น Contributing

Want to improve this game? Follow these steps:

  1. Fork the repository
  2. Create a new branch (feature-xyz)
  3. Commit your changes
  4. Push the branch
  5. Open a Pull Request

๐Ÿ”น Contact

๐Ÿ“ฉ Email: your-email@example.com
๐Ÿ”— LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published