Skip to content

Commit d70116c

Browse files
authored
Create README.md
1 parent 6b898b8 commit d70116c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

AI Game/Tic-Tac-Toe-AI/README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# TIC TAC WITH AI
2+
3+
## Overview
4+
5+
TIC TAC WITH AI is a Python-based Tic Tac Toe game using the Pygame library. This project includes a basic implementation of the game with an AI opponent.The AI uses the minimax algorithm to make optimal moves, providing a challenging opponent for players.
6+
7+
## Features
8+
9+
- Single-player mode against an AI
10+
- Minimax algorithm for AI decision-making
11+
- Interactive graphical user interface using Pygame
12+
- Restart functionality to play multiple games in one session
13+
- Visual indicators for game outcome: win, lose, or draw
14+
15+
16+
17+
### Game Controls
18+
19+
- **Mouse Click:** Place your mark (X) on the board.
20+
- **R Key:** Restart the game.
21+
22+
### Game Rules
23+
24+
- The game is played on a 3x3 grid.
25+
- You are X, and the AI is O.
26+
- Players take turns placing their marks in empty squares.
27+
- The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins.
28+
- If all nine squares are filled and neither player has three in a row, the game ends in a draw.
29+
30+
### Sample Interface
31+
32+
![image](https://github.com/BhanuSaketh/Python/assets/118091571/41a2823f-b901-485d-b53e-6ddd774dfd96)
33+
34+
35+
## How It Works
36+
37+
- The game board is represented by a 3x3 numpy array.
38+
- The game loop listens for user input and updates the game state accordingly.
39+
- The AI uses the minimax algorithm to evaluate possible moves and choose the best one.

0 commit comments

Comments
 (0)