Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.88 KB

README.md

File metadata and controls

33 lines (20 loc) · 1.88 KB

Chain-Reaction-Game-AI-Bot

This is a AI bot for Chain Reaction game using minimax algorithm with alpha-beta pruning and killer move heuristic. This implementation is not guaranteed to be accurate. I tried to implement it in a very short time for CSE Fest AI Contest of BUET CSE, 2019. If there is any mistake you find in this code, feel free to create an issue or mail me at shamiulhasan93@gmail.com

This problem is an underrated AI problem. This problem need more attention from CS people. It's quite a hard problem to solve.

Caution

As I had very little time to implement it, I am not hundred percent sure about the accuracy of this implementation. There may be bugs and in many ways it might get improved. But for the time being as I played against another bots with this bot, I won several times. So, I am not going to make it more perfect for the time being. If I had more time, I would give it more time to make it better. I will try to make it better in near future.

Understand the algorithm and read the code carefully to find bugs before using it for another purposes.

Game link in play store - https://play.google.com/store/apps/details?id=com.BuddyMattEnt.ChainReaction&hl=en

A good read about the heuristic - https://brilliant.org/discussions/thread/artificial-intelligence-for-chain-reaction/

For understanding read - Chainreac-with-comment.java file.

THIS CODE IS WRITTEN IN FILE MODE

Description of my submitted files -

  1. Chainreaction.java is the player code file.

  2. my_script.sh is the shell script file to run this file on linux terminal.

  3. Copy these 2 files in the same folder as aicontest.py and shared_file.txt.

  4. Then pass argument to the java file from command line. I used my_script.sh for solely this purpose. Run this script with

      ./my_script.sh

This is the Youtube link of the gameplay.