# Gounki

Gounki is an abstract strategy game in which pieces can combine and disperse to affect their movement possibilities. Played on an eight-by-eight square grid, the goal is for a player to move their pieces off the opposite end of the board while preventing the opponent from doing the same.
It was invented by Christophe Malavasi in 1997.

## Rules
### Starting position

Gounki is played on an eight-by-eight square.
Each player has eight round pieces and eight square pieces, placed alternating on their first two rows (square pieces are on black squares of a classic chessboard.)

### Course of the game

On each turn, the player chooses whether to make a movement or a deployment.
Rounds pieces move one step in diagonal, always forward. Squares pieces move one step on the left, on the right, or forward.

### Movement

When a player moves his pieces, he may stack them above some of his other pieces, as long as he does not try to combine more than three elementary pieces altogether. If a combined piece comprises X rounds and Y squares, it may move up to X steps like a round, or up to Y steps like a square.
Combined pieces cannot :
* Change direction during a movement: a double square cannot move diagonally by combining a movement on the side and a movement forward.
* Play a square movement and a round movement during the same turn.
* Jump above other pieces.
* Move a piece partially and let part of it on its starting point.

#### Captures

Just like in chess: if an opponent's piece is where you mean to go during a movement, it is captured.

### Deployments

The second (and last) kind of move is the deployment.
When deploying a piece, you separate all the simple pieces making a composed pieces. You separate a simple piece by moving its parent composed piece like this simple piece.
After this movement, the simple piece is separated from its parent piece.
All the rounds are deployed, then all the squares, or all the squares followed by all the rounds. It means you should not, for instance, deploy a round, a square, then a round again. You can deploy above your own pieces, as long as you don't build bigger than triple pieces.
You should not :
* Capture during a deployment. Thus, deployments involving opponent pieces are not possible.
* Change direction between deployment of two simple pieces of the same kind.
* Deploy a piece partially.
* Step back.

### Bounds

Pieces mays rebound against the side during their movements or deployments.
Examples:
* A round-round-square on b2 can have a b2-b4 movement or a b2*a3,b4,c4 deployment rebounding on left side.
* Using a rebound, square-square-round on a3 can deploy and recombine over itself: a3*b4,a4,b4+

## Game example

This game has been played on 8 March 2004 between Matthieu Walraet and MGounki.
* Matthieu Walraet is the best ranked human player for now (25 June 2004)
* MGounki is a Gounki-playing program.
| | MGounki | Matthieu Walraet | Notes |
| 1. | a1-a2+ | a8-b7+ |
| 2. | a2-b2+ | a7-b7+ |
| 3. | b2- b4 | e7-d7+ |
| 4. | b4-c5 | c7-c6 |
| 5. | c5*d5,e5,f6 | g7-f7+ |
| 6. | f6-e7 | f7xe7 |
| 7. | d1-e2+ | b7-b5 |
| 8. | f1-e2+ | b5-b4 |
| 9. | d2-c2+ | b4*a3,b2,a2 | Note the deployment with rebound. |
| 10. | c1-b1+ | a2-a1 |
| 11. | b1xa1 | b2xa1 |
| 12. | e2-b5 | a1-Out |