Vacuum World

The vacuum environment is a 2-dimensional grid world, populated with fixed obstacles, dust, and vacuum cleaning bots called VacBots. The VacBots are entities that can be controlled by agents. Their task is to move around the grid, avoiding the obstacles, and finding and cleaning the colour-full dust.

VacBots

DeccoHarryHenryLloydKeanoStevoBenjy, and Darth are the names of available VacBots in the Vacuum World. Note that, in the default configuration, only the first four of these are available.

Actions

VacBots can turn (by moving left or right)move around the grid (by moving forward), clean dust, and flash their warning lights:

ActionDescription

move(Direction)

Moves the VacBot one square in the specified direction, turning it first if necessary. Valid directions that can be used for the Direction parameter are the absolute directions northsoutheast, or west or the relative directions forwardleftright, or back). The VacBot carries out the requested move on a best-effort basis. If the moving VacBot meets another VacBot, a permanent obstacle, or the edge of the grid, it halts.

move(Direction, Distance)

Moves the VacBot in the specified Direction, for the specified Distance, turning it first if necessary. Valid directions are specified similarly as for the move action with one parameter. The distance is a positive integer representing the number of squares to be moved; a distance value of 0 can be used to turn the entity without moving. The VacBot carries out the requested move on a best-effort basis. If the moving VacBot meets another VacBot, a permanent obstacle, or the edge of the grid, it halts.

light(Switch)

Turns the warning light on or off.

clean

Cleans the square currently occupied by the VacBot, if it is dusty. If the square is already clean, this action takes no time.

Actions of multiple bots are queued in the vacuum world environment. This means that at most one bot at a time is actively doing something and then the next bot can do something.

Percepts

VacBots receive the following percepts:

PerceptDescription

location(X, Y)

The VacBot’s current location on the grid, in X,Y coordinates. The square in the top left corner is numbered 0,0 This percept is only available when the VacBot is not moving between squares.

direction(Direction)

The VacBot’s current absolute direction, one of northsoutheast, or west. This percept is only available when the VacBot is not turning or cleaning.

light(Switch)

The status of the Vacbot’s light, either on or off.

square(Direction, Content)

Six instances of this percept represent the VacBot’s field of vision. The square name is one of left, forwardLeft, forward, forwardRight, right, or here. The square Content is either obstaclevacdust, or empty. Note that if the VacBot perceives another VacBot occupying a dusty square, the square contents will take the value vac. Note also that the VacBot does not perceive itself; the square contents for the square here is always either dust or empty.

task(Id)

The VacBot’s current task. The possible tasks are turnmove, and clean; or none if the VacBot is idle.

All of these percepts except for the task percept are only available when the VacBot is not moving, turning, or cleaning.

World Configuration

In the default configuration, the size of the world is 16 x 8 squares; there are 8 randomly-placed obstacles, 32 random dusty squares, and 4 randomly-placed VacBots. Dust, once cleaned, does not regenerate. This default configuration can be changed by editing the file ita.conf, which also includes documentation for each configuration option.

You can use the init parameters to set the configuration file. The init parameters are:

parameter namedescription
configfilename of config file (relative path, from directory containing the environment jar file
levellevel name. Either relative path, or a string with a number in range [0,8].
generation"no", "X s" (Regenerates dust X seconds after it's removed) or "P %" (generates dust on every square with a probability of P % per second)

EIS Interface Details

  • The move actions will throw an ActException of type FAILURE if it is invoked while the VacBot is moving or cleaning. If the moving VacBot meets another VacBot, a permanent obstacle, or the edge of the grid, it halts and throws an ActException of type FAILURE. The exception message indicates whether the failure was temporary (caused by another VacBot) or permanent (caused by a fixed obstacle or the edge of the grid).
  • The clean action will throw an ActException of type FAILURE if it is invoked while the VacBot is moving or cleaning.
  • No environment management commands are supported. The environment runs until it is terminated by the user or by the operating system.

Acknowledgement

This environment was developed and made available by Rem Collier and Howell Jordan from UCD School of Computer Science and Informatics.