jericho icon indicating copy to clipboard operation
jericho copied to clipboard

games stuck at certain steps (location ids)

Open Oaklight opened this issue 2 years ago • 6 comments

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)

Oaklight avatar Jun 02 '23 10:06 Oaklight

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

MarcCote avatar Jun 02 '23 12:06 MarcCote

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 avatar Jun 04 '23 10:06 Oaklight

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

Oaklight avatar Oct 24 '23 06:10 Oaklight

That's great. Thank you for reporting this.

MarcCote avatar Oct 26 '23 12:10 MarcCote

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.

Oaklight avatar Nov 09 '23 05:11 Oaklight

That is very helpful. Thanks for reporting.

MarcCote avatar Nov 09 '23 13:11 MarcCote