Skip to content

olaholunuga/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TIC-TAC-TOE

Status License


A TIC-TAC-TOE game with an AI player built with the Minimax Algorithm

📝 Table of Contents

🧐 About

A console-based Tic-Tac-Toe game engine with an unbeatable AI using the Minimax algorithm.
Built with only the Python standard library. Inspired by Real Python’s tutorial.

Features

  • Console front end with human, random, and minimax (AI) players
  • Pluggable game logic and clean separation of concerns
  • Standard library only — no external dependencies
  • Extensible for GUIs, web, or other interfaces

🏁 Getting Started

Installation

Clone and install the library in editable mode:

git clone https://github.com/olaholunuga/tic-tac-toe.git

cd tic-tac-toe

python3 -m venv venv

source venv\bin\activate

pip install --editable library/

🎈 Usage

python -m console -X <playerX> -O <playerO>

Player types

  • human → human input from console

  • random → random move generator

  • minimax → optimal AI

# Human vs Human
python -m console -X human -O human

# Human vs Random
python -m console -X human -O random

# Human vs Minimax (AI)
python -m console -X human -O minimax

✍️ Authors

🎉 Acknowledgements

About

A Tic-Tac-Toe Game Engine With an AI Player in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages