Coder Social home page Coder Social logo

zedrichu / chinese-checkers-ai Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 1.43 MB

Implementation of the Chinese Checkers game and an AI agent for it

License: MIT License

Python 100.00%
artificial-intelligence minimax-algorithm alpha-beta-pruning heuristic-evaluation

chinese-checkers-ai's Introduction

Chinese Checkers Game AI

This project implements a Chinese Checkers game that can be played in various modes, including against different types of AI players and a human player via a graphical user interface (GUI). The game supports command-line arguments to specify the player types and, for AI players using the Minimax algorithm, the depth of the search.

Installation

Before running the game, ensure you have Python installed on your system. This game has been tested with Python 3.12+.

Clone the repository to your local machine:

git clone https://github.com/Zedrichu/Chinese-Checkers-AI.git
cd chinese-checkers

Usage

To start the game, navigate to the project directory and run main.py with Python, specifying the options for the first and second players.

python main.py --first-player <player_type> --second-player <player_type> [options]

Player types

  • human: A human player using the graphical user interface.
  • random: An AI player that chooses moves randomly.
  • nonrepeatrandom: An AI player that chooses moves randomly without repeating the last move.
  • minimax: An AI player that uses the Minimax algorithm with optional depth specification.

Options

  • --first-minimax-depth <depth>: Specifies the depth of the Minimax search for the first player. Only required if the first player is minimax. Default is 6.
  • --second-minimax-depth <depth>: Specifies the depth of the Minimax search for the second player. Only required if the second player is minimax. Default is 6.

Examples

Start a game with a human player against a Minimax AI player with a depth of 4:

python main.py --first-player human --second-player minimax --second-minimax-depth 4

Start a game between a Minimax AI player with a default depth of 6 and a standard random AI player:

python main.py --first-player minimax --second-player random

Project Completed in Course 02180 Introduction to Artificial Intelligence - Technical University of Denmark

drawing

chinese-checkers-ai's People

Contributors

jepmik avatar kubekj avatar termanemil avatar zedrichu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kubekj

chinese-checkers-ai's Issues

Benchmark the results

  1. Count the number of states generated
  2. Measure the time of runtime
  3. Use different depths for min-max
  4. Use different heuristics (Weights, distinct\single heuristic)
  5. *Running in cloud
  6. *Try comparing without the cutoff function

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.