An overengineered, underdesigned, unbeatable tic-tac-toe game.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need python3 and pip3 installed on your machine. You can install it from the official website https://www.python.org/.
A step by step series of examples that tell you how to get a virtual python environment running:
Clone the git repository and navigate into the folder:
git clone https://github.com/umcconnell/tic-tac-toe.git
cd tic-tac-toe/
Then create your virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
To exit the virtual environment run
deactivate
Next, install the dependencies:
python -m pip install -r requirements.txt
Finally, start the app:
python main.py
# To play against an unbeatable AI, run:
# python main.py --ai minimax
Happy coding!
To get started, activate the virtual environment:
source venv/bin/activate
Install the packages from requirements.txt
:
python -m pip install -r requirements.txt
After activating the virtual environment, install your package(s):
python -m pip install <package>
Then freeze your packages:
python -m pip freeze > requirements.txt
Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
Ulysse McConnell - umcconnell
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Check out the great project, including explanatory video, from Dan Shiffman on The Coding Train about the MiniMax algorithm: https://thecodingtrain.com/CodingChallenges/154-tic-tac-toe-minimax.html
For a thorough explanation and walk-through of the Minimax algorithm, make sure to look at this video from Sebastian Lague.
Also, look at the great official python 3 tutorial and especially chapter 12 about virtual environments.
- numpy gitignore - Gitignore inspiration
- github python gitignore template - The gitignore template
- python3 tutorial - Guide and explanations
- VirtualEnv - Guide and explanations
- python-virtual-environment-howto - Guide and explanations
- Contributor Covenant - Code of Conduct
- YT: Sebastion Lague - Algorithms Explained – minimax and alpha-beta pruning
- The Coding Train - Tic Tac Toe AI with Minimax Algorithm