Z-Machine¶
- class textworld.envs.zmachine.jericho.JerichoEnv(*args, **kwargs)[source]¶
Bases:
Environment
- Parameters:
request_infos – Information to be included in the game state. By default, only the game’s narrative is included.
- load(z_file)[source]¶
Loads a new text-based game.
- Parameters:
path – Path to the game file to load.
- Return type:
None
- step(command)[source]¶
Performs a given command.
- Parameters:
command – Text command to send to the interpreter.
- Returns:
A tuple containing the new game state, a reward for performing that command and reaching this new state, and whether the game is finished or not.
- property game_running: bool¶
Determines if the game is still running.
- Return type:
bool