Skip to content

A GUI Tic Tac Toe game, implemented in python using different AI algorithms

Notifications You must be signed in to change notification settings

iamsinghashutosh/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe-Game

This Tic-Tac-Toe game consists of both the versions of the game,i.e, the normal tic-tac-toe game with fixed grid length(total cells) of 9 and 3 symbols are required to match either horizontally,vertically or diagonally to win this game , and the Open-Field Tic-Tac-Toe game where the grid size and the length of consecutive symbols to match(win length) is user defined. The entire code is written in Python and Tkinter library is used for the GUI of the game. Tic-Tac-Toe-Game

Please refer to REQUIREMENTS.txt for ways to install the dependencies.

To run the game simply run the game.py file in your terminal using the commmand "python3 game.py". You will see a messagebox-type screen with yellow background containing the following buttons:-

1) Reset:-

	This button restarts the game from beginning aborting the current game.

2) Start Game:-

	For starting the game using this button,you must provide the grid size and the win length as input in the respective textboxes.

3) Player:-

	This button decides the symbol to used by the player(either 0 or X).

4) Fixed Grid:-

	This button is used to start the game with default settings.

5) vs:-

	This button toggles between different AI options deciding the type of AI Algorithm to be used.
  • To start normal Tic-Tac-To game,just click on the Fixed Grid button.It will show a screen with 9 blocks/cells and 3 symbols are required to match vertically,horizontally or diagonally to win the game.
  • To play Open-Field Tic-Tac-Toe game,you should first provide the grid size you want and the win length,i.e. and the length of consecutive symbols to match to win the game, in the respective text-boxes.Then click on "Start Game" button to begin the game. You can change the type of AI algorithm to be used by the toggle button appearing on the left side of the window as vs Player/vs Easy AI/vs Normal AI/vs Hard AI.The algorithm used in hard AI is more complex than that in the normal AI and the easy AI which makes the computer play most optimally. To have a look at me playing the game visit :- https://youtu.be/576PDlKSs3k

About

A GUI Tic Tac Toe game, implemented in python using different AI algorithms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages