Giter Club home page Giter Club logo

connect4's Introduction

CLI Connect 4

V3

Monte Carlo tree Search

Monte Carlo tree search (MCTS) is a heuristic search algorithm for some kinds of decision processes. Hence, perfect for board games such as connect 4. To balance between exploration and exploitation, the UCT formula will be used since it's the formula that combines the node value concept of MCTS and the UCB formula. (Read More)

The first issue I face facing was that the algorithm sometimes overlooks the possibility of a terminal move from the opponent. Instead it choses a move that might seem better to him (when it's clearly not the case). However this was due to the Exploration constant C being set too high at 2. After decreasing it to 1.4 (almost root(2) which is the recommended exploration for the UCT function).

V2

Quickstart:

After cloning create the following folders :

mkdir bin obj

Then run the following command :

make all

Finally launch the game with :

./bin/connect4v2

V1

Quickstart :

  1. Clone the repo

  2. Navigate into the repo

  3. Compile the c file : Eg: make connect4 or gcc connect4.c -o connect4

  4. Run ./connect4 (if make connect4 was used).

PS: Everything should be done within the terminal

Roadmap :

  • Build an interface with NCurses
  • Introduce playing against an AI

Contribute :

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.


License

This project is licensed under the MIT License - see the LICENSE file for details.

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.