- Have more discs than your opponent.
A higher resolution is required to access the IDE
- 52
Learning Opportunities
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Statement
The Goal
The goal of the game is to have more discs than your opponent.
Rules
Grid:
Game is played on an 8x8 board.
The grid notation is represented in the image below:
The board always starts with 4 discs placed, represented in the image below:
Turn order:
Legal action:
Resolution of a turn:
Output
Game is played on an 8x8 board.
The grid notation is represented in the image below:
The board always starts with 4 discs placed, represented in the image below:
Turn order:
- Player 0(red) is assigned black pieces and Player 1(blue) is assigned white pieces.
- Black always go first and white goes next.
Legal action:
- The action must be done on an empty square, this square must also be adjacent to at least one opponent disc, this square must also be placed so that at least in one direction (horizontal, vertical or diagonally) there is a disc of the player playing, the disc must form a line over the opponent disc/discs, all the opponent discs that are on this line are flipped, if there are multiple lines, all the discs will discs affected will be flipped.
Resolution of a turn:
- A bot must output the coordinates of the square where he wants to place a disc.
Output
- If the coordinates are outside of the board, the game will end and the other player will win.
- If the coordinates are inside but the square at those coordinates already has a disc, the game will end and the other player will win.
Expert Rules
- If a player has no legal moves, his turn will be passed.
- If both players have no more legal moves, the game will end and the player with more discs will win.
- If both players have the same amount of discs at the end of the game will end in a draw.
Victory Conditions
Loss Conditions
- Have less discs than your opponent.
- You do not respond in time or output an unrecognized command.
Game Input
Initial input
First line: The id of the player(id)
Second line: boardSize: the number of rows and columns on the board.
Second line: boardSize: the number of rows and columns on the board.
Input for one game turn
Next boardSize line: a string of characters representing one line of your grid, top to bottom. ('.': empty, '0': black, '1': white).
Next actionCount: the number of legal actions.
Next actionCount action: a string representing the action.
Next actionCount: the number of legal actions.
Next actionCount action: a string representing the action.
Output
A single line containing the coordinates where you want to play. Example "d3".
You can also print messages by doing the following. Example: "d3 MSG message".
You can also print messages by doing the following. Example: "d3 MSG message".
Constraints
Response time first turn is ≤
Response time per turn is ≤
A higher resolution is required to access the IDE