Players take turns adding a ball of their color to an empty position on the board or on a 2x2 platform formed by 4 other balls.

Balls of a same color form groups by touching each others. In the figure below, the 5 white balls on the left form a group, the single ball at the bottom right another one.

A group of balls must always have at least one empty position at layer 0 next to it. Otherwise, all the balls form this group are removed, except the ones that support an opponent ball. In the next figure, if white adds a ball at the top left corner, the 3 black balls around will be removed.

As in Go, the Ko rule applies: it is not possible to add a ball that will result in a state similar to the previous round. In the left figure below, white plays at the top left corner, resulting in the figure on the right. Then at the next move, black cannot play at second row , first column, otherwise we would loop back to the first figure.

Suicide is not allowed: players cannot add a ball that results in having some of their balls being removed.

Overpasses cut underpasses: only visible connections count. So in the following figure, the white connection across the top (visible) cuts the black connection that it passes over (hidden). As a result, there are 2 black groups and 1 white one.

When a player cannot add a ball anymore, the winner is the player with the most balls.

More information on Margo official site and/or read the Margo Basics book.