/urubugu

This is the code of the Burundian version of the bao game.

Primary LanguagePython

Description.

This repository contains the code for URUBUGU (ikibuguzo, Igisoro): a variant of the Bao game that is played in Burundi. URUBUGU is a two player turn-based board game.

Structure:

1. Getting started

a. Prerequesites.

b. Run the code.

After downloading and installing python and the necessary libraries, the user have to run the following command to play the game:

  • On Windows, Unix-like systems and Mac OS:

python3 main.py 
  • Exclusively on windows:

The user can download the following file "Executable Files/urubugu v1.1.zip" and launch the .exe file in it.

c.The GUI.

When the code is executed, this pygame window will appear.

initial state

On the menu screen, the user can switch between the "versus computer mode" or "player versus player" mode by clicking on the slider button in the top center of the window. The default setting is "player versus player".

VS CPU

The user can also choose his favorite language by clicking on the flag appearing in the top left corner of the window. The displayed flag is the current language, by default, the language is English.

changing language

To start a game, the user has to click on the play button.

start playing

According to the rules of "URUBUGU", the players can set up their board as they wish before the start of the game. Our version gives the possibility to only one of the players to do so, the other one has to use a default setting.

setting up board

d. Commands.

d → change design.

Skin change

2. Rules.

The board is divided in two, each player has half of the board as his base. Players play facing each other. image board divided in two symmetrical parts. empty board

In each players base there are two zones, an active zone and a "cemetery". The active zone is the zone where a player can capture opponent's beads, in the "cemetery", the player can either go around and come back in the active zone or he might end his turn (more details in the [playing] section.

player 1 half.

a. Setting up the board.

At the beginning, each player has 32 beads and each player is free as to the disposition of his beads. There no prohibited settings.

The default setting is a two-beads-by-cell setting.

image

b. Playing.

Start of turn:


To start a turn, the player takes the beads in any non-empty cell and spreads it's content in the direction of the play (counter-clockwise).

Capturing beads:


If the last bead falls in the active zone, and there are beads the adjacent cells in the opponent's base , the player will capture those beads and restart to play from the origin of his play. capturing 1/2 capturing 2/2

If the adjacent cells in the opponent's base are empty, then the player will take the beads of that cell (if the cell was not empty) and spread it's content in the direction of the play (counter-clockwise) until the end of his turn.

Adjacent empty 1/2 adjacent empty 2/2

End of turn :


A turn is ended in two cases:

  1. When the last bead of a play falls into an empty cell in the cemetery. end turn 1
  2. When the last bead of a play falls into an empty cell in the active zone and the adjacent cells in the opponent's base are also empty. end turn 2

c. Winning.

To win, a player must capture all the beads from the opponent : player wins, if and only if all of the 64 opponent's beads are in his base. image

3. Strategies.

In this section, we give two strategies (among a plethora of other strategies) to give a gist of what can be done in this game.

a. Defensive strategies.

a.1. Spreading.

Spreading is a strategy where the player spreads the content of one cell, so as to fill the most cells. That strategy gives more chances to the player to capture ennemy's beads in two turns.

spreading 1 Spreading 2

b. Offensive strategies.

b.1. Decapitation.

The decapitation's main objective is to prohibit the opponent to captuure any of our beads in his turn. The player will capture the beads from the left corner of the opponents board (the head) .

decapitation

4. Future work.

a. Online version.

The online version of this game is in developpement, a first step has been reached: players can play against one another on a local network, the next step is to launch it over the internet for players to interact from all over the world. But a deployment on internet comes with financial costs, that is why it has been put on hold for now.

b. Artificial Intelligence (AI).

One of the next steps of this project is to develop an artificial intelligence model capable of playing against a player. This AI would also facilitate simulations in the context of research.

c. Research questions.

This game has many opportunities to explore in terms of research, the intuitive questions are:

" Is there a counter setting for each setting?"

" If there is a counter-setting, how can we compute it?"

But there are also some non-trivial questions like:

" How initial settings influence the game? "

In Conclusion, there are many avenues to be explored in this game.


We define by counter-setting a setting that insures a "one-play-win" ("IMPAGA") to the player who starts.