Parameters Reference

by Florian Fischer and Dennis C. Bemmann

These tables list all available parameters in RoboCom 3, divided into the sections Original Language, Extended Instructions and Multitasking.

Remote variables and remote constants (all parameters beginning with %) represent the respective values of the remote robot (the robot on the reference field). The reference field is the field directly in front of the robot, in the direction the robot's head is currently facing.

Note: if the reference field is empty, all remote values read are zero and all remote values written are lost. Every robot, regardless of his instruction set, can access remote values.

# represents variables. Those values can be read and modified.
$ represents constants. Those values can be read but not modified.
% represents the respective values of the remote robot.

Note: if accessing a remote value, the instruction will usually take a longer time to be executed. See the end of this text for details.

Since not all parameters are allowed in every OptionSet, RoboCom Workshop automatically generates specific help files for each OptionSet. See the tables on this page for general information or select one of the documents below for

Details on an OptionSet:

Original Language

The following variables, constants and remotes were introduced with the first version of RoboCom and are always available.

Variable / Constant Description
#1 .. #20 The twenty all-purpose standard integers.
Note: They cannot be accessed by remote robots.
#Active, %Active Determines if a robot is active (positive values) or not (zero or negative).
Note: the active variable is usually the only one that can also be changed by other robots.
$Banks, %Banks The number of banks which the current / remote robot has.
$InstrSet, %InstrSet The instruction set which the current / remote robot has.
$Mobile, %Mobile Tells if the current / remote robot is mobile.
$Fields The size of the board. The value is always equal, no matter which robot reads it.

Extended Instructions

The 'extended instructions' are the result of a discussion among RoboCom programmers between 1998 and 2000. They extend the original command set to increase the possibilities for RoboCom programmers. They are part of the new language standard RC300 and not supported by versions of RoboCom Workshop prior to 3.00.

Variable / Constant Description
#Pub Public variable which is accessible from all robots on the field. Its value is always equal, no matter which robot reads / writes it.
$Age, %Age The current / remote robot's age in cycles, divided by 1000.
$ElimTrigger The elimination trigger setting (as configured in the current OptionSet), or -1 if elimination is disabled.
$Generation The generation of the current robot.
$ID Identifier which is equal for each robot of the same team and initialized to random when the game is started.
$InstrPos The number of the current instruction (in its bank).
$MaxGeneration The maximum allowed generation (as configured in the current OptionSet).
$MaxLifetime The maximum allowed lifetime of a bot, divided by 1000 (as configured in the current OptionSet), or -1 if the feature is disabled.
$MaxMyBots The maximum allowed number of bots for each player (as configured in the current OptionSet).
$MaxTasks The maximum allowed number of tasks (for Multitasking), or 1 (if Multitasking is disabled).
$MyBots / $OtherBots
The number of your / other robots on the board.
$RandNum Random number from 1 to 50.
$Time The game time in cycles, divided by 1000.
$Timeout The automatic simulation timeout in cycles, divided by 1000, or -1 if automatic timeout is disabled.

Multitasking

Multitasking is only available in the new language standard RC300 and not supported by versions of RoboCom Workshop prior to 3.00.

Constant Description
$Tasks The number of tasks in the current robot. (Sleeping or seized tasks are also counted.)

Remote access

When you access variables or constants in the remote robot (those beginning with a %), an additional "remote access duration" is added to the instruction duration. That access duration is added for every instruction parameter which is a remote variable, e.g. in Add %Active, %Banks it is added twice.
See the details page for your favourite option set for the actual value of the remote access duration.