Skip to content

Observations

Fully observable grid with a categorical state representation. Each entity is represented by its unique integer tag.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

A grid of integers, where each integer represents an entity, represented as an array of shape i32[H, W], where H and W are the height and width of the grid.

Categorical state representation, but cropped to the agent's view, and aligned with the agent's direction, such that the agent always points upwards.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

A grid of integers, where each integer represents an entity, represented as an array of shape i32[2 * RADIUS + 1, 2 * RADIUS + 1].

An empty observation represented as an array of shape f32[0]. Useful for testing purposes.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

A 0-shaped array f32[0].

Fully observable grid with an RGB state representation. Each entity is represented by its unique RGB sprite. The RGB sprites are stored in a cache, and the entities are placed on the grid according to their positions.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

An RGB image of the grid, represented as an array of shape u8[H * S, W * S, 3], where H and W are the height and width of the grid,

Array

and S is the size of the tile.

First person view with an RGB state representation. The image is cropped to the agent's view, and aligned with the agent's direction, such that the agent always points upwards. See rgb for more details. See rgb for more details.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

An RGB image of the agent's view, represented as an array of shape u8[(2 * RADIUS + 1) * S, (2 * RADIUS + 1) * S, 3], where

Array

S is the size of the tile.

Fully observable grid with a symbolic state representation as originally proposed in the MiniGrid environment. The symbol is a triple of (OBJECT_TAG, COLOUR_IDX, OPEN/CLOSED/LOCKED). The last layer might also contain the direction of the entity, for example, the direction of the agent.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

A grid of integers, where each integer represents an entity, represented as an array of shape u8[H, W, 3], where H and W are the height and width of the grid.

First person view with a symbolic state representation, but cropped to the agent's view, and aligned with the agent's direction, such that the agent always points upwards. See symbolic for more details.

Parameters:

Name Type Description Default
state State

The current state of the game.

required

Returns:

Name Type Description
Array Array

A grid of integers, where each integer represents an entity, represented as an array of shape u8[2 * RADIUS + 1, 2 * RADIUS + 1, 3].