Giter Site home page Giter Site logo

tic-tac-toe's Introduction

TIC-TAC-TOE

Problem Statement

An AI algorithm based Tic-Tac-Toe.

Description

In order to build this game, we have made use of the Minimax algorithm. This is a recursive algorithm that enables the AI agent to choose the most optimum move based on all the subsequent moves that could take place in the further turns of the game.

We used pygame library to develop this game

Features of the Application

  1. 3X3 tic-tac-toe:
    The 3x3 tic-tac-toe is built with incremental levels of difficulty. A different algorithmic approach is used to attribute smartness to the agent at each level. The ultimate level is unbeatable and will always result in either a WIN of the agent or a TIE.

  2. Comfortable gameplay
    The application also consists of an indicator on the top bar of the board denoting who's turn it is.

3x3 TicTacToe

Our idea revolves around directing the AI agent (in this case the computer) to choose a move based on the utilities of the immediate next moves available to it. The agent must pick the maximum of these utilities for the next move.

Rules for 3x3

There are 9 cells in 3*3 tic-tac-toe board, which are numbered sequentially from 0 to 8.

  • Start by selecting a player who shall begin the game
  • The robot and the human play in alternation
  • First person to get their symbol across an entire row, column or diagonal wins

For instance, suppose the agent is about to place its move in the cell [0], if permitted, it can win in three ways

  • Horizontally : by placing in cells 1 and 2
  • Vertically : by placing in cells 3 and 6
  • Diagonally : by placing in cells 4 and 8

tic-tac-toe's People

Contributors

kirthivignan avatar anveshreddy18 avatar harshapathuri86 avatar pa163361 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.