Skip to content

This is the AI we created for a university course. It plays the famous game, Kalah.

Notifications You must be signed in to change notification settings

WenqingZong/Kalah_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kalah AI

A MCTS AI we created for an university course. It plays the famous game, Kalah.

Authors

This project is developed by Feifan Chen(陈非凡), Xiaotan Zhu(朱笑谈), Yirong Yu(俞奕戎), and Wenqing Zong(宗文卿).

The Kalah Game

See a brief introduction here. But in this project, we are playing the 7 * 7 version. Pie rule is applied here to cancle out first player advantage.

Our Approach

We used MCTS algorithm with some improvement to implement our AI agent.

Our improvement follows these research papers:

How To Run Our Code

  1. Please download and open our project in IntelliJ and accept all default settings.

  2. Open IntelliJ, click the green "Run" button.

  3. Terminate it, we merelly want IntelliJ to build our code.

  4. In Test_Agents folder, run ./compile.sh for MacOS and Linux, or .\compile.bat for Windows.

    • If you want to see two agents playing agaist each other, in Test_Agents folder, do:
    java -jar ManKalah.jar "java -jar <FirstAgent>" "java -jar <SecondAgent>"

    where <FirstAgent> and <SecondAgent> can be (and must be) replaced by a jar file in Test_Agents folder.

    • If you are lazy and you are using MacOS or Linux, simply do:

      ./run

      This will test our AI agent again all four test agents with both being player 1 and player 2.

    • If you want to play against our agent (or any other agent), open a ternimal, do:

      nc localhost 12345

      and then in Test_Agents folder, do:

      java -jar ManKalah.jar "java -jar <Agent>" "nc localhost 12345"

      The first argument indicates the first player, the second indicates the second player. For our protocal, please see doc folder for more details.

About

This is the AI we created for a university course. It plays the famous game, Kalah.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published