- class minihack.navigation.MiniHackNavigation(*args: Any, **kwargs: Any)
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)
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.
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 random seeds for sampling episodes. 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.
savedir (str or None) – path to save ttyrecs (game recordings) into. Defaults to None, which doesn’t save any data. Otherwise, interpreted as a path to a new or existing directory. If “” (empty string), NLE choses a unique directory name. 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 5000. Inherited from NLE.
actions (list) – list of actions. If None, the full action space will be used, i.e.
nle.nethack.ACTIONS. Defaults to None. Inherited from NLE.
wizard (bool) – activate wizard mode. Defaults to False.
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 False. 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. Inherited from NLE.