Skip to content

Mxltiply/CS50P-Final-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe with Minimax A.I.


Demo Video:

>>> Link


Project Description:

Welcome to my CS50P (CS50’s Introduction to Programming with Python) final project! I implemented a single-player Tic-Tac-Toe game playing against the computer. This computer uses the minimax (a type of adversarial search) algorithm to compute the best possible move against its opponent (the user).

Tic-tac-toe can be fun by itself — with a random A.I. —, however I felt a challenge was necessary for the enjoyment of the player. I find it very interesting that such a simple game can turn so labyrinthine.

I chose this project, for it encompasses the necessary fundamentals and concepts used in Python. This delineates: loops, control-flow, functions, algorithms, computational-thinking, etc...

Most importantly, this project was fun! 😀


What is Tic-Tac-Toe?:

For those that do not know how to play tic-tac-toe:

Tic-tac-toe is a two player game where each player chooses either a X or an O to represent their marker. The tic-tac-toe board is a 3x3 grid.

  1. A turn begins when a player will place his/her marker on an empty spot on the grid.
  2. The next player will play his/her turn.
  3. Players will keep alternating turns until either:
    • a player's marker has consecutively filled 3 spots horizontally/vertically/diagonally (a win)
    • the board is filled with markers with no win

That's it! 👏


Setup:

How to play my Tic-Tac-Toe:

# Run the main project.py file
python project.py

Thank you:

I want to thank Professor Malan and everyone who is on the CS50P team! I have had a deep passion for computer science ever since I began the course; it is absolutely incredible that such resources are available online for anyone to learn. Harvard University is truly doing something remarkable for everyone across the globe, with their free open source courses. Thank you for this opportunity.

- Mxltiply

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages