Coder Social home page Coder Social logo

dzutrinh / connect3-ai Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.77 MB

Tic-Tac-Toe using Minimax/Alpha-Beta

License: MIT License

C 98.87% Makefile 1.13%
game tic-tac-toe minimax connect3 ai text-interface alpha-beta-algorithm alpha-beta-pruning minimax-search

connect3-ai's Introduction

Tic-Tac-Toe - AI

A simple Tic-Tac-Toe game between Human and Computer. Simply an illustration of the MiniMax algorithm. It's just for fun during the pandemic.

Updates:

  • The game interface got a major touch-up.
  • AI difficulty levels added.
  • Game board size can be changed via the symbol BOARD_SIZE in the file defs.h. The default value is 3.
  • Alpha-Beta pruning strategy added. The strategy can be disabled by undefine the _USE_ALPHA_BETA_PRUNE_ symbol also in the header file defs.h.

Compiling

  • GCC: type make
  • MinGW: type mingw32-make

Tested

  • Clang (macOS Monterey)
  • MinGW64 (Windows)

Notes

  • DOS support is now temporarily removed.
  • Linux is not tested, I hope it would work :)
  • This is just a basic version of the game. Feels free to fork and modify anyway you need.

Screenshot

Title screen Gameplay screen

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.