Observation Space¶
We provide unified observation and action spaces to facilitate the development of multi-task and continually learning agents that can constantly adapt to new scenarios and novel tasks. This deviates from the MineRL Challenge design that tailors observation and action spaces to individual tasks. We explain our observation space in this section and action space in the following section.
Our observation space mainly includes nine parts: (1) egocentric RGB frames, (2) equipment, (3) inventory, (4) inventory change, (5) voxels (surrounding blocks), (6) life statistics, (7) location statistics, (8) nearby tools, and (9) damage source. We elaborate the privileged lidar observation in Privileged Observations.
RGB Frames¶
RGB frames provide an egocentric view of the running Minecraft client that is the same as human players see. To reduce the gap between simulator frames and YouTube videos, we also include the rendering of player’s hand and the heads-up display (HUD).
Data type:
numpy.uint8
Shape:
(3, H, W)
, height and width are specified by argumentimage_size
Access:
obs["rgb"]
Equipment¶
Equipment observation includes names, quantities, and durability of agent’s equipment, including the item held in main hand such as ten wood blocks or a sword, the shield held in off hand, and armors. They are flattened with the order of “main hand, foot, leg, body, head, off hand”.
Note
This obsrevation is flattned with the order of “main hand”, “foot”, “leg”, “body”, “head”, and “off hand”.
Equipment Name¶
Names of equipment in natural language, such as “wooden pickaxe” and “iron helmet”.
Data type: str
Shape:
(6,)
Access:
obs["equipment"]["name"]
Note
Name for empty equipment slots is “air”.
Equipment Quantity¶
Quantities of equipped items.
Data type:
numpy.int64
Shape:
(6,)
Range: [0, 64]
Access:
obs["equipment"]["quantity"]
Equipment Variant¶
Variants of equipped items. See here for a full listing of variants.
Data type:
numpy.int64
Shape:
(6,)
Range: [0, 120]
Access:
obs["equipment"]["variant"]
Equipment Durability¶
Durability of equipped items.
Data type:
numpy.float32
Shape:
(6,)
Access:
obs["equipment"]["cur_durability"]
Equipment Max Durability¶
Max durability of equipped items.
Data type:
numpy.float32
Shape:
(6,)
Access:
obs["equipment"]["max_durability"]
Inventory¶
Inventory observation includes names, quantities, and durability of items in agent’s inventory. There are 36 slots in the inventory, including 10 hotbar slots and 26 inventory slots.
Note
The first item in hotbar and the main-hand equipment are the same.
Inventory Name¶
Names of inventory items in natural language, such as “obsidian” and “cooked beef”.
Data type: str
Shape:
(36,)
Access:
obs["inventory"]["name"]
Note
Name for empty slots is “air”.
Inventory Quantity¶
Quantities of inventory items.
Data type:
numpy.int64
Shape:
(36,)
Range: [0, 64]
Access:
obs["inventory"]["quantity"]
Inventory Variant¶
Variants of inventory items. See here for a full listing of variants.
Data type:
numpy.int64
Shape:
(36,)
Range: [0, 120]
Access:
obs["inventory"]["variant"]
Inventory Durability¶
Durability of inventory items.
Data type:
numpy.float32
Shape:
(36,)
Access:
obs["inventory"]["cur_durability"]
Inventory Max Durability¶
Max durability of inventory items.
Data type:
numpy.float32
Shape:
(36,)
Access:
obs["inventory"]["max_durability"]
Inventory Change¶
We also provide inventory change such that the agent can associate the inventory with its activities. Because crafting is the most meaningful activity that can increase or decrease the inventory, we group inventory increase and decrease into two groups, increase/decrease caused by crafting and increase/decrease caused by other activities (such as collect an item on the ground, drop an item, etc.).
Note
This observation is falttened as well. By default we care about one increment and four decrements. Therefore, shapes for increment-related and decrement-related observations are (1,)
and (4,)
, respectively. These can be configured by chaning arguments n_increased
and n_decreased
in ARNNWrapper
.
Increased Item Name Caused by Crafting¶
Name of increased item in natural language, such as “stick”, caused by crafting.
Data type: str
Shape:
(1,)
Access:
obs["delta_inv"]["inc_name_by_craft"]
Increased Item Quantity Caused by Crafting¶
Quantity of increased item caused by crafting.
Data type:
numpy.int64
Shape:
(1,)
Access:
obs["delta_inv"]["inc_quantity_by_craft"]
Increased Item Name Caused by Other Activities¶
Name of increased item in natural language, such as “stick”, caused by other activities.
Data type: str
Shape:
(1,)
Access:
obs["delta_inv"]["inc_name_by_other"]
Increased Item Quantity Caused by Other Activities¶
Quantity of increased item caused by other activities.
Data type:
numpy.int64
Shape:
(1,)
Access:
obs["delta_inv"]["inc_quantity_by_other"]
Decreased Item Name Caused by Crafting¶
Names of decreased items in natural language, such as “planks”, caused by crafting.
Data type: str
Shape:
(4,)
Access:
obs["delta_inv"]["dec_name_by_craft"]
Decreased Item Quantity Caused by Crafting¶
Quantity of decreased items caused by crafting.
Data type:
numpy.int64
Shape:
(4,)
Access:
obs["delta_inv"]["dec_quantity_by_craft"]
Decreased Item Name Caused by Other Activities¶
Names of decreased items in natural language, such as “planks”, caused by other activities.
Data type: str
Shape:
(4,)
Access:
obs["delta_inv"]["dec_name_by_other"]
Decreased Item Quantity Caused by Other Activities¶
Quantity of decreased items caused by other activities.
Data type:
numpy.int64
Shape:
(4,)
Access:
obs["delta_inv"]["dec_quantity_by_other"]
Voxels¶
We also provide voxels observation (3x3x3 surrounding blocks around the agent). This type of observation is similar to how human players perceive their surrounding blocks. It includes names and properties of blocks.
Block Names¶
Names of surrounding blocks in natural language, such as “dirt”, “air”, and “water”.
Data type: str
Shape:
(3, 3, 3)
Access:
obs["voxels"]["block_name"]
Block Variants¶
Variants of blocks. See here for a full listing of variants.
Data type:
numpy.int64
Shape:
(3, 3, 3)
Access:
obs["voxels"]["block_meta"]
Is Collidable Block¶
If the block is collidable. Most solid blocks such as dirt are collidable. Non-collidable blocks include air, water, lava, etc.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["is_collidable"]
Is Tool Required¶
It means if any tool is required to mine a block. E.g., to mine metal we must use a pickaxe.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["is_tool_not_required"]
Block Movement¶
It means if a block can move. For example, sand blocks can drop caused by gravity.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["blocks_movement"]
Is Liquid¶
It tells if a block is liquid. For example, water and lava are liquid blocks.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["is_liquid"]
Is Solid¶
It tells if a block is solid. Liquid blocks are not solid. Air block is not solid as well.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["is_solid"]
Can Burn¶
It tells if a block can burn. For example, leaves and grass can burn.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["can_burn"]
Stop Light¶
It tells if a block will stop light transmission.
Data type:
boolean
Shape:
(3, 3, 3)
Access:
obs["voxels"]["blocks_light"]
Looking Angle¶
Normalized dot product between block position vector and player’s looking vector.
Data type:
numpy.float32
Shape:
(3, 3, 3)
Range: [-1, 1]
Access:
obs["voxels"]["cos_look_vec_angle"]
Life Statistics¶
Life statistics include agent’s health, armor, food saturation, etc. It can be regarded as a vector representation of the heads-up display (HUD).
Health¶
It represents agent’s health. Agent will lose health by hunger, monsters’ damage, falling, etc. It can recover health by eating food. The agent is considered to be wasted once the health decreases to zero.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 20]
Access:
obs["life_stats"]["life"]
Oxygen¶
It represents the oxygen bar. At the most time it is full. The agent starts to consume oxygen once it is underwater. When the oxygen decreases to zero, the agent starts to suffer from suffocation. The agent recovers oxygen when it is not in the water.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 300]
Access:
obs["life_stats"]["oxygen"]
Armor¶
It represents the amount of armor. Larger value of armor can better protect the agent when it gets damages. The agent can increase the amount of armor by equipping more advanced armors.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 20]
Access:
obs["life_stats"]["armor"]
Food¶
It represents the food bar. Food will be gradually consumed. The agent starts to starve once the food bar decreases to zero. It can recover the food bar by eating food.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 20]
Access:
obs["life_stats"]["food"]
Food Consumption Speed¶
It represents the speed of food being consumed. See here for more details.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 20]
Access:
obs["life_stats"]["saturation"]
Is Sleeping¶
It tells if the agent is sleeping.
Data type:
bool
Shape:
(1,)
Access:
obs["life_stats"]["is_sleeping"]
Experience¶
It represents the amount of experiences the agent has gained so far. Experiences are consumed when enchanting.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 1395]
Access:
obs["life_stats"]["xp"]
Location Statistics¶
Location statistics include information about the terrain the agent currently occupies. It also includes agent’s location and compass.
Position¶
The xyz position of the agent.
Data type:
numpy.float32
Shape:
(3,)
Access:
obs["location_stats"]["pos"]
Compass¶
Yaw and pitch of the agent.
Data type:
numpy.float32
Shape:
(1,)
Access:
obs["location_stats"]["yaw"]
andobs["location_stats"]["pitch"]
Biome ID¶
Biome ID of the terrain the agent currently occupies.
Data type:
numpy.int64
Shape:
(1,)
Access:
obs["location_stats"]["biome_id"]
Note
A full list of biome IDs can be found here.
Rainfall¶
The amount of rain.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 1]
Access:
obs["location_stats"]["rainfall"]
Temperature¶
The current temperature.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 1]
Access:
obs["location_stats"]["temperature"]
Can See Sky¶
If the agent can see sky. For example, the agent cannot see the sky in a cave.
Data type:
bool
Shape:
()
Access:
obs["location_stats"]["can_see_sky"]
Is Raining¶
It tells if it is raining or not.
Data type:
bool
Shape:
()
Access:
obs["location_stats"]["is_raining"]
Light Level¶
The amount of light. The light can include sunlight and ambient light.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 15]
Access:
obs["location_stats"]["light_level"]
Sky Light Level¶
The amount of sky light.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 1]
Access:
obs["location_stats"]["sky_light_level"]
Sun Brightness¶
The brightness of the sunshine.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 1]
Access:
obs["location_stats"]["sun_brightness"]
Sea Level¶
It indicates the sea level.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 255]
Access:
obs["location_stats"]["sea_level"]
Nearby Tools¶
This observation indicates if a crafting table or a furnace are nearby. Both are important tools for crafting/smelting new items.
Is Crafting Table Nearby¶
Tells if a crafting table is nearby.
Data type:
bool
Shape:
()
Access:
obs["nearby_tools"]["table"]
Is Furnace Nearby¶
Tells if a furnace is nearby.
Data type:
bool
Shape:
()
Access:
obs["nearby_tools"]["furnace"]
Damage Source¶
Damage source tells information about damge taken by the agent. It includes the damge amount and properties of damage.
Damage Amount¶
The amount of total damage.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 40]
Access:
obs["damage_source"]["damage_amount"]
Damage Distance¶
The distance to the damage source.
Data type:
numpy.float32
Shape:
(1,)
Access:
obs["damage_source"]["damage_distance"]
Damage Direction¶
The direction of damage source, including yaw and pitch.
Data type:
numpy.float32
Shape:
(1,)
Access:
obs["damage_source"]["damage_yaw"]
andobs["damage_source"]["damage_pitch"]
Hunger Damage¶
Damage from hunger.
Data type:
numpy.float32
Shape:
(1,)
Range: [0, 20]
Access:
obs["damage_source"]["hunger_damage"]
Is Explosive¶
If the damage is explosive damage.
Data type:
bool
Shape:
()
Access:
obs["damage_source"]["is_explosion"]
Is Fire¶
If the damage is fire damage.
Data type:
bool
Shape:
()
Access:
obs["damage_source"]["is_fire_damage"]
Is Magic¶
If the damage is magic damage.
Data type:
bool
Shape:
()
Access:
obs["damage_source"]["is_magic_damage"]
Is Projectile¶
If the damage is projectile damage.
Data type:
bool
Shape:
()
Access:
obs["damage_source"]["is_projectile"]
Is unblockable¶
If the damage cannot be blocked.
Data type:
bool
Shape:
()
Access:
obs["damage_source"]["is_unblockable"]