microsoft / microsoft/jericho

Environment stuck in a state of Zork1

Open
#53 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
337
Forks
48
Avg merge
9h 5m
Merged PRs (30d)
2

Description

The environment get stuck when trying to get_valid_actions() after loading this state and applying step('put sack in egg').

The state is attached by a pickle file state.pickle.zip, and the following code can reproduce the problem.

import jericho
import pickle

env = jericho.FrotzEnv('zork1.z5')
with open('state.pickle', 'rb') as f:
    state = pickle.load(f)
env.set_state(state)

env.step('put sack in egg')
env.get_valid_actions() # stuck here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in the issue: load the attached state.pickle, call env.step('put sack in egg'), and then run env.get_valid_actions(). Investigate the environment state handling around that sequence and verify that get_valid_actions() returns instead of remaining stuck.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.