alfworld-device-operator
$
npx mdskill add zjunlp/SkillNet/alfworld-device-operatorOperate appliances to interact with objects in specific locations.
- Enables tasks requiring tools like microwaves or lamps to act on items.
- Depends on spatial reasoning to locate devices and target objects.
- Executes toggle, heat, cool, or clean actions based on detected context.
- Delivers results by performing physical interactions within the environment.
SKILL.md
.github/skills/alfworld-device-operatorView on GitHub ↗
---
name: alfworld-device-operator
description: Operates a device or appliance (like a desklamp, microwave, or fridge) to interact with another object. Use when the task requires using a tool on a target item (e.g., "look at laptop under the desklamp", "heat potato with microwave"). Locates both the device and target object, co-locates them, and executes the appropriate use action (toggle, heat, cool, or clean).
---
# Instructions
## 1. Skill Trigger
Activate this skill when the task goal explicitly requires **using a device or appliance** to interact with a target object. Common indicators include phrases like:
- "look at [object] under the [device]"
- "heat [object] with [device]"
- "cool [object] with [device]"
- "clean [object] with [device]"
## 2. Core Execution Flow
Follow this sequence when the skill is triggered:
### Phase 1: Locate the Device
1. **Identify the device** from the task description (e.g., `desklamp`, `microwave`, `fridge`).
2. **Search common receptacles** where such a device is typically found (e.g., desks, sidetables, countertops).
3. Use the `go to {recep}` action to navigate to and inspect these locations until the device is found.
4. **Note the device's exact name** (e.g., `desklamp 1`).
### Phase 2: Locate the Target Object
1. **Identify the target object** from the task description (e.g., `laptop`, `mug`, `plate`).
2. **Search the environment** for this object. It may not be near the device initially.
3. Use the `go to {recep}` and visual inspection to find the object.
4. Once found, use `take {obj} from {recep}` to pick it up.
### Phase 3: Co-locate Object and Device
1. **Navigate** to the receptacle where the target device is located using `go to {recep}`.
2. Ensure you are in the same location as the device before proceeding.
### Phase 4: Operate the Device
1. Execute the final **use action**. The specific action is determined by the device-object pair:
* For a `desklamp` and a viewable object (like a `laptop`, `book`), use: `toggle {device} {recep}`.
* For a `microwave` and a heatable object, use: `heat {obj} with {device}`.
* For a `fridge` and a coolable object, use: `cool {obj} with {device}`.
* For a `faucet`/`spraybottle` and a cleanable object, use: `clean {obj} with {device}`.
2. **Action Format:** The action must use the exact object and device names discovered during Phases 1 & 2.
## 3. Key Assumptions & Rules
* **Co-location Required:** The skill assumes the final action requires the target object and the operating device to be in the same location (on the same receptacle).
* **Device First:** Prioritize finding the device before extensively searching for the target object, as the device's location is often a fixed landmark.
* **Invalid Actions:** If the environment responds with "Nothing happened," re-evaluate your object/device names and your location. Ensure you are using the correct action verb for the device type.
## Example
**Scenario:** Task is "look at laptop under the desklamp."
```
Thought: I need to find the desklamp first. It's likely on a sidetable or desk.
Action: go to sidetable 1
Observation: On the sidetable 1, you see a desklamp 1.
Thought: Found the desklamp. Now I need to find the laptop.
Action: go to desk 1
Observation: On the desk 1, you see a laptop 1, a pen 2.
Action: take laptop 1 from desk 1
Observation: You pick up the laptop 1 from the desk 1.
Action: go to sidetable 1
Observation: On the sidetable 1, you see a desklamp 1.
Action: use desklamp 1
Observation: You turn on the desklamp 1.
```
**Result:** The laptop is now being examined under the desklamp, completing the task.
More from zjunlp/SkillNet
- alfworld-appliance-navigatorNavigates the agent to a target appliance (microwave, stove, fridge, or sinkbasin) needed for object processing. Use when you are holding an object that needs heating, cooling, or cleaning and must move to the correct appliance station. Identifies the required appliance from the task context and executes the movement action.
- alfworld-appliance-preparerPrepares a household appliance (microwave, oven, toaster, fridge) for use by ensuring it is in the correct open/closed state. Use when the agent needs to heat, cool, or cook an item and must first open or close the appliance before placing an object inside. Takes an appliance identifier as input and outputs a confirmation that the appliance is ready for the next action.
- alfworld-clean-objectCleans a specified object using an appropriate cleaning receptacle (e.g., sinkbasin). Use when a task requires an object to be in a clean state (e.g., "clean potato", "wash apple") before proceeding. Navigates to the cleaning location, performs the clean action, and confirms the object is now clean.
- alfworld-environment-scannerPerforms an initial scan of the ALFWorld environment to identify all visible objects and receptacles. Use when you first enter an environment and need to build a mental map for task planning. Processes raw observation text into a structured list of entities, categorizing them as objects or receptacles.
- alfworld-goal-interpreterParses the natural language task goal to extract actionable sub-objectives and required objects. Trigger this skill whenever a new task is assigned to break down complex instructions into clear, sequential targets. It interprets phrases like 'look at X under Y' to identify target objects (pillow), reference objects (desklamp), and spatial relationships (under).
- alfworld-heat-object-with-applianceUses a heating appliance (microwave, stoveburner, oven) to apply heat to a specified object. Use when the task requires warming or cooking an item (e.g., "heat some egg", "warm the mug") and a heating appliance is available. Takes the object name and appliance name as input and outputs the object in a heated state, ready for placement at the task's target location.
- alfworld-inventory-managementUse when the agent must collect and track multiple instances of the same object type in ALFWorld (e.g., "put two cellphone in bed"). This skill maintains a count of collected versus needed objects, guides systematic searching through receptacles, and ensures each found object is placed at the target before searching for the next.
- alfworld-locate-target-objectNavigates to a suspected location and identifies a target object. Use when your goal requires finding a specific object (e.g., "potato", "plate") and its location is not immediately known. Moves to a relevant receptacle (like a fridge or cabinet), checks its contents, and outputs the object's location or confirms its absence.
- alfworld-location-navigatorMoves the agent to a specified receptacle or object location within the Alfworld environment. Use this skill when the agent needs to physically approach a target to inspect or interact with it, such as when checking an object's state or preparing for pickup. The skill takes a target location name as input and executes the 'go to' action, resulting in the agent being positioned at the destination for subsequent operations.
- alfworld-navigation-plannerPlans a path to move the agent between receptacles to search for target objects. Use this when you need to traverse the environment to reach a specific location or systematically explore multiple areas. It takes the current location and destination receptacle as input, and outputs the next 'go to' action to approach the target.