Skip to content

MrittikaDutta/Unbeatable_TIC-TAC-TOE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unbeatable Tic-Tac-Toe

This is a web-based Tic-Tac-Toe game where you play against an unbeatable AI powered by the Minimax algorithm. The AI always plays optimally and will never lose — it can only win or force a tie. The project is built using HTML, CSS, and JavaScript, and is fully deployable on platforms like Vercel.


🚀 Live Demo

Deploy to Vercel to see it live.


🕹️ Features

  • Player vs AI gameplay
  • Smart, unbeatable AI using Minimax
  • 3x3 grid with responsive design
  • Visual turn indicators
  • Reset button to restart the game
  • Clean and minimalist UI

🧠 How the AI Works

The AI plays as O and uses the Minimax algorithm to evaluate all possible moves recursively. It simulates future states of the board and chooses the move with the best possible outcome.


🛠️ Tech Stack

  • HTML5 – Game structure
  • CSS3 – Styling and layout
  • JavaScript – Game logic and AI (Minimax)

📁 File Structure

tic-tac-toe/ ├── index.html # Main game interface

├── t-styl.css # Stylesheet

├── t-app.js # JavaScript game logic (with Minimax AI)

└── README.md # Project documentation

🧑‍💻 How to Deploy on Vercel Push your project to GitHub (ensure index.html is in the root).

Go to vercel.com and import your GitHub repository.

Vercel will auto-detect the project and deploy it as a static site. Visit your live URL (e.g., https://your-project-name.vercel.app).

📜 License This project is licensed under the MIT License.

About

This project is an unbeatable Tic-Tac-Toe game built with HTML, CSS, and JavaScript. It features a player vs. AI mode where the AI uses the Minimax algorithm to make optimal moves, ensuring it never loses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors