Skip to content

BFard/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

This is a simple command line Tic-Tac-Toe game. Run it with

$ python3 ttt.py MODE [SYMBOL]

where MODE is one of human, easy, medium, and hard. The human mode is a two-player version of Tic-Tac-Toe, while the other modes are single-player against AI of varying difficulty. The easy AI plays randomly, whereas the hard AI plays optimally using the minimax algorithm with alpha-beta pruning. In medium mode, the AI plays each of these strategies (random and minimax) with probability 0.5 on each turn. When choosing a single-player mode, there is an option to choose which symbol (X or O) you would like to use. If no symbol is chosen, it will be decided randomly.

Screenshots

Human mode example AI mode example

About

A simple command line Tic-Tac-Toe game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages