|This is the archived CodeCup 2023 website.|
Click here to go to the new CodeCup website.
Entropy is an abstract strategy board game for two players designed by Eric Solomon in 1977. The game is based on the eternal conflict in the universe between order and chaos. One player is Order, the other Chaos. Order is trying to make patterns vertically and horizontally. Chaos is trying to prevent this.
The game originally employed a 5×5 gameboard, but in 2000 a 7×7 board was introduced to allow deeper strategies. So, in the CodeCup we play it on a 7×7 board.
The gameboard is a square grid of 7×7 cells. A match between two players consists of two games. Each game starts with the board empty, and a bag containing 49 chips in seven colours. The first player to move (Chaos) draws coloured chips at random from the bag and places each one on the board in an empty cell. For each chip that is placed, the second player (Order) may slide any chip horizontally or vertically any distance through empty cells, to rest in a currently empty cell. When the board becomes full, the game is finished.
Order scores 1 point for each chip in any palindromic pattern of chip colours (e.g.
Example of the calculation of points on a final board
In the CodeCup, two games are played each round for each player, one game as Chaos and one game as Order.
The numbers 120 and 280 consist of 200 points that is awarded if you do not make mistakes and the 80 points, we think, is close to the average score that is made in a common game.
A communication protocol has been designed for your program to communicate with the judging software.
If your player is Chaos, the first line you will read is "Start".
Your program must first read the colour of the first chip and then must output the first move.
An example of a move is
Note that Chaos always reads the colour of the next chip before he can output the next move. When there are no moves left to play, you will receive one final "Quit" instruction. If your program makes an illegal move you will be sent a "Quit" instruction as well. This should allow you to send debugging information to standard error.
Example communication of a normal game
For the competition each player plays each other player exactly twice, once as Chaos and once as Order. The overall winner of the competition is the player with the highest number of points overall.
If your program exceeds the time limit, crashes or makes an illegal move, your program will receive 0 points. The play is resumed using a player, controlled by the jury, that randomly plays moves so that your opponent can still score points. See the technical rules for more information about this.