minedojo.tasks.meta.combat module¶
- class minedojo.tasks.meta.combat.CombatMeta(*, target_names, target_quantities, reward_weights=1.0, initial_mobs=None, initial_mob_spawn_range_low=None, initial_mob_spawn_range_high=None, spawn_rate=None, spawn_range_low=None, spawn_range_high=None, start_position=None, start_health=None, start_food=None, start_at_night=True, initial_weather=None, initial_inventory=None, drawing_str=None, specified_biome=None, always_night=False, allow_mob_spawn=True, break_speed_multiplier=1.0, seed=None, world_seed=None, fast_reset=True, fast_reset_random_teleport_range=None, image_size, use_voxel=False, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, sim_name='CombatMeta')[source]¶
Bases:
minedojo.tasks.meta.base.ExtraSpawnMetaTaskBase
Class for combat tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.combat.CombatMeta.allow_mob_spawn:
bool
:param _sphinx_paramlinks_minedojo.tasks.meta.combat.CombatMeta.allow_mob_spawn: IfTrue
, allow mobs (animals and hostiles) to spawn.Default:
True
.- Parameters
always_night¶ (
bool
) – IfTrue
, the world will always be at night. Default:False
.break_speed_multiplier¶ (
float
) – Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking. Default:1.0
.drawing_str¶ (
Optional
[str
]) – Draws shapes (e.g. spheres, cuboids) in the minecraft world. Default:None
.event_level_control¶ (
bool
) – IfTrue
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (
bool
) –If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (
Union
[int
,Tuple
[int
,int
]]) – The size of image observations.initial_inventory¶ (
Optional
[List
[InventoryItem
]]) – If notNone
, specifies initial items in the agent’s inventory. Use classInventoryItem
to specify items. Default:None
.initial_mobs¶ (
Union
[str
,List
[str
],None
]) – The types of mobs that are spawned initially. Default:None
.initial_mob_spawn_range_high¶ (
Optional
[Tuple
[int
,int
,int
]]) – The upper bound on each horizontal axis from the center of the area to spawn initially. Default:None
.initial_mob_spawn_range_low¶ (
Optional
[Tuple
[int
,int
,int
]]) – The lower bound on each horizontal axis from the center of the area to spawn initially. Default:None
.initial_weather¶ (
Optional
[str
]) – If notNone
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (
Optional
[List
[Tuple
[float
,float
,float
]]]) – Defines the directions and maximum distances of the lidar rays ifuse_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.reward_weights¶ (
Union
[int
,float
,Dict
[str
,Union
[float
,int
]]]) – The reward weight for each target in the task. Default:1.0
.seed¶ (
Optional
[int
]) – The seed for an instance’s internal generator. Default:None
.sim_name¶ (
str
) – Name of a simulation instance. Default:"CombatMeta"
.spawn_range_high¶ (
Optional
[Tuple
[int
,int
,int
]]) – The upper bound on each horizontal axis from the center of the area to spawn Default:None
.spawn_range_low¶ (
Optional
[Tuple
[int
,int
,int
]]) – The lower bound on each horizontal axis from the center of the area to spawn Default:None
.spawn_rate¶ (
Union
[float
,int
,List
[Union
[float
,int
]],Dict
[str
,Union
[float
,int
]],None
]) – The probability of spawning in each step Default:None
.specified_biome¶ (
Union
[int
,str
,None
]) – The specified biome of the task. Default:None
.start_at_night¶ (
bool
) – IfTrue
, the task starts at night. Default:True
.start_food¶ (
Optional
[int
]) – If notNone
, specifies initial food condition of the agent. Default:None
.start_health¶ (
Optional
[float
]) – If notNone
, specifies initial health condition of the agent. Default:None
.start_position¶ (
Optional
[Dict
[str
,Union
[float
,int
]]]) – If notNone
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.use_lidar¶ (
bool
) – IfTrue
, includes lidar in observations. Default:False
.use_voxel¶ (
bool
) – IfTrue
, includes voxel in observations. Default:False
.voxel_size¶ (
Optional
[Dict
[str
,int
]]) – Defines the voxel’s range in each axis ifuse_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (
Optional
[str
]) – Seed for deterministic world generation ifgenerate_world_type
is"default"
or"specified_biome"
. See here for more details. Default:None
.
base task class for meta tasks that require extra spawn, e.g., harvest, combat, and techtree
- property task_prompt: str¶
- Return type
str
minedojo.tasks.meta.creative.creative module¶
- class minedojo.tasks.meta.creative.creative.CreativeMeta(*, start_position=None, start_health=None, start_food=None, initial_weather=None, initial_inventory=None, seed=None, world_seed=None, fast_reset=True, image_size, use_voxel=True, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, break_speed_multiplier=1.0, sim_name='CreativeMeta')[source]¶
Bases:
minedojo.tasks.meta.base.MetaTaskBase
Class for creative tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.creative.creative.CreativeMeta.break_speed_multiplier:
float
:param _sphinx_paramlinks_minedojo.tasks.meta.creative.creative.CreativeMeta.break_speed_multiplier: Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking.Default:
1.0
.- Parameters
event_level_control¶ (
bool
) – IfTrue
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (
bool
) –If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (
Union
[int
,Tuple
[int
,int
]]) – The size of image observations.initial_weather¶ (
Optional
[str
]) – If notNone
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (
Optional
[List
[Tuple
[float
,float
,float
]]]) – Defines the directions and maximum distances of the lidar rays ifuse_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.seed¶ (
Optional
[int
]) – The seed for an instance’s internal generator. Default:None
.sim_name¶ (
str
) – Name of a simulation instance. Default: “CreativeMeta”.start_food¶ (
Optional
[int
]) – If notNone
, specifies initial food condition of the agent. Default:None
.start_health¶ (
Optional
[float
]) – If notNone
, specifies initial health condition of the agent. Default:None
.start_position¶ (
Optional
[Dict
[str
,Union
[float
,int
]]]) – If notNone
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.use_lidar¶ (
bool
) – IfTrue
, includes lidar in observations. Default:False
.use_voxel¶ (
bool
) – IfTrue
, includes voxel in observations. Default:False
.voxel_size¶ (
Optional
[Dict
[str
,int
]]) – Defines the voxel’s range in each axis ifuse_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (
Optional
[str
]) –Seed for deterministic world generation if
generate_world_type
is"default"
or"specified_biome"
. See here for more details. Default:None
.
- collection: Literal['manual', 'youtube', 'gpt3'] | None = None¶
- source: dict[Literal['youtube_id', 'start', 'end'], str | int] | None = None¶
- property task_prompt: str¶
- Return type
str
minedojo.tasks.meta.harvest module¶
- class minedojo.tasks.meta.harvest.HarvestMeta(*, target_names, target_quantities, reward_weights=1.0, initial_mobs=None, initial_mob_spawn_range_low=None, initial_mob_spawn_range_high=None, spawn_rate=None, spawn_range_low=None, spawn_range_high=None, initial_inventory=None, start_position=None, start_health=None, start_food=None, start_at_night=False, initial_weather=None, allow_time_passage=True, specified_biome=None, break_speed_multiplier=1.0, seed=None, world_seed=None, fast_reset=True, image_size, use_voxel=False, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, sim_name='HarvestMeta')[source]¶
Bases:
minedojo.tasks.meta.base.ExtraSpawnMetaTaskBase
Class for harvest tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.harvest.HarvestMeta.allow_time_passage:
bool
:param _sphinx_paramlinks_minedojo.tasks.meta.harvest.HarvestMeta.allow_time_passage: Time flows ifTrue
.Default:
True
.- Parameters
break_speed_multiplier¶ (
float
) – Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking. Default:1.0
.event_level_control¶ (
bool
) – IfTrue
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (
bool
) –If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (
Union
[int
,Tuple
[int
,int
]]) – The size of image observations.initial_mobs¶ (
Union
[str
,List
[str
],None
]) – The types of mobs that are spawned initially. Default:None
.initial_mob_spawn_range_high¶ (
Optional
[Tuple
[int
,int
,int
]]) – The upper bound on each horizontal axis from the center of the area to spawn initially. Default:None
.initial_mob_spawn_range_low¶ (
Optional
[Tuple
[int
,int
,int
]]) – The lower bound on each horizontal axis from the center of the area to spawn initially. Default:None
.initial_weather¶ (
Optional
[str
]) – If notNone
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (
Optional
[List
[Tuple
[float
,float
,float
]]]) – Defines the directions and maximum distances of the lidar rays ifuse_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.reward_weights¶ (
Union
[int
,float
,Dict
[str
,Union
[float
,int
]]]) – The reward weight for each target in the task. Default:1.0
.seed¶ (
Optional
[int
]) – The seed for an instance’s internal generator. Default:None
.sim_name¶ (
str
) – Name of a simulation instance. Default: “HarvestMeta”.spawn_range_high¶ (
Optional
[Tuple
[int
,int
,int
]]) – The upper bound on each horizontal axis from the center of the area to spawn Default:None
.spawn_range_low¶ (
Optional
[Tuple
[int
,int
,int
]]) – The lower bound on each horizontal axis from the center of the area to spawn Default:None
.spawn_rate¶ (
Union
[float
,List
[float
],Dict
[str
,float
],None
]) – The probability of spawning in each step. Default:None
.specified_biome¶ (
Union
[int
,str
,None
]) – The specified biome of the task. Default:None
.start_at_night¶ (
bool
) – IfTrue
, the task starts at night. Default:True
.start_food¶ (
Optional
[int
]) – If notNone
, specifies initial food condition of the agent. Default:None
.start_health¶ (
Optional
[float
]) – If notNone
, specifies initial health condition of the agent. Default:None
.start_position¶ (
Optional
[Dict
[str
,Union
[float
,int
]]]) – If notNone
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.target_names¶ (
Union
[str
,List
[str
]]) – Names of target items to be harvested.target_quantities¶ (
Union
[int
,List
[int
],Dict
[str
,int
]]) – The quantity of each target to be harvested.use_lidar¶ (
bool
) – IfTrue
, includes lidar in observations. Default:False
.use_voxel¶ (
bool
) – IfTrue
, includes voxel in observations. Default:False
.voxel_size¶ (
Optional
[Dict
[str
,int
]]) – Defines the voxel’s range in each axis ifuse_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (
Optional
[str
]) –The seed for generating a minecraft world if
generate_world_type
is"default"
. See here for more details. Default:None
.
base task class for meta tasks that require extra spawn, e.g., harvest, combat, and techtree
- property task_prompt: str¶
- Return type
str
minedojo.tasks.meta.playthrough module¶
- class minedojo.tasks.meta.playthrough.Playthrough(*, obtain_dragon_egg_reward=10, start_position=None, start_health=None, start_food=None, start_at_night=False, always_night=False, initial_weather=None, initial_inventory=None, seed=None, world_seed=None, fast_reset=True, image_size, use_voxel=False, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, break_speed_multiplier=1.0, sim_name='Playthrough')[source]¶
Bases:
minedojo.tasks.meta.base.MetaTaskBase
Class for the playthrough tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.playthrough.Playthrough.always_night:
bool
:param _sphinx_paramlinks_minedojo.tasks.meta.playthrough.Playthrough.always_night: IfTrue
, the world will always be at night.Default:
False
.- Parameters
break_speed_multiplier¶ (
float
) – Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking. Default:1.0
.event_level_control¶ (
bool
) – IfTrue
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (
bool
) –If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (
Union
[int
,Tuple
[int
,int
]]) – The size of image observations.initial_weather¶ (
Optional
[str
]) – If notNone
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (
Optional
[List
[Tuple
[float
,float
,float
]]]) – Defines the directions and maximum distances of the lidar rays ifuse_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.obtain_dragon_egg_reward¶ (
Union
[float
,int
]) – The reward value of obtaining the dragon egg. The dragon egg can be solely obtained by successfully defeating the ender dragon. So it serves as a proxy for playing through the vanilla game. Default:10
.seed¶ (
Optional
[int
]) – The seed for an instance’s internal generator. Default:None
.sim_name¶ (
str
) – Name of a simulation instance. Default:"Playthrough"
.start_at_night¶ (
bool
) – IfTrue
, the task starts at night. Default:True
.start_food¶ (
Optional
[int
]) – If notNone
, specifies initial food condition of the agent. Default:None
.start_health¶ (
Optional
[float
]) – If notNone
, specifies initial health condition of the agent. Default:None
.start_position¶ (
Optional
[Dict
[str
,Union
[float
,int
]]]) – If notNone
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.use_lidar¶ (
bool
) – IfTrue
, includes lidar in observations. Default:False
.use_voxel¶ (
bool
) – IfTrue
, includes voxel in observations. Default:False
.voxel_size¶ (
Optional
[Dict
[str
,int
]]) – Defines the voxel’s range in each axis ifuse_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (
Optional
[str
]) –Seed for deterministic world generation if
generate_world_type
is"default"
or"specified_biome"
. See here for more details. Default:None
.
- reset(**kwargs)[source]¶
Resets the environment to an initial state and returns an initial observation.
- Returns
Agent’s initial observation.
- step(action)[source]¶
Run one timestep of the environment’s dynamics. Accepts an action and returns next_obs, reward, done, info.
- Parameters
action¶ – The action of the agent in current step.
- Returns
A tuple (obs, reward, done, info) -
dict
- Agent’s next observation. -float
- Amount of reward returned after executing previous action. -bool
- Whether the episode has ended. -dict
- Contains auxiliary diagnostic information (helpful for debugging, and sometimes learning).
- property task_prompt: str¶
- Return type
str
minedojo.tasks.meta.survival module¶
- class minedojo.tasks.meta.survival.SurvivalMeta(*, target_days, per_day_reward=1, success_reward=None, start_position=None, start_health=None, start_food=None, initial_weather=None, initial_inventory=None, break_speed_multiplier=1.0, seed=None, world_seed=None, fast_reset=True, image_size, use_voxel=False, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, sim_name='SurvivalMeta')[source]¶
Bases:
minedojo.tasks.meta.base.MetaTaskBase
Class for survival tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.survival.SurvivalMeta.break_speed_multiplier:
float
:param _sphinx_paramlinks_minedojo.tasks.meta.survival.SurvivalMeta.break_speed_multiplier: Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking.Default:
1.0
.- Parameters
event_level_control¶ (
bool
) – IfTrue
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (
bool
) –If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (
Union
[int
,Tuple
[int
,int
]]) – The size of image observations.initial_weather¶ (
Optional
[str
]) – If notNone
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (
Optional
[List
[Tuple
[float
,float
,float
]]]) – Defines the directions and maximum distances of the lidar rays ifuse_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.per_day_reward¶ (
Union
[int
,float
]) – The reward value for each day of survival Default:1
.seed¶ (
Optional
[int
]) – The seed for an instance’s internal generator. Default:None
.sim_name¶ (
str
) – Name of a simulation instance. Default:"SurvivalMeta"
.start_food¶ (
Optional
[int
]) – If notNone
, specifies initial food condition of the agent. Default:None
.start_health¶ (
Optional
[float
]) – If notNone
, specifies initial health condition of the agent. Default:None
.start_position¶ (
Optional
[Dict
[str
,Union
[float
,int
]]]) – If notNone
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.success_reward¶ (
Union
[int
,float
,None
]) – The final reward value if survived target days. Default:None
.target_days¶ (
int
) – Target days to survive.use_lidar¶ (
bool
) – IfTrue
, includes lidar in observations. Default:False
.use_voxel¶ (
bool
) – IfTrue
, includes voxel in observations. Default:False
.voxel_size¶ (
Optional
[Dict
[str
,int
]]) – Defines the voxel’s range in each axis ifuse_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (
Optional
[str
]) –Seed for deterministic world generation if
generate_world_type
is"default"
or"specified_biome"
. See here for more details. Default:None
.
- mc_ticks_per_day = 24000¶
- property task_prompt: str¶
- Return type
str
minedojo.tasks.meta.tech_tree module¶
- class minedojo.tasks.meta.tech_tree.TechTreeMeta(*, tech=None, tech_item=None, obtain_items_reward_weights=1.0, use_items_reward_weights=10.0, initial_mobs=None, initial_mob_spawn_range_low=None, initial_mob_spawn_range_high=None, spawn_rate=None, spawn_range_low=None, spawn_range_high=None, initial_inventory=None, start_position=None, start_health=None, start_food=None, initial_weather=None, break_speed_multiplier=1.0, seed=None, world_seed=None, fast_reset=True, image_size, use_voxel=False, voxel_size=None, use_lidar=False, lidar_rays=None, event_level_control=True, sim_name='TechTreeMeta')[source]¶
Bases:
minedojo.tasks.meta.base.ExtraSpawnMetaTaskBase
Class for tech tree tasks. :type _sphinx_paramlinks_minedojo.tasks.meta.tech_tree.TechTreeMeta.break_speed_multiplier: float :param _sphinx_paramlinks_minedojo.tasks.meta.tech_tree.TechTreeMeta.break_speed_multiplier: Controls the speed of breaking blocks. A value larger than 1.0 accelerates the breaking.
Default:
1.0
.- Parameters
event_level_control¶ (bool) – If
True
, the agent is able to perform high-level controls including place and equip. IfFalse
, then is keyboard-mouse level control. Default:True
.fast_reset¶ (bool) –
If
True
, reset using MC native command /kill, instead of waiting for re-generating new worlds. Default:True
.Warning
Side effects:
1. Changes to the world will not be reset. E.g., if the agent chops lots of trees then calling fast reset will not restore those trees.
2. If you specify agent starting health and food, these specs will only be respected at the first reset (i.e., generating a new world) but will not be respected in the following resets (i.e., reset using MC cmds). So be careful to use this wrapper if your usages require specific initial health/food.
3. Statistics/achievements will not be reset. This wrapper will maintain a property
info_prev_reset
. If your tasks use stat/achievements to evaluation, please retrieve this property and compute differences.image_size¶ (Union[int, Tuple[int, int]]) – The size of image observations.
initial_mobs¶ (Optional[Union[str, List[str]]]) – The types of mobs that are spawned initially. Default:
None
.initial_mob_spawn_range_high¶ (Optional[Tuple[int, int, int]]) – The upperbound on each horizontal axis from the center of the area to spawn initially. Default:
None
.initial_mob_spawn_range_low¶ (Optional[Tuple[int, int, int]]) – The lowerbound on each horizontal axis from the center of the area to spawn initially. Default:
None
.initial_weather¶ (Optional[str]) – If not
None
, specifies the initial weather. Can be one of"clear"
,"normal"
,"rain"
,"thunder"
. Default:None
.lidar_rays¶ (Optional[List[Tuple[float, float, float]]]) – Defines the directions and maximum distances of the lidar rays if
use_lidar
isTrue
. If supplied, should be a list of tuple(pitch, yaw, distance). Pitch and yaw are in radians and relative to agent looking vector. Default:None
.obtain_items_reward_weights¶ (Union[int, float, Dict[str, Union[int, float]]]) – The reward values of obtaining necessary items for unlocking the target tech. Default:
1.0
.seed¶ (Optional[int]) – The seed for an instance’s internal generator. Default:
None
.sim_name¶ (str) – Name of a simulation instance. Default:
"TechTreeMeta"
.spawn_range_high¶ (Optional[Tuple[int, int, int]]) – The upperbound on each horizontal axis from the center of the area to spawn Default:
None
.spawn_range_low¶ (Optional[Tuple[int, int, int]]) – The lowerbound on each horizontal axis from the center of the area to spawn Default:
None
.spawn_rate¶ (Optional[Dict[str, Union[float, int]]]) – The probability of spawning in each step. Default:
None
.start_food¶ (Optional[int]) – If not
None
, specifies initial food condition of the agent. Default:None
.start_health¶ (Optional[float]) – If not
None
, specifies initial health condition of the agent. Default:None
.start_position¶ (Optional[Dict[str, Union[float, int]]]) – If not
None
, specifies the agent’s initial location and orientation in the minecraft world. Default:None
.tech¶ (str | None) – Target tech to be unlocked.
use_lidar¶ (bool) – If
True
, includes lidar in observations. Default:False
.use_items_reward_weights¶ (Union[int, float, Dict[str, Union[int, float]]]) – The reward value of using the items, which is the last step of unlocking a tech. Default:
10.0
.use_voxel¶ (bool) – If
True
, includes voxel in observations. Default:False
.voxel_size¶ (Optional[Dict[str, int]]) – Defines the voxel’s range in each axis if
use_voxel
isTrue
. If supplied, should be a dict with keysxmin
,xmax
,ymin
,ymax
,zmin
,zmax
. Each value specifies the voxel size relative to the agent. Default:None
.world_seed¶ (Optional[str]) –
Seed for deterministic world generation if
generate_world_type
is"default"
or"specified_biome"
. See here for more details. Default:None
.
base task class for meta tasks that require extra spawn, e.g., harvest, combat, and techtree
- property task_prompt: str¶
- Return type
str