This simple console-based and browser game allows you to play a Tic-Tac-Toe game against an AI opponent that uses the Minimax algorithm to make strategic moves.
Player vs. AI gameplay with Minimax algorithm.
Command-line or browser interface for ease of use.
Minimalistic design for quick and straightforward gameplay.
The Minimax algorithm is a decision-making algorithm used in two-player games, such as Tic-Tac-Toe. It is used to determine the best possible move for a player,
assuming that the opponent is also playing optimally. The algorithm works by recursively exploring all possible moves in the game tree and assigning a score to each move.
The player chooses the move with the highest score (for maximizing player) or the lowest score (for minimizing player) at each level of the tree.
This process continues until a terminal state (win, loss, or draw) is reached, and the algorithm returns the best move.
- Clone repository.
- Run the game with: 'python game.py'
- Clone repository.
- Install node.js (nodejs.org).
- Run 'npm install' in frontend directory to install react dependencies.
- Run 'npm start' in frontend directory to start frontend server.
- Run 'pip install -r requirements.txt'
- Run 'uvicorn backend.main:app' on base directory to start backend server.
- Play.
Use the numbers 1-9 (command-line) or click on the box (browser) to make a move on the Tic-Tac-Toe board.
The game will prompt you to enter your move during your turn.
The AI opponent will use the Minimax algorithm to make its moves.