- Be the last to move.
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
The game is played on a 8x8 chess board with three players: Red, Green, Blue. Each player has one single piece: a knight. The goal of the game is to "isolate" the opponent knights.
Whenever a knight occupies a square, that square becomes unavailable for the remainder of the game. An open square available for a knight to move into is called a "liberty". A player with no remaining liberties for their piece during their turn leaves the game. Therefore, the last player to move wins the game.
The initial positions of the pieces are random but borders are excluded to ensure equal chances for all players.How to play:
Red starts the game, then Green, then Blue. Each player alternate taking turns moving their knight to an available square. Knights can move to any open square that is 2-rows and 1-column or 2-columns and 1-row away from their current position on the board.
The game ends when only one player remains.Ending a turn:
- A bot must output the destination coordinates of its piece. Coordinates are expressed in chess notation e.g.
- If the destination square is outside of the board,
- If the destination square is not available,
- If the move is not a knight move,
the player leaves the game.
- The game has been deliberately designed to be simple. Focus on search algorithms !
- You cannot move your knight.
- You do not respond in time.
- You output an unrecognized command or an illegal move.
Next line: moveCount: the number of legal moves for this turn.
Next moveCount lines: move: a string of characters representing a legal move.
- You can display a (short) comment in the viewer by adding a space after the move and writing its content, e.g.
- You can play a random move (chosen amongst all legal moves) by outputting
randominstead of specific coordinates.
Response time per turn is ≤
A higher resolution is required to access the IDE