Skip to content

Concepts and Terminologies

Tarik Viehmann edited this page Jun 22, 2024 · 2 revisions

The refbox has certain concepts and terminology that we are going to explain first. Game Phase:: The phase describes what part of the game (as described in the rulebook) is currently active. There is one phase and one phase only active at any one time. The possible phases are:

  • PRE_GAME: The game is prepared but not yet started. Teams are free to perform setup preparations. When the refbox is started it defaults to this phase. Setting the state to RUNNING (see below) will automatically advance to the PRODUCTION phase.
  • EXPLORATION: exploration phase as utilized in the rulebook prior to the 2022 release. It lasts for 3 minute after which the refbox automatically switches to the PRODUCTION phase.
  • PRODUCTION: production phase as described in the rulebook. It lasts for 20 minutes after which the refbox automatically switches to the POST_GAME phase.
  • POST_GAME: The game has ended.

Game State

The state describes whether the game is currently waiting to be started, active and running, or paused. There is one state and one state only active at any one time. The possible states are:

  • INIT: The refbox is currently being initialized. If you set this state the refbox will be completely reset as if it were just started. It automatically advances to WAIT_START once initialization has completed.
  • WAIT_START: The refbox has finished initializing and is awaiting the game start.
  • RUNNING: The game is active. The robots must perform their tasks according to the rules and the game time is advancing.
  • PAUSED: The game has been interrupted. All robots must stop moving immediately. In the production phase machine processing will be suspended and in the exploration phase all signals will be turned off.

Robots

Robots are any hosts that communicate with the refbox via peer-to-peer communication. This includes the field robots, but also any other machine the team has connected to the network participating in refbox communication.

Game time

The game time is a duration measured in seconds and announced periodically in the !GameState message. The game time is advanced in the EXPLORATION and PRODUCTION phases while in the RUNNING state. The game time is reset per game phase, i.e. after the exploration phase the time is reset to zero and starts again for the production phase.

Active orders

In the production phase orders are posted that the robot must process. Orders have a delivery time in which higher points are awarded. And order is active if it is published, even if the game time is out of the delivery period. Inactive orders are not posted at all. This is used for late orders. At certain (random) points in time a late order is activated and from then on published.