This is the archived CodeCup 2013 website. Click here to go to the new CodeCup website. |
The Rules of SympleSymple is a turn based game where two players compete against each other by placing stones on a 15 x 15 board. Players get points for each stone of their colour on the board; they lose points for the stones being in different groups. DefinitionsThe board consists of a grid of 15 x 15 lines. These lines create 225 individual intersections called points. Initially all points are vacant. Orthogonally connected stones of one colour form a group. A single stone that is not connected to any other stones is a group by definition. PlayersThe game is played by two players, White and Black. White moves first. When it is a player's turn a move has to be made. Moves
Each turn a player must choose which move to make. There are two types of moves:
Note that if a player choses an expansion move, he must place his stones so that at the end of his move there are no points where another stone could be placed without breaking the expansion rule. Balance of powerIn order to compensate for any advantage to White for playing first Black has a special move. If no player has expanded yet, Black has the option of expansion followed by exploration in the same turn. Obviously this move can be used at most once during a game. Examples
The following images show several situations that may occur during a turn.
Object of the gameThe game ends when the board is full. The score of each player is determined by counting the number of stones he has placed on the board. For each separate group 6 points will be substracted. Note that at least 6 points will be substracted since the stones will always form at least one group. The minimum score is 0; during this tournament only a negative score is converted into 0. The player with the highest score gets 100 bonus points. Illegal movesIf a player makes an illegal move, crashes, or runs out of time, this player gets a score of 0. The jury software will take control of the problematic player and will finish the game for this player. The jury software will find all legal moves in an undisclosed yet deterministic way and will make the first legal move it finds. This method will allow the second player to score points. If the second player also makes an illegal move later during the game this player also receives a score of 0. Playing the gameYou have to write a computer program to play the game. Your program will never communicate directly with your opponent; instead you communicate with the jury program using standard input (stdin) and standard output (stdout). Your program should read information from the jury program from stdin and write your moves to stdout. Your program must begin by reading from stdin. The jury writes 'Start' on stdin for the White player. The Black player receives the first move of the White player on stdin. This means you have to determine yourself whether you are Black or White based on the first line that you read. Your program determines a move and writes this move to stdout. After making a move your program should read the move of the opponent from stdin. Any move that you read from stdin is guaranteed by the judging software to be a legal move. Note that all moves will be terminated with a newline. You must flush your output after each move. The program must continue until the text 'Quit' is read on stdin. This indicates that your program has to terminate normally. In the case that no more input is expected, your program may quit by itself. Example GameThe following table describes a sample game. For each consecutive move the table shows what a player had read on stdin, and what was written to stdout.
Time limitYour program has a total playing time of exactly 30 seconds for all moves combined. The jury computer uses an Intel Xeon E5405 running at 2.0 Ghz, with 64 MB memory available for your program. You can decide how to divide the 30 seconds over the various moves. Your program is suspended when the system receives your output and turned to an active state when there is input for your program. Only your active time is counted towards the timelimit. About CodeCupCodeCup is organized by the Nederlandse Informatica Olympiade (NIO), the Dutch Olympiad in Informatics. The competition is hosted online and can be followed live on the internet. Programmers from all over the world can enter the CodeCup competition. CodeCup staff and NIO staff do not participate. More informationClick here to watch a sample game. For more information on tactics have a look at http://www.mindsports.nl/index.php/arena/symple/. |