Skip to content

Problem running the simple agent notebook #38

@bugtig

Description

@bugtig

I received the following error while running the simple neural agent in the notebook:

Traceback (most recent call last):
  File "debug.py", line 71, in <module>
    train_agent(agent, "obj_10_qlen_3_room_2/*ulx")
  File "debug.py", line 50, in train_agent
    game_state, reward, done = env.step(command)
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/envs/glulx/git_glulx_ml.py", line 441, in step
    self.game_state = self.game_state.update(command, output)
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/envs/glulx/git_glulx_ml.py", line 216, in update
    game_state._game_progression.update(game_state._action)
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/generator/game.py", line 624, in update
    self.quest_progression.update(action, bypass=self.winning_policy[:i])
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/generator/game.py", line 529, in update
    self._pop_action_from_tree(action, self._tree)
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/generator/game.py", line 486, in _pop_action_from_tree
    tree.pop(action)
  File "/home/anaconda3/envs/textworld/lib/python3.6/site-packages/textworld/generator/dependency_tree.py", line 109, in pop
    raise ValueError("That element is not a leaf: {!r}.".format(value))
ValueError: That element is not a leaf: Action('take/c-P-r-c-k-I', (Proposition('at', (Variable('P', 'P'), Variable('r_1', 'r'))), Proposition('at', (Variable('c_0', 'c'), Variable('r_1', 'r'))), Proposition('open', (Variable('c_0', 'c'),)), Proposition('in', (Variable('k_0', 'k'), Variable('c_0', 'c')))), (Proposition('at', (Variable('P', 'P'), Variable('r_1', 'r'))), Proposition('at', (Variable('c_0', 'c'), Variable('r_1', 'r'))), Proposition('open', (Variable('c_0', 'c'),)), Proposition('in', (Variable('k_0', 'k'), Variable('I', 'I'))))).

Any ideas what is going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions