Skip to content

Tic-Tac-Toe game constructed in python by Mitch Miller. Can be played by 1 or 2 players; i.e., the computer is able to play against you! The computer player derives the best move on each turn by considering all offensive and defensive possibilities – and selects the ideal compromise between disrupting your strategy while advancing its own.

License

Notifications You must be signed in to change notification settings

mitchism/tictactoe_by_msm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

game_tic-tac-toe

Tic-Tac-Toe game constructed in python by Mitch Miller. Can be played by two human players, but also features a single-player game mode in which the computer plays against you. The computer player is programmed to derive the best possible position to play on each turn, simultaneously considering each position for offensive and defensive – then selects the position which provides the ideal compromise between disrupting your strategy while advancing its own.

Computer Decision Logic

The computer player's decision tree deduces the best move by the following logic:

  1. Each possible winning combination is compared with the current state of the board;
  2. potential moves are separated into defensive and offensive opportunities;
  3. offensive and defensive opportunities are cross-examined for mutual tactical overlap; and
  4. a scoring system is applied to deduce the most preferable move based on the above factors.
  • The scoring system allows the computer to decide between the most strategically efficacious moves versus the most urgent.

Difficulty

To reduce difficulty for the human player,

  • there are two are 2:1 odds of the human player receiving the first turn; and
  • the computer has 1:2 odds of selecting the second-best move rather than best.

About

Tic-Tac-Toe game constructed in python by Mitch Miller. Can be played by 1 or 2 players; i.e., the computer is able to play against you! The computer player derives the best move on each turn by considering all offensive and defensive possibilities – and selects the ideal compromise between disrupting your strategy while advancing its own.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages