Skip to content

OMerkel/Oware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UCThello icon Oware / Ouril

Keywords, Categories MCTS, Monte-Carlo Tree Search, UCB, Upper Confidence Bounds, UCT, Upper Confidence Bounds Applied to Trees, AI Player, Board Games, Games/Entertainment, Mobile, Abstract Game, Perfect-Information, 2-player Strategy Game, Mancala, Oware, Ouril

This is an implementation of the two-player abstract perfect-information strategy board games Oware and Ouril for HTML5/Javascript/CSS platform. Via options menu the computer players can be activated playing one or both sides. The computer AI player has a Monte-Carlo Tree Search (MCTS) algorithm implemented. Per default two human players are selected.

Oware (in Akan language) - a traditional game from Ghana, Africa, is a Mancala (Manquala) game.

Ouril (aka Uril, Ouri, Oril) as played in the Republic of Cabo Verde has slightly different rules compared towards Oware. Ouril is popular in Portuguese influenced countries, too, due to former Portuguese colonialism adopting parts of African culture.

Playing Oware on Android tablet, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Screenshot of Oware session on Android mobile phone, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Playing Oware on Android tablet
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Screenshot of Oware session on Android mobile phone
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Switching to Ouril rules in options menu and select the AI MCTS computer player, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Playing Ouril on IPad, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Switching to Ouril rules in options menu and select the AI MCTS computer player
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Playing Ouril on IPad
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Oware/Ouril installed on iOS home screen, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-NonDerivative 4.0 International License. Playing Oware on IPad in fullscreen, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-NonDerivative 4.0 International License.
Oware/Ouril installed on iOS home screen,
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Playing Oware on IPad in fullscreen,
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

There is a wide ranged class of games called Mancala (Manquala) games. Often the term Sowing Games is used, too.

The term Mancala (also Manqala, Mankala) is derived from the Arabic term naqalah ( نقل ) with its meaning to move an object. These class of games are well known worldwide. Nonetheless rules, structure of fields on board and even number of players strongly varies from game to game depending on geographic location, language and culture. Such that eventually the same game plus rules set could be found under a different name, too. Still the origin seem to be quite clear for specific types at least.

As a common aspect of these Mancala games the basic rules set on each player's turn is quite equal. A turn usually is performed by picking up the whole amount of tokens available on a chosen container on board first. Then this picked up set of mostly one single sort of game tokens is distributed following a path on board formed by such containers holding the tokens.

Distribution on a player's turn is called sowing. Thus these corresponding games are known as Sowing Games, too.

These containers are often named fields, trou (in French), pits, holes, depressions, houses or bowls. Some games come with different types of such containers. Mostly an additional non standard type of container is just used for holding tokens representing the current player's score. The score is reflected by the amount of tokens contained. These larger size bowls might be named stores or simply Mancalas. If such stores do not exist then tokens might simply be scored by removal from game play staying offboard for the rest of the game.

Typically the tokens are represented by some game pieces like seeds, beads, beans, nuts, stones, cowry shells, or any sort of counters. Most Mancala games use undifferentiated tokens.

In case of a fixed sowing path the bowls can be indentified or ordered by a simple index numbering. You might find terminology like a player's side or ranks or rows belonging to a player. In that case the player is allowed to start his turns by picking up all tokens from any non empty bowl being controlled by himself.

The rules currently realized in this software project are commonly known as Oware, Awari, Wari, Awélé, Awalé, Aualé, Ayò depending on the geographic origin, culture and language spoken (Ghana and Côte d'Ivoire (Akan / Yoruba), Nigeria, Cabo Verde, plus other regions).

Additionally the options menu allows modification of the application behavior so Ouril (also known as Uril, Ouri, Oril) can be played.

These rules will be described inside the Oware application as well.

Oware Rules

Game Components

This Oware implementation uses a game board with 12 bowls in total - consisting of 2 rows having 6 bowls each. Initially each bowl holds 4 Bonduc seeds.

Initial board position in Oware, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Initial board position in Oware, 12 bowls containing 4 Caesalpinia Bonduc seeds each, one player starts turns in lower row ranged from bowl 1 to bowl 6, other player starts turns in upper row ranged from bowl 7 to 12.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Objective

Objective of the game is to get a higher score than the opponent. This is done by harvesting more seeds than the opponent. The harvested seeds represent the score.

Turn Sequence

Players' turn alternates between the two players. A player's turn consists of the following phases

  1. Picking Up Seeds, then
  2. Sowing, followed by
  3. Harvesting.

Picking Up Seeds

The player starts own sowing turns from any non empty bowl of his choice in the row next to his own side. The whole content of the bowl is picked up leaving the bowl empty.

Sowing

Direction of game play is counter clockwise here in a circular sowing path. If reaching bowl 12 then continue on bowl 1 if necessary. The sowing starts adjacent towards the selected bowl in counter clockwise direction now. Although the seeds were picked up from an own bowl sowing is performed on all bowls. Such that the other player's row is included, too, interacting with the opponent's side of the board.

Sowing is performed with exactly one seed per bowl following the consecutive bowls in counter clockwise direction.

Example of an opening turn, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Example of a player's opening turn: Assume the player decides to pick up all 4 seeds from bowl 5. Finally the turn ends by sowing in counter clockwise direction in bowl 9 here.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Harvesting

A player will score (also called harvesting) on sowing the last seed of his turn into an opponent's bowl holding exactly 2 or 3 seeds including the last one sown. This is done by taking these seeds out of game play and scoring these.

How to harvest? Own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
How to harvest? Assume the board situation shown in the diagram above. Opponent scored 2 points already. The active player can decide to pick up seeds from either bowl 1, bowl 2, bowl 4, or bowl 6. Only bowl 4 and bowl 6 will allow to harvest seeds as follows…
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Variant: Picking up the 7 seeds from bowl 4, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Variant: Picking up the 7 seeds from bowl 4, then sowing these will distribute the last seed into bowl 11. Since bowl 11 contains 2 seeds now these will be harvested. Player's score is increased by these 2 seeds.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

In case of previous direct adjacent bowls (in clockwise direction) being opponent's bowls, too, holding exactly 2 or 3 seeds, these are taken away being scored as well. Reaching any other bowl without any seed, just one seed or four or more seeds will end the scoring even if any further opponent's bowls are containing exactly 2 or 3 seeds not being directly adjacent.

Variant: Alternatively picking up the 6 seeds from bowl 6, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Variant: Alternatively picking up the 6 seeds from bowl 6, then sowing these will distribute the last seed into bowl 12. Since bowl 12 contains 3 seeds now these will be harvested. Previous bowl 11 being directly adjacent is scored with 2 seeds, too. Bowl 10 does contain neither 2 nor 3 seeds so stop harvesting. Player's score is increased by these 5 seeds in total.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Special Situations and Rules

Bowls containing a huge amount of seeds (like more than eleven seeds) are called Kroo. In case of picking up a Kroo the sowing will reach the chosen starting bowl of the turn again. Then seeding into this starting bowl is skipped each time. Such that this bowl will remain empty in the end of this player's turn.

Bowl 4 is a Kroo with a high amount of 16 seeds, own work, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Bowl 4 is a Kroo with a high amount of 16 seeds.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Player decides to pick up the Kroo containing 16 Bonducs here. Reaching the initial bowl it is skipped. Bowls 9, 8, and 7 are scored with 9 seeds in total, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Player decides to pick up the Kroo containing 16 Bonducs here. As seeding is reaching the initial bowl it is skipped. The last Bonduc is sown in opponent's bowl 9 and the player scores 3 seeds. Previous opponent's bowls 8 and 7 are scored, too. Thus the player scores additional 9 seeds in total.
Own work, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Taking and scoring all remaining seeds of the opponent's row completely at once is called a Grand Slam. Such a Grand Slam is strictly forbidden in Oware and the player performing this action will lose immediately even if the player gets the majority of total seeds this way. Thus after each scoring at least one seed must be left over on the opponent's row. Ending a game with a Grand Slam is a forbidden move.

Assumed the opponent ends his turn removing the last seed on his row by himself: The opponent's move is totally valid and game continues. In such a case then a player is not allowed to end his turn without a remaining seed for the opponent's turn if avoidable. Such that the player is forced to prefer any move that gives at least one seed being sown in an opponent's bowl then. In case this is not possible the game ends, the remaining seeds on board will not be scored and the player with the higher score wins.

By mutual agreement players can end the game, too, at any time. In that case each player scores the remaining seeds on the own row. The player scoring higher wins.

Such that the game could end as a draw on equal scores.

Typical Oware Game Material

If you are looking forward to getting a typical Oware game (Ghana) then the chance is quite high that the board shall be made of Sese (Esese, Osese) wood carved manually. Such handcrafted Oware sets are available in simple travel editions made of two similar half boards that can be folded to hold the game tokens securely then. Often these boards come along with decorative crafted and carved traditional themed patterns or motifs.

Folded Oware set with traditional ancient African pattern, Own image, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Folded Oware set with traditional ancient African pattern
Own image, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Please be aware and respect that motifs might include Adinkra symbols with partly religious meaning or background. Popular is the use of Adinkra symbol Gye Nyame that could translate to Except God (I fear none) (supremacy of God) or Nyame Ye Ohene (meaning God is King), Akoben (representing a War horn, symbol of valor), Sankofa (meaning that it is acceptable or feasible to retry or to learn from the past or go back and get or pick up anything you might have forgotten, this sign of wisdom is often misinterpreted as being a heart or love symbol).

Adinkra symbols with partly religious meaning or background, Own image, Oliver Merkel, Creative Commons License, This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Adinkra symbols with partly religious meaning or background:
Gye Nyame, Akoben, Sankofa
Own image, Oliver Merkel,
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Typical tokens controlled by the players could be nickernuts. These are tropical seeds of a shrub called Bonduc (Latin, botanical: Caesalpinia bonduc). Bonduc seeds are widely used for traditional African jewellery due to it's clay alike precious look and can be found as a medical ingredient as well. Such that there is a good chance of getting a spare set of Bonduc seeds if for some reason yours get incomplete.

The more puristic travel edition could simply be formed by some pits on a sandy beach using any type of tokens you prefer of course. This solution is quite traditional, too.

Surely some priceless unique or antique Oware sets can be found up to the size of a whole table. Watch out and find some of these gems using your preferred web search engine.

Oware and its Origin

With given rules as presented here today's name of the game is Oware. Oware is an Akan culture term. Commonly reported Oware is related to Opoku Ware I. (* 1700; † 1750), a former monarch of the Ashanti(Asantehene).

In Akan language ware means to be married. Various sources exist telling legends about couples playing the game Oware endlessly - finally marrying to continue playing.

Ouril Rules

Ouril has slightly different rules compared towards Oware.

Picking up single seeds from own bowls is allowed only as long as none other own bowl is holding more than single seeds.

A Grand Slam is allowed under certain conditions:

  • The player performing a Grand Slam must take another turn skipping the opponent's turn.
  • In this following turn the move must be chosen so that afterwards the opponent's row will hold one seed at least. If this is not possible at all then the players harvest the remaining seeds on their own rows.
  • As an exception a Grand Slam is allowed without additional moves, too, if this way the player gets the majority of total harvested seeds winning the game.

Computer AI Player

Just a few words on the implemented AI computer player. There is no specific level setting implemented yet. It plays quite strong but good human players do definitively still have a chance to win against the computer opponent. The implemented AI does not play a perfect game.

It does not claim a win explicitly even if it has won already, e.g. by capturing more than half of the overall available Bonduc seeds. So you can decide to play until the very bitter end has been reached.

Contributors / Authors

Oliver Merkel,
Creative Commons License
This image is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Oliver Merkel, Creative Commons License, This image is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

All logos, brands, and trademarks mentioned belong to their respective owners.