GSOC: My PC can play mancala too !!!

My PC have already learnt how to play mancala. I would like to know you how it can play mancala !!! But, before this I want you to introduce something worthy:

There are a lot of traditional mancala games available. I am working on African two row mancala games. These games are also diferent in many cases. http://www.wikimanqala.org/wiki/Main_Page

The games I am implementing are:

Kalah: This is the only modern mancala game I have implemented. The reason behind is, it is one of the most popular mancala games in the world. It is a single lap game, anticlockwise rotation, comprising of bonus turn and cross capture rules.

Oware: It is a traditional game from Ghana . It has many variations and I adopted the abapa. Quite different from Kalah game, no bonus turn or cross capture, but new rule of capture named count and series capture. It is also anticlockwise.

Barbados_warri: An oware version in Barbados, quite similar to oware with some little difference.

Bechi: A game from Eritrea, quite complex rotation rules, supports both clockwise and anticlockwise rotation. Single lap, count and series capture rules are supported.

Dakon: The all previous games I discussed were single lap games. Dakon is a multiple lap game from Java Island. The other rules are similar to kalah.

Sungka and chungka: These games are not much different from Dakon. Sungka is from Phillipines and Chungka from Mairian Island(Oceanea).

To know detail about these games and other such games, go to http://wikimanqala.org.

Now, come to the point. What my program is doing:

For every type of game, I have a theme file named with the game name like kalah.svg. I am also having rule of the game with the same name convention ( kalah.xml ). The name of every game is written in another xml file gamelist.xml.

When the program starts:

Screenshot

It reads the gamelist.xml file and creates buttons dynamically according to the names. So, if you click new game, you will find every available games listed in gamelist.xml. Just click a name from new game menu and play the game.

When the game starts, it reads the gamename.xml file where all rules are defined and draw the board(default game is kalah) initially. All the rules of the game are maintained in the GameInfo class.

There is a GameController class which controls all the movements of human and computer, turn making, scoring(with help of score class) etc. The computer movement comes from the MoveGenerator class.

I have implemented 3 versions of AI, easy,medium and hard(not graphical option yet), depending on the search depth of the game-tree. I have to adopt the normal minimax algorithm(with alpha-beta pruning) for mancala. There are still some scopes to improve the evaluation function.

Shortly to say, I have implemented a Human to Computer playable graphical mancala game already. I have animated the movements, but there are still much problems in the animation and I have to work on it.

On the next few days, what Should I do??

At first, I will implement game difficulty options graphically(Will start it right now). In the next few days, I will improve the animation and the graphical interface. I also want to implement a game with Indian-lap Style or pussa-kanawa lap(the only sowing style left to support) to make my program support Indian style games also. Then, if I get time, I will try to implement human to human playable game through the net.

So, I hope, some blog writings are yet to come in the next few days …

7 Responses to “GSOC: My PC can play mancala too !!!”

  1. pvandewyngaerde Says:

    is this the bantumi game ?

    • mahfuz062 Says:

      yeah, the rules of bantumi I found on the net and kalah are similar. But, my game includes some other mancala games along with kalah(or if you like to say bantumi). But, the name of the game is kalah according to wikimancala. See here

  2. pano Says:

    The”human vs human over the Internet” idea is great!
    It has been such a long time the last time I played this game (it was on an old Nokia Mobile Phone :-D haha)
    Looking forward to see this game running on my laptop :-)

  3. GSOC WrapUp : Mancala « Mahfuz062’s Blog Says:

    [...] Mahfuz062’s Blog Just another WordPress.com weblog « GSOC: My PC can play mancala too !!! [...]

  4. Reg Scanner Says:

    I seriously loved reading through this write-up. I most certainly will be returning to read even more fascinating views. With thanks.

  5. Jack Says:

    You can play Mancala over the internet at Mancala Time

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.