Observations
categorical(state)
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 |
categorical_first_person(state)
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 |
none(state)
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 |
rgb(state)
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 |
Array
|
and |
rgb_first_person(state)
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 |
Array
|
|
symbolic(state)
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 |
symbolic_first_person(state)
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 |