Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 835 Bytes

README.md

File metadata and controls

12 lines (11 loc) · 835 Bytes

tictactoe

an artificial intelligence system playing tic tac toe using min max algorithm

The game is to be played between two people (in this program between HUMAN and COMPUTER). One of the player chooses ‘O’ and the other ‘X’ to mark their individual cells. The game starts with one of the players and the game ends when one of the players has one whole row/ column/ diagonal filled with his/her respective character (‘O’ or ‘X’). A player can play perfect tic-tac-toe (win or draw) given they move according to the maximum possible move from the following table. Win: If the player has two in a row, play the third to get three in a row. Block: If the opponent has two in a row, play the third to block them. Fork: Produce a chance where you can win in two ways. Block opponent's fork: It is great learning example