alfworld / alfworld

ALFWorld: Aligning Text and Embodied Environments for Interactive Learning
MIT License
334 stars 49 forks source link

Turn off the faucet #62

Open BatmanofZuhandArrgh opened 5 months ago

BatmanofZuhandArrgh commented 5 months ago

Hi, ToggleOff and ToggleOn is depreciated in alfworld == 0.3.3, right? I'm wonder what's the command to turn off the faucet?

MohitShridhar commented 5 months ago

@MarcCote, do the changes affect Toggle actions?

MarcCote commented 5 months ago

The changes are not supposed to affect the games. I'd need to have a closer look but I'm pretty busy this week. @BatmanofZuhandArrgh can you share a problematic game id (e.g., the path to the game file) and the trace that show case the error with us?

BatmanofZuhandArrgh commented 5 months ago

Hi, No particular error game. It's just that I don't know what command to use to turn off a faucet. This is in alfworld/alfworld/agents/controller/base.py right now for Toggle input:

   elif "use " in action_str: 
        tar = action_str.replace("use ", "") 
        return {'action': self.Action.TOGGLE, 'tar': tar} 

This is the same input in 0.2.2 i believe (I'm using LLM-Planner which integrates Alfworld==0.2.2 into its code base):

    elif "ToggleObjectOn " in action_str:
        tar = action_str.replace("ToggleObjectOn ", "")
        return {'action': self.Action.TOGGLE, 'tar': tar}
    elif "ToggleObjectOff " in action_str:
        tar = action_str.replace("ToggleObjectOff ", "")
        return {'action': self.Action.TOGGLE, 'tar': tar}

Please correct me if I misunderstand anything

MarcCote commented 4 months ago

Can you tell me which game has a faucet to toggle?

The use command (i.e., the one that maps to ToggleObject) does work with lamp for instance.

alfworld-play-tw ~/.cache/alfworld/json_2.1.1/train/look_at_obj_in_light-AlarmClock-None-DeskLamp-301/trial_T20190907_174127_043461/
-= Welcome to TextWorld, ALFRED! =-

You are in the middle of a room. Looking quickly around you, you see a bed 1, a desk 1, a drawer 17, a drawer 16, a drawer 15, a drawer 14, a drawer 13, a drawer 12, a drawer 11, a drawer 10, a drawer 9, a drawer 8, a drawer 7, a drawer 6, a drawer 5, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a dresser 1, a garbagecan 1, a shelf 6, a shelf 5, a shelf 4, a shelf 3, a shelf 2, and a shelf 1.

Your task is to: look at alarmclock under the desklamp.
Oracle: [None/None|(None): go to dresser 1 > use desklamp 1 > take alarmclock 2 from dresser 1]

> go to dresser 1
You arrive at loc 4. On the dresser 1, you see a alarmclock 2, a desklamp 1, a keychain 3, a keychain 1, and a watch 1.
Oracle: [0/None|(None): use desklamp 1 > take alarmclock 2 from dresser 1]

> use desklamp 1
You turn on the desklamp 1.
Oracle: [0/None|(None): take alarmclock 2 from dresser 1]

>
Acejoy commented 4 months ago

@MarcCote , @BatmanofZuhandArrgh , Hey, can you also tell me where I can get a manual/guide on which words to use to interact with an object? Thanks

BatmanofZuhandArrgh commented 4 months ago

There's none that I found, I just read the code @Acejoy Sorry I don't have the specific. Just any kitchen or bathroom has faucet @MarcCote

Acejoy commented 4 months ago

Okay, thanks. @BatmanofZuhandArrgh

MarcCote commented 3 months ago

@Acejoy if you are running alfworld-play-tw you can use the autocomplete (<tab>) to list the available commands.

MarcCote commented 3 months ago

Also, @BatmanofZuhandArrgh I double checked and there is no text-based game that requires to toggle faucet (nor could I found games with faucet). Some games do require to clean stuff which is done with the action clean X with Y where Y is an object of the sink type.