Skip to content

Tic Tac Toe playing AI, implementation of minimax algorithm

Notifications You must be signed in to change notification settings

Aavishkar-Kolte/minimax_tic_tac_toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MINIMAX Tic Tac Toe Game

This is a simple implementation of the classic game Tic Tac Toe in Python. You can play against another human or against an AI. AI is nothing but implementation of minimax algorithm.

This code is a modified version of the code which was coded by Gabriella, event instructor of [GHW Games Week] Building a Tic-Tac-Toe AI with Minimax Algorithm event.

How to Play

You mark is 'X', and your friend's mark (or the AI's mark) is 'O'. Players have to enter number from 0-9 to place mark at that positon.

Number and mark position is as below:

0 | 1 | 2
3 | 4 | 5
6 | 7 | 8

Game Features

  • The game is played in the terminal
  • You can choose to play against another human or against an AI

How to Run

First clone this repository then to run the game, navigate to the directory containing the main.py file in your terminal and run the command python main.py. You will be asked to choose a game mode: 1 for Human vs Human, 2 for Human vs AI.

Pull requests are welcome.

About

Tic Tac Toe playing AI, implementation of minimax algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages