Skip to content

Tic-tac-toe games are typical adversarial search problems, and the whole project is about implementing the minimax algorithm on the problem with alpha beta pruning.

Notifications You must be signed in to change notification settings

zjswhhh/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe

Enjoy the Game!!!

Authors: Jing Zhang & Fengxiang Lan

Environment: Mac OS X EI Caption 10.11.6; python3 interpreter (version 3.6.1).

Documents: ‘basicTTT.py’ ‘advancedTTT.py’ ‘superTTT.py’

Steps for basicTTT:

  1. Open terminal under the current path of tic-tac-toe programs.
  2. Run the code with command line, ‘python3 basicTTT.py’
  3. You will see a alert that is ‘Choose X or 0?’, you can input ‘X’ or ‘x’ or ‘O’ or ‘o’.
  4. Then it will tell you the game start and show a blank board for you, it will let you enter your choice, you can enter the number [1,2,3,4,5,6,7,8,9].
  5. If you enter the right number, if will show the board which has the chess you had put.
  6. Then the computer will finish it choice, and the screen will tell you the choice.
  7. Repeat 4) until the screen show the result of the game.
  8. After that, a new game starts immediately (jump to step 3).
  9. Ctrl+C to exit the program.

Steps for advancedTTT and superTTT:

  1. Open terminal under the current path of tic-tac-toe programs.
  2. Run the code with command line, ‘python3 advancedTTT.py’ or ‘python3 superTTT.py’
  3. You will see a alert that is ‘Choose X or 0?’, you can input ‘X’ or ‘x’ or ‘O’ or ‘o’.
  4. Then it will tell you the game start and show a blank board for you, it will let you enter your choice, you can enter ‘X Y’, and X,Y is between [1…9]. And there must be a blank space between X and Y.
  5. If you enter the right number, if will show the board which has the chess you had put.
  6. If your number violation the rule that is your board number must be the last player’s chess position, you need to enter again.
  7. Then the computer will finish it choice, and the screen will tell you the choice.
  8. Repeat 4) until the screen show the result of the game. 8)After that, a new game starts immediately (jump to step 3).
  9. Ctrl+C to exit the program.

#Cautions:

  1. MUST USE PYTHON3.
  2. DO NOT ENTER ANY STRING EXPECT WHEN YOU CHOOSE X OR O

About

Tic-tac-toe games are typical adversarial search problems, and the whole project is about implementing the minimax algorithm on the problem with alpha beta pruning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages