microsoft / jericho

A learning environment for man-made Interactive Fiction games.
GNU General Public License v2.0
261 stars 43 forks source link

games stuck at certain steps (location ids) #64

Open Oaklight opened 1 year ago

Oaklight commented 1 year ago

I have been using Jericho for some projects, trinity always gets stuck at these steps when calling env.get_valid_actions()

TRINITY_STUCK_STEPS = set(
    [8, 13, 23, 29, 33, 35, 39, 43, 47, 49, 58, 59, 60, 65, 68, 69]
)

Actually, later I found it's the location id that matters. Here are the ones for trinity and sherlock

TRINITY_STUCK_LOC_ID = (79, 354, 144, 355, 531, 179, 371, 121, 438, 576, 323, 319, 575, 80, 316)
SHERLOCK_STUCK_LOC_ID = (111, 3, 37, 33, 93, 71, 5, 73, 1, 85, 295, 52, 57, 21, 69, 27, 12)
MarcCote commented 1 year ago

Hi @Oaklight , would you mind trying with this WIP branch I have and let me know if that still hangs?

pip install https://github.com/MarcCote/jericho/archive/refs/heads/fix_obj_num.zip
Oaklight commented 1 year ago

Hi @MarcCote, I tried this pip fix, but Trinity is still stuck at location 79, which prevents me from testing further. I didn't test Sherlock.

Meanwhile, I think this behavior might be useful for debugging: I can't ctrl+c to stop the running process of the Trinity emulator, only able to kill it in my Linux task manager. some error messages I see repeatedly (they are the same as the ones before applying the pip fix):

KeyboardInterrupt
Traceback (most recent call last):
  File "/home/me/mambaforge/envs/my_env/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/me/mambaforge/envs/my_env/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/me/mambaforge/envs/my_env/lib/python3.11/multiprocessing/pool.py", line 114, in worker
    task = get()
           ^^^^^
  File "/home/me/mambaforge/envs/my_env/lib/python3.11/multiprocessing/queues.py", line 364, in get
    with self._rlock:
  File "/home/me/mambaforge/envs/my_env/lib/python3.11/multiprocessing/synchronize.py", line 95, in __enter__
    return self._semlock.__enter__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^

Hope this could be of some help.

Oaklight commented 11 months ago

Hi @Oaklight , would you mind trying with this WIP branch I have and let me know if that still hangs?

pip install https://github.com/MarcCote/jericho/archive/refs/heads/fix_obj_num.zip

this fix corrected the object tree error in walking the walkthrough in these games for me when using jericho==3.1.2

tryst205 deephome spirit curses advent

MarcCote commented 11 months ago

That's great. Thank you for reporting this.

Oaklight commented 11 months ago

Meanwhile, we also noticed the fix altered the env.get_walkthrough on many games. Seed was set as default. Many typos appeared in the observations after taking each step, such as missing first letter, missing space, missing 'the', trailing dots.

MarcCote commented 11 months ago

That is very helpful. Thanks for reporting.