Git Product home page Git Product logo

tictactoe-ai's Introduction

LastUpdate Forks Stars License

Table of Contents

๐Ÿค– Tic-Tac-Toe Terminator

Tic-Tac-Toe Terminator is a computer player that uses the minimax algorithm to make its moves. This algorithm allows the A.I. to analyze the current state of the game and determine the best move to make in order to maximize its chances of winning.

The A.I. is designed to be unbeatable, meaning it will always either win or draw against a human opponent. To achieve this level of performance, the A.I. prunes unnecessary branches of the game tree to make its calculations more efficient.

๐Ÿ›  Technology

  • Python
  • Pygame library
  • Minimax algorithm

๐Ÿ“ธ Screenshots

๐Ÿ’พ Installation

  1. Clone this repo
git clone [email protected]:IndieCoderMM/tictactoe-ai.git
  1. Install pygame library
pip install pygame
  1. Run the program
python main.py

๐ŸŽฎ Tictactoe

Tictactoe game can also be played without engine.

  • Inside tictactoe package, there are 3 modules:
    1. board.py: Game logics
    2. gui.py: Pygame interface
    3. engine.py: Algorithm
  • You can play the 2 player mode in the console, by running the python tictactoe/board.py.
  • You can also change the board size (4x4, 5x5, etc.). (A.I. can only play 3x3 board currently)
  • By changing MODE in main.py, you can play the 2P version in pygame interface.

๐Ÿค Contributing

I welcome any and all contribution that can help me improve my project. If you have any ideas or feedback that you'd like to share, please don't hesitate to reach out.

๐Ÿ“œ License

This project is licensed under the MIT license.

๐Ÿ’– Show your support

If you found this project interesting or helpful, please consider giving it a โญ.

tictactoe-ai's People

Contributors

indiecodermm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.