Skip to content

frostyfeet909/Tic-Tac-Toe-with-minimax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe with Minimax

A text based implementation of tic tac toe, where you can play against a bot using the minimax algorithm.

Installation

No additional requirements are needed apart from the lastest python3.

Usage

import TicTacToe as tm
import TicTacToe.bots as tm_bots

bot_minmax = tm_bots.Minimax_Bot("x", "o", "Bob")
bot_random = tm_bots.Random_Bot("o", "x", "Bill")

game = tm.Game([bot_minmax, bot_random])
game.run()
# Starts a game with one bot playing random moves and the other using the minimax algorithm

This is also illustrated in Tests/it_works.py

python it_works.py
# Runs the above example

License

me no know

About

Python implementation of tic tac toe, solved via minimax

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages