johannessram / TicTacToe

AI Tic-tac-toe player with Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI Tic-tac-toe player with Python

This is a tic-tac-toe BOT incorporated into a console game.
My version of tic-tac-toe has two main modes: one with two human opponents who take turns filling an empty square with their piece, and the other with a human (you) against an artificial intelligence, the bot.

Project description:

My project is my own implementation of a tic-tac-toe game in order to assimilate previously learned skills such as python and algorithm, symbolic AI and others. I used Python to build this project because its purpose was to put into practice the skills I had learned so far. Also, it was built following the MVC design pattern to facilitate eventual integration of a better view as well as debugging/error handling.

How to install and run it?

  • Clone this repository
git clone https://github.com/johannessram/TicTacToe.git
  • run the project
python3 TicTacToe

How to use the project?

  1. You are prompted to choose between 1 and 2
    • 1 to play against AI
    • 2 for a two-player mode game
  2. If you choose to play against AI, you are prompted to choose your avatar X or O
  3. Each player is allowed to place his pawn on any empty cell by providing its coordinates (Horizontal one before the Vertical one, for example A3, B0, ...) X begins then O, and so on
    In the following image, all cells are empty.
    virgin grid
  4. The one who manages to align three of their pawn first wins

Licence:

This project is licensed under the Attribution-NonCommercial license.

About

AI Tic-tac-toe player with Python


Languages

Language:Python 100.0%