Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mahmoudasem337/tictactoe

Simple implementation of the classic Tic Tac Toe game with an AI opponent utilizing (BFS) algorithm.
https://github.com/mahmoudasem337/tictactoe

ai artificial-intelligence breadth-first-search python

Last synced: 5 days ago
JSON representation

Simple implementation of the classic Tic Tac Toe game with an AI opponent utilizing (BFS) algorithm.

Awesome Lists containing this project

README

        

# TicTacToe

#### This is a simple implementation of the classic Tic Tac Toe game with an AI opponent utilizing the Breadth-First Search (BFS) algorithm. The game is written in Python and can be played in the terminal.

##### AI Algorithm (BFS) :
The AI opponent in this game is implemented using the Breadth-First Search (BFS) algorithm. BFS is a graph traversal algorithm that explores all the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level. In the context of this game, BFS is used to explore all possible moves and select the optimal one.

##### Game Rules :
Tic Tac Toe is a two-player game where each player takes turns marking spaces in a 3x3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. If all 9 squares are filled and no player has achieved a winning pattern, the game is a draw.