Skip to content

MuhammadAli02/Assignment-02-AI-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

Tic-Tac-Toe in Python

4(5) Different players

  * MonteCarloTreeSearchPlayer() - AI using Monte Carlo Tree Search + Move Prioritization + forced moves
  * MiniMaxPlayer() - AI using MiniMax Algorithm + Alpha-Beta pruning
  * HumanPlayer() - user input using GUI
  * RandomBot() - randomly placing marks
  * MiniMaxPlayerV2() - creates a full game tree and reuses for each move (not in UI)

How to Play (Graphical User Interface):

  1. Clone the repository into a suitable folder
  2. Navigate to and run "src/Main.py"
  3. Choose algorithms for both player1 and player2
  4. Choose the grid size: 3x3 or 10x10
  5. PLAY!
  6. When the game is finished click anywhere to restart the game
  7. Click BACK button at the top right corner to return to the Menu. goto->3.

How to Play (command line):

  1. Clone the repository into a suitable folder
  2. Navigate to and run "MyTicTacToe.py"
  3. There will be a prompt asking you to choose "X" or "O" and whether you want to go first or second
  4. The board will be displayed as a 3x3 grid numbered like so:
    1 2 3
    4 5 6
    7 8 9
  5. Input the number cooresponding to where you would like to place your "X" or "O"
  6. First to connect 3 in a row/column/diagonal wins!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages