Simple AI Engine for the Oware Game

Sometime ago I worked with a friend on building an Oware game. I was supposed to build the AI engine, and he was supposed to build the user interface to it. Unfortunately, while AI engine interface I designed and a simple alpha-beta pruning engine was implemented, the project was never completed.

Screenshot of game session
Screenshot of game session


Instead of letting the project just sit and wait until it will be redeemed and completed I’ve decided to release my code. It consists of a simple terminal user-interface and an AI opponent. Compiling is straight forward and doesn’t require any special libraries. You can obtain the code from here: oware-0.1.tar.bz2 [15.1 KB].

tar xvf ./oware-0.1.tar.bz2
cd oware
g++ main.cpp ai/basic_ai_engine.cpp -o oware

Running the program is pretty simple, just type ./oware. You will be prompted to select the level of the AI opponent. The higher the number the slower and better the opponent will play. I suggest starting pretty low, and climbing up untill you find it challenging. The houses (holes) are numbered from 0 to 11 starting with the bottom left hole (yours) and going counter-clockwise.

The game is licensed under the GPLv2 or any latter version, so fill free to hack and improve the game if you have time.

2 thoughts on “Simple AI Engine for the Oware Game”

  1. Hello Guy

    I’m currently working on my own Oware project for my brother and myself. I’m currently looking at what other people did for their games to get ideas and came across your link for the code. Yet the link you posted does not seem to be working, could you please suggest another way I might be able to get the code from you.

    Thanks

    Dries

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.