Giter Club home page Giter Club logo

connect4's Introduction

connect4

This is a simple, command-line based implementation of the board game Connect 4 created in the context of the lecture Advanced Programming in C at the University of Freiburg in the summer term of 2019.

Rules

Alternately both players put a counter in one column by entering the number of the respective column. The goal of the game is to get 4 counters in a row, either per line, column or diagonally.

About the AI

The AI uses a very pramatic algorithm which is calculating all possible game states in the given depth. It does not use any kind of alpha-beta pruning, thus its runtime is exponential. On an average computer any search depth above 6 is expected to run noticable slow.

Build

make compile  # execute in the main directory of the repository

Test

make test  # execute in the main directory of the repository

Usage

-h, --help          Show manual.
-a, --ai            Play against the computer.
-i, --input FILE    Load game state from file.
-d, -diff NUMBER    Set the difficulty of the AI (0,...,42).
                    Will have no effect if --ai is not activated.
                    Default value is 6.

License

This work is published under MIT License. For details see the enclosed LICENSE file.

connect4's People

Contributors

nilskober 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.