Pervasive-AI-Lab / LuckyMera

13 stars 3 forks source link

AttributeError: 'GameWhisperer' object has no attribute 'yes' #3

Open Felixvillas opened 5 months ago

Felixvillas commented 5 months ago

I got an error as follows when I run python -m main --inference:

LuckyMera using cuda: True
training mode: False
obs_keys: None

LuckyMera-v1.0 is looking for the Amulet of Yendor on the map ...

Fast_Mode : ON
Attempts :  5
Pray
Eat
Elbereth
Run
Break
Fight
Gold
StairsDescent
StairsAscent
ExploreClosest
Horizon
Unseen
HiddenRoom
HiddenCorridor

LuckyMera-v.10 is ready for YASD ...

// Mean :  0.0 // Median:  0  // Games:  0        (ಠ_ಠ)                
Traceback (most recent call last):
  File "/lustre/S/tianzikang/anaconda3/envs/llm/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/lustre/S/tianzikang/anaconda3/envs/llm/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/workspace/S/tianzikang/my_project/nleExper/LuckyMera/main.py", line 247, in <module>
    main()
  File "/workspace/S/tianzikang/my_project/nleExper/LuckyMera/main.py", line 244, in main
    main_logic(dungeon_walker, game, logic, skill_map, attempts)
  File "/workspace/S/tianzikang/my_project/nleExper/LuckyMera/core.py", line 1385, in main_logic
    rew, done, info = skill_map[skill].execution(path, arg1, agent, stats)
  File "/workspace/S/tianzikang/my_project/nleExper/LuckyMera/modules/general_modules.py", line 1007, in execution
    self.game.yes()
AttributeError: 'GameWhisperer' object has no attribute 'yes'

Here is my config:

{"skill_prio_list": [
    "Pray",
    "Eat",
    "Elbereth",
    "Run",
    "Break",
    "Fight",
    "Gold",
    "StairsDescent",
    "StairsAscent",
    "ExploreClosest",
    "Horizon",
    "Unseen",
    "HiddenRoom",
    "HiddenCorridor"
],

"fast_mode": "on",
"attempts": "5"
}
Felixvillas commented 5 months ago

I found the yes function in https://github.com/Pervasive-AI-Lab/LuckyMera/blob/ae75bcacbd820a6a4374e0b27c414e87e3d2c652/core.py, and the code is working now, but I'm not sure if it can work correctly.

I think it might be because you overlooked updating the yes function during the code update process, please fix this bug, thank you~ @luigiquara