- class minihack.navigation.MiniHackNavigation(*args: Any, **kwargs: Any)[source]
The base class for MiniHack Navigation tasks.
Navigation tasks have the following characteristics:
Restricted action space: By default, the agent can only move towards eight compass directions.
Yes/No questions, as well as menu-selection actions are disabled by default.
The character is set to chaotic human male rogue.
Auto-pick is enabled by default.
Maximum episode limit defaults to 100 (can be overriden via the max_episode_steps argument)
The default goal is to reach the stair down. This can be changed using a reward manager.
- __init__(*args, des_file: Optional[str] = None, **kwargs)[source]
Constructs a new MiniHack environment.
des_file (str) – The description file for the environment.
reward_win (float) – The reward received upon successfully completing an episode. Defaults to 1.
reward_lose (float) – The reward received upon death or aborting. Defaults to 1.
obs_crop_h (int) – The height of agent-centred cropped observation. Defaults to 9.
obs_crop_w (int) – The width of agent-centred cropped observation. Defaults to 9.
obs_crop_pad (int) – The padding for agent-centred cropped observation. Defaults to 0.
reward_manager (RewardManager or None) – The reward manager that describes the custom reward function of the agent. If None, the goal of the agent is to reach the stair down. Defaults to None.
use_wiki (bool) – Whether to use the NetHack wiki. Defaults to False.
autopickup (bool) – Turning autopickup on or off. Defaults to True.
pet (bool) – Whether to include the pet. Defaults to False.
observation_keys (list) – The keys of observations returned after every timestep by the environment as a dictionary. Defaults to
seeds (list or None) – A list of integers used as level seeds for sampling episodes. The reset()` function samples a seed from this list uniformly at random and uses it for setting the level. When the
sample_seedargument of the reset function is set to False, a random level will not be sampled from this list during environment resetting. If None, the entire level distribution is used. Defaults to None.
penalty_mode (str) – The name of the mode for calculating the time step penalty. Can be
always. Defaults to
constant. Inherited from NetHackScore.
penalty_step (float) – A constant applied to amount of frozen steps. Defaults to -0.01. Inherited from NetHackScore.
penalty_time (float) – A constant applied to amount of frozen steps. Defaults to -0.0. Inherited from NetHackScore.
save_ttyrec_every (int) – Integer, if 0, no ttyrecs (game recordings) will be saved. Otherwise, save a ttyrec every Nth episode. Defaults to 0. Inherited from NLE.
savedir (str or None) – Path to save ttyrecs (game recordings) into, if save_ttyrec_every is nonzero. If nonempty string, interpreted as a path to a new or existing directory. If “” (empty string) or None, NLE choses a unique directory name. Defaults to None. Inherited from NLE.
character (str) – Name of character. Defaults to “mon-hum-neu-mal”. Interited from NLE.
max_episode_steps (int) – maximum amount of steps allowed before the game is forcefully quit. In such cases,
info["end_status"]ill be equal to
StepStatus.ABORTED. Defaults to 200. Inherited from NLE.
actions (list) – list of actions. If None, the full action space will be used, i.e.
nle.nethack.ACTIONS. Defaults to MH_FULL_ACTIONS. Inherited from NLE.
wizard (bool) – activate wizard mode. Defaults to False. Inherited from NLE.
allow_all_yn_questions (bool) – If set to True, no y/n questions in step() are declined. If set to False, only elements of SKIP_EXCEPTIONS are not declined. Defaults to True. Inherited from NLE.
allow_all_modes (bool) – If set to True, do not decline menus, text input or auto ‘MORE’. If set to False, only skip click through ‘MORE’ on death. Defaults to False. Inherited from NLE.
spawn_monsters (bool) – If False, disables normal NetHack behavior to randomly create monsters. Defaults to False. Inherited from NLE.
include_see_actions (bool) – If True, the agent’s action space includes the additional NLE actions introduced in the 0.8.1 release. Has no effect when the actions parameter is specified. Defaults to True.
include_alignment_blstats (bool) – If True, the agent’s observation space includes the alignment information in the blstats. This is introduced in NLE 0.9.0 release. Defaults to True.