The playing field is a rectangulartoroidal grid, with each cell containing either nothing (.), a robot ('>'), or a crystal (=), or a base ('@').
......................
...=............>..@....^
..............=..=..>...
........R=.....v.......=
..................=@..@..^
..........R.....=.....
.....R..........^.<.....>=
........=.....=...=@....
..=.............@..R..<.@
....................=<^.=.
HALT(H) - If a robot executes this during its turn, its turn is immediately over. The entire program is initially filled withHALTs.MOVE_FORWARD(FORWARD/F) - The robot who executes this command will move forward 1 square if possible, pushing up to one other robot/crystal.TURN_RIGHT(RIGHT/R) - The robot will rotate clockwise by 90 degrees.MOVE_BACKWARDS(BACKWARDS/B) - The robot will move backwards 1 square if possible, pushing up to one other robot/crystal.TURN_LEFT(LEFT/L) - The robot will rotate counterclockwise by 90 degrees.GRAB(G) - The robot will pick up a crystal if there is one directly in front of it. Also, if there is instead a second bot directly in front, this will steal a crystal from that bot's inventory.DROP(D) - The robot will take a crystal from its inventory and drop it, if possible. If there is an empty space in front, the crystal would fill that space. If there is instead a robot in front, then the crystal is added to that bot's inventory.ZAP(Z) - This is the mostan interesting command, and probablyit deviates the mostslightly from the original game. A zap command allows one bot to issue a command to thea second bot directlypositioned in front of it (if any). If bot-1bot_X is directly facing bot_Y, and adjacent to bot-2bot_Y is within a distance of two, then bot-1bot_X can zap bot-2bot_Y. The very next token in bot-1'sbot_X's program will then be executed by bot-2bot_Y instead.ZAPcommands have a range of 2, meaning that the zap can travel across a single empty square to reach a target which is not immediately adjacent to the zapper.- The
ZAPcommand can be stacked:Z,Z,Fcauses the bot in front of the bot in front of this bot to move forward. - An example: The program
L,Fnormally causes the current bot to turn left then move forward. The programZ,L,Fcauses another bot to turn left, and then the current bot to move forward. - The
ZAPcommand can be stacked:Z,Z,Fcauses the bot in front of the bot in front of this bot to move forward. JUMP(J) - This serves as an unconditional jump in the program, a feature not found in the board game. This causes the program execution to jump forwards to the location immediately after the next HALT. For example,F,J,R,H,Lcauses the bot to move forward and then turn left. TheR,His skipped over.- A program with a
JUMPed section acts exactly like a program with that section removed. So,F,J,R,H,Lacts exactly likeF,L, andZ,J,H,Dacts exactly likeZ,D. JUMPcan be used to easily switch between multiple complex behaviors. For example,F,F,H,R,Rcan easily be edited to formJ,F,F,H,R,R.
Game Objective
Your goal is to navigate your bot to pick up crystals and return them to a base (they serve as collection points). Each crystal you successfully DROP off at a base earns you one point. Each bot can only carry one crystal at a time. These crystals can be acquired by GRABbing them off the ground or by GRABbing from an opponent bot.
Execution Order
The players take turns in a cycle. On your turn, your program will receive the current game map (probably a int[]as an object) and your current bot's program. Your program can then submit the edited bot-program. Your bot's program is then immediately executed, affecting the board before the next player's turn begins.