Robliterator Manual


The game is played through a series of ticks.

Robliterator consists of a cartesian grid representing a torus that forms the game world, upon which are found robots and other objects.

Each robot consists of:

An identifier
A number, used to represent the robot.
The address of the CGI script that controls the robot.
Whether the robot is active
A boolean indicating whether the robot is still active (1). Inactive robots (0) are reaped on the next tick.
The number of robots that the robot has destroyed.
An age
The number of ticks since the robot appeared.
A distance travelled
The number of squares that the robot has travelled.
An error count
The number of recent moves that were errors.

Each tick, a robot can either move in a cartesian direction, or shoot in a cartesian direction. Shots are instantaneous, fatal, and have unlimited range. It is possible for a robot to shoot itself if there are no other obstacles at all in the direction of the shot.

If a robot reaches 4 errors, then it self-destructs.


Each tick, all the still-active robots are contacted using HTTP, and sent the status of the game. The robots must then respond with a command for their next turn.

Only port-80 "http:" URLs are supported. Passwords are not supported. In the response, everything except the first word of the entity body is ignored (redirects are not followed, for instance).

Each robot has about 5 to 10 seconds to respond, depending on how many robots are in play and how long it takes to contact them all.

There can only be one robot per hostname running at any one time; the hostname is used to identify the player.

Game state

The game state consists of three blocks of text, each delimited by a blank line.

The first block is a number giving the robot's identifier.

The second block is the state of each robot in play, in age order (oldest first). Each line consists of a space-separated set of fields:

The third block is the board state. Each line represents one row of the grid, and consists of a space-separated set of strings representing the board. Each string is one of the following:

A dot represents an empty space on the board.
A W represents an impassable wall.
A number
Each number represents one of the robots listed in the second section.


The valid commands are:

Attempt to move in the specified direction. Moving into another robot or a wall will result in a (harmless) collision, with no net movement for the robots involved.
Attempt to fire in the specified direction.
Do nothing.
Kill yourself. If someone shoots you at the same time, they get the kill. Suicide does not count towards the number of kills. (If a robot kills itself using one of the fire-* commands, then it does count towards the number of kills.)

The first row is the northern-most side. The first string on each row is the western-most side.

In addition, the following commands are used to represent exceptional cases:

This is the command used to represent the "first" action of a robot when it is first placed on the board, before its CGI script has been called.
This is the command used to represent cases where the CGI script did not give a valid command.


The tick after a command has been given, the result of the robot's command will be visible in the second block sent to all the CGI scripts. The following result strings are possible:

The robot was placed on the board.
The robot did nothing (likely because it didn't send a valid command).
The robot moved as per its command.
The robot tried to move but didn't.
The robot fired its weapon and destroyed a robot.
The robot fired its weapon but did not destroy anything.
The robot killed itself.


The source of the server is available online:
The main back-end program.
The module implementing the board logic.
The module implementing the robot logic.
Helper module for database access.