Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

AlphaBeta Tic-Tac-Toe

A full-stack Tic-Tac-Toe application with a React frontend and a FastAPI backend.
The AI uses the Alpha-Beta pruning algorithm to compute the optimal move.

Project Overview

This project demonstrates how classical AI algorithms can be used to solve deterministic games.
The backend implements the Alpha-Beta pruning algorithm, while the frontend provides an interactive interface for playing against the AI.

The application consists of two parts:

  • Frontend: React application running in the browser
  • Backend: FastAPI server that calculates the best move using Alpha-Beta pruning

Project Structure

AlphaBeta-tic-tac-toe-/ │ ├── backend/ │ └── main.py │ └── frontend/

Technologies Used

Backend

  • Python
  • FastAPI
  • Pydantic

Frontend

  • React
  • JavaScript

Algorithm

  • Alpha-Beta pruning (Minimax optimization)

How to Run the Project on Windows 11

1. Clone the repository

Open PowerShell or Command Prompt and run:

git clone https://github.com/NoMoreCookies/AlphaBeta-tic-tac-toe-.git
cd AlphaBeta-tic-tac-toe-

Running the Backend

Navigate to the backend directory:

cd backend

Create a virtual environment:

python -m venv .venv

Activate the virtual environment.

.venv\Scripts\Activate

Start the backend server:

pip install fastapi uvicorn pydantic
python -m uvicorn main:app --reload

The backend server will run at:

http://localhost:8000

Running the Frontend

cd AlphaBeta-tic-tac-toe-
cd frontend

Install dependencies:

npm install
npm start

How this hould look?

img1 img2

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages