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

https://github.com/s-4-m-a-n/tic-tac-toe-with-ai

tic tac toe by implementing minMax aka miniMax algorithm
https://github.com/s-4-m-a-n/tic-tac-toe-with-ai

Last synced: 2 months ago
JSON representation

tic tac toe by implementing minMax aka miniMax algorithm

Awesome Lists containing this project

README

        

# #tic-tac-toe-with-AI
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source-150x25.png?v=103)](https://github.com/s-4-m-a-n)

This repo consists of basic version of tic tac toe web-based game embedded with AI by implementing minMax algorithm (also known as miniMax algorithm).

## what is minMax algorithm ?
Minimax is a kind of backtracking algorithm that is used in decision making and game theory to find the optimal move for a player, assuming that your opponent also plays optimally. It is widely used in two player turn-based games such as Tic-Tac-Toe, Backgammon, Mancala, Chess, etc.

In Minimax the two players are called maximizer and minimizer. The maximizer tries to get the highest score possible while the minimizer tries to do the opposite and get the lowest score possible.

Every board state has a value associated with it. In a given state if the maximizer has upper hand then, the score of the board will tend to be some positive value. If the minimizer has the upper hand in that board state then it will tend to be some negative value. The values of the board are calculated by some heuristics which are unique for every type of game.

## preview file:
- [click me](https://rawcdn.githack.com/s-4-m-a-n/tic-tac-toe-with-AI/63a652736beb71d23741432c5fd247a2f4df6a81/main/index.html "preview Now"):point_left:

## Get in touch:
[![Facebook](https://img.shields.io/static/v1.svg?label=follow&message=@me&color=9cf&logo=facebook&style=flat&logoColor=white&colorA=informational)](https://www.facebook.com/suman.dhakal.39982)
[![Twitter](https://img.shields.io/static/v1.svg?label=follow&message=@&color=grey&logo=twitter&style=flat&logoColor=white&colorA=critical)](https://twitter.com/s_4_m_A_N)