Coder Social home page Coder Social logo

kalah-game's Introduction

Implement agent to play game of Kalah

  • The program reads one command-line argument (1 or 2), indicating whether the program should assume the role of Player #1 or Player #2.

  • The program reacts to commands "move", "opponent " and "quit", and prints a representation of the game state each time it changes

  • Error message will be displayed if

  1. a wrong command is entered;
  2. an ID for bowl that does not belong to the player is entered;
  3. the bowl ID entered has no stones left.
  • A message will be displayed if
  1. a player gets an extra move.
  • The rules for moving stones is implemented based on 'the Rules of the game Kalah'

  • The alpha-beta search is implemented by following the Alpha-beta algorithm on p. 170 in the textbook. The following modifications are made,

  1. the terminal test is replaced with a cutoff test.
  2. a heuristic evaluation function instead of the utility function is used.

kalah-game's People

Contributors

lvncnt avatar

Watchers

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