Guy Rutenberg

Keeping track of what I do

Simple AI Engine for the Oware Game

without comments

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.

Share and Enjoy:
  • del.icio.us
  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google Bookmarks
  • Simpy

Written by Guy

August 19th, 2009 at 1:54 pm

Posted in C/C++,Projects

Tagged with ,

Leave a Reply