A downloadable game for Windows

This project is an extension of an AI course I took in university that focused on creating an adversarial search agent for the board game Konane (Hawaiian Checkers). I decided to recreate this project in Unity so that I could learn the development engine, improve my C# skills, and deepen my understanding of the underlying AI principles being used. For those interested, I'll detail the technical specifications and references below. Otherwise, enjoy the game! Please drop me a message with any feedback you have or any significant bugs you find (I'll list some known issues I deemed acceptable below). 

AI Details:

My university project utilized the minimax search algorithm and was written in C. This was an unwieldy decision and lacked major optimizations that were sorely needed. This project, written in C#, utilizes the Negamax framework, which is a variation of minimax. I've included alpha/beta pruning and a move ordering system that further optimizes the search algorithm, drastically cutting down on the number of leaf nodes being evaluated. I've explored implementing a transposition table but ultimately decided against as my plan is to move on to other projects.

Acknowledgements:

Up front I have to acknowledge the work of Sebastian Lague, whose excellent YouTube videos on alpha/beta pruning and chess AI were hugely helpful in my understanding of the search algorithm. His chess project significantly improved my understanding of Unity as I studied how he generated his chess board programmatically, which was truly fascinating. After understanding the fundamentals of Unity I was able to take off in my own direction as the rule set for Konane is very different from Chess.

Sebastian Lague's Chess Video

For those interested in AI, I also highly recommend Russell and Norvig's excellent AI textbook - Artificial Intelligence: A Modern Approach. It covers a whole host of fascinating AI topics well beyond what is used in this small project.

The chess programming wiki was also a huge help in troubleshooting and understanding board game programming concepts.

Chess Programming Wiki

Known Issues:

  • The first opening move by the AI doesn't have a delay on deleting a piece despite being placed in a coroutine (despite my best efforts to 'pause' the game when animating a move, player actions are still allowed - if anyone knows how to solve this issue please leave a message).
  • Players can interact with the game board while the AI is having its move animated. Technically the AI has already chosen its move, the animation is purely for the player's benefit.
  • Corner squares can be selected when clicking slightly outside their bounds in some instances (Should be minimal actual impact to the game).
  • The move ordering algorithm I created needs to be further optimized for the AI to be more challenging. I tested higher depths but the performance cost ballooned to much. Something I may revisit in the future.

Download

Download
Konane.zip 26 MB

Install instructions

Simply download/extract the zip file and run the exe!

Leave a comment

Log in with itch.io to leave a comment.