Skip to content

I created this tic tac toe game using C++. It is a beginner friendly project. I'm yet to add more features to it. Suggestions are welcome.

Notifications You must be signed in to change notification settings

Enigma014/tic_tac_toe.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

MiniMax Tic-Tac-Toe

Introduction

Welcome to MiniMax Tic-Tac-Toe, a simple console-based implementation of the classic Tic-Tac-Toe game using the MiniMax algorithm. This project demonstrates the basic principles of artificial intelligence (AI) in gaming.

Features

Play Tic-Tac-Toe against a computer opponent. Computer uses the MiniMax algorithm to make optimal moves. Console-based interface for easy interaction.

Prerequisites

To compile and run this program, you'll need:

C++ compiler (e.g., g++) Command-line environment (e.g., Terminal on macOS/Linux or Command Prompt on Windows)

Getting Started

Clone this repository to your local machine:

git clone https://github.com/Enigma_014/tic_tac_toe

Navigate to the project directory:

cd tic_tac_toe

Compile the program:

g++ main.cpp -o tic_tac_toe

Run the game:

./tic_tac_toe

Follow the on-screen instructions to play against the computer.

How to Play

You are 'X,' and the computer is 'O.' Enter your move by specifying the row and column (e.g., "1 2" for the first row, second column). The computer will respond with its move, and the game continues. The game will end when there is a winner or a draw.

Algorithm

The computer uses the MiniMax algorithm to determine its moves. This algorithm ensures that the computer always plays optimally and makes it impossible to beat.

Contributing

If you want to contribute to this project or have any suggestions, please feel free to create a pull request or open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

Inspired by the classic Tic-Tac-Toe game. MiniMax algorithm concept from artificial intelligence. Feel free to customize this README to include more details about your project, add screenshots, or provide additional information about the code structure and usage. A well-documented README helps others understand and use your project effectively.

About

I created this tic tac toe game using C++. It is a beginner friendly project. I'm yet to add more features to it. Suggestions are welcome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages