A MCTS AI we created for an university course. It plays the famous game, Kalah.
This project is developed by Feifan Chen(陈非凡), Xiaotan Zhu(朱笑谈), Yirong Yu(俞奕戎), and Wenqing Zong(宗文卿).
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.
We used MCTS algorithm with some improvement to implement our AI agent.
Our improvement follows these research papers:
-
Please download and open our project in IntelliJ and accept all default settings.
-
Open IntelliJ, click the green "Run" button.
-
Terminate it, we merelly want IntelliJ to build our code.
-
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 inTest_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.
- If you want to see two agents playing agaist each other, in