Create, Evaluate, and Connect AI Skills
Python ai-agentsai-skillsartificial-intelligenceknowledge-graphlarge-language-modelsnatural-language-processingopenkgskillnetskills
upload experiments
LiamLYYY388baa364092
diff --git a/experiments/.gitignore b/experiments/.gitignorenew file mode 100644index 0000000..46c9745--- /dev/null+++ b/experiments/.gitignore@@ -0,0 +1,2 @@+__pycache__/+.DS_Store\ No newline at end of filediff --git a/experiments/README.md b/experiments/README.mdnew file mode 100644index 0000000..a8f2777--- /dev/null+++ b/experiments/README.md@@ -0,0 +1,99 @@+# Evaluation Experiments++This section provides instructions for setting up the evaluation environments.++## π Expected Directory Structure++To ensure the scripts can locate the environments, please organize your files as follows:++```text+SkillNet/+βββ experiments/+β βββ alfworld/ # git clone here+β βββ ScienceWorld/ # git clone here+β βββ WebShop/ # git clone here+β βββ src/+β βββ requirements.txt+β βββ alfworld_run.py+β βββ scienceworld_run.py+β βββ webshop_run.py+```++## π Quick Start++We suggest configuring separate conda environments for these three datasets to avoid dependency conflicts.++### ALFWorld+1. **Clone & Setup:**+ ```bash+ cd experiments+ git clone https://github.com/alfworld/alfworld.git+ cd alfworld+ # Follow the official installation steps from the repo (https://github.com/alfworld/alfworld)+ ```+2. **Environment Variable:**+- Set `ALFWORLD_DATA` to the dataset root or edit `src/alfworld/base_config.yaml` to point to your local paths:++ ```bash+ export ALFWORLD_DATA=/path/to/alfworld_data+ ```++### ScienceWorld+1. **Clone & Setup:**+ ```bash+ cd experiments+ git clone https://github.com/allenai/ScienceWorld.git+ cd ScienceWorld+ # Refer to the ScienceWorld repository for environment setup (https://github.com/allenai/ScienceWorld)+ ```++### WebShop+1. **Clone & Setup:**+ ```bash+ cd experiments+ git clone https://github.com/princeton-nlp/WebShop.git+ cd WebShop+ # Refer to the WebShop repository for environment setup (https://github.com/princeton-nlp/WebShop)+ ```++---++For each environment, install common dependencies:+```bash+cd experiments+pip install -r requirements.txt+```++### Running+#### Step 1: Initialize Environment Variables+Before running the scripts, configure your API credentials:+```bash+export API_KEY=YOUR_API_KEY+export BASE_URL=YOUR_API_BASE_URL+```++#### Step 2: Execution+Run the corresponding evaluation script from the `experiments/` directory.+```python+cd experiments++# ALFWorld+python alfworld_run.py --model o4-mini --split dev --max_workers 10 --exp_name alf_test --use_skill++# ScienceWorld+python scienceworld_run.py --model o4-mini --split test --max_workers 5 --exp_name sci_test --use_skill++# WebShop+python webshop_run.py --model o4-mini --max_workers 3 --exp_name web_test --use_skill+```++#### π οΈ Argument Descriptions+- `--model`: The name of the LLM to evaluate.++- `--split`: Data split to use (`dev` or `test`).++- `--max_workers`: Number of parallel workers for evaluation.++- `exp_name`: results save name.++- `--use_skill`: Enable the skill-augmented module.\ No newline at end of filediff --git a/experiments/alfworld_run.py b/experiments/alfworld_run.pynew file mode 100644index 0000000..0696091--- /dev/null+++ b/experiments/alfworld_run.py@@ -0,0 +1,387 @@+import os+from openai import OpenAI+import re+from retry import retry+import concurrent.futures+from concurrent.futures import ThreadPoolExecutor, as_completed+from tqdm import tqdm+import json+import argparse+import yaml+import alfworld+import alfworld.agents.environment+from alfworld.agents.environment import get_environment+import sys++from src.alfworld.prompts.system_prompt import alfworld_system_prompt+from src.skill import SkillModule++client = OpenAI(+ api_key=os.environ["API_KEY"],+ base_url=os.environ["BASE_URL"]+)++@retry(tries=5, delay=5, backoff=2, jitter=(1, 3))+def llm(prompt, model="YOUR_MODEL_NAME"):+ print(f'Calling LLM with model: {model}')+ # Normalize messages format+ if isinstance(prompt, list):+ messages = prompt+ elif isinstance(prompt, str):+ messages = [{"role": "user", "content": prompt}]+ else:+ raise ValueError(f'prompt must be a list or a string, but got {type(prompt)}')+ response = client.chat.completions.create(+ model=model,+ messages=messages+ )+ # Extract content+ content = response.choices[0].message.content+ if content is not None:+ return content+ return "Output Error"+++def process_ob(ob):+ if ob.startswith('You arrive at loc '):+ ob = ob[ob.find('. ')+2:]+ return ob++# ==========================================+# Constants & Configuration+# ==========================================++class Colors:+ RED = '\033[91m'+ GREEN = '\033[92m'+ YELLOW = '\033[93m'+ BLUE = '\033[94m'+ RESET = '\033[0m'++# ==========================================+# Helper Functions+# ==========================================++def parse_action(response: str) -> str:+ """+ Extracts the action from the LLM response using regex.+ """+ pattern = re.compile(r"Action:\s*(.+)", re.IGNORECASE)+ match = pattern.search(response)+ if match:+ return match.group(1).strip().strip('"\'*`')+ return ""++def run_standard_procedure(env, llm, model, process_ob, messages, max_steps):+ """+ Executes the standard interaction loop when no skill is available+ or when falling back from a failed skill retrieval.+ """+ task_done = False+ task_reward = 0+ current_steps = 0++ while not task_done and current_steps < max_steps:+ current_steps += 1++ # 1. Get Agent Response+ try:+ response = llm(messages, model)+ print(f'{Colors.GREEN}Agent response: \n{response}{Colors.RESET}')+ except Exception as e:+ print(f'{Colors.RED}Error in LLM call: {e}{Colors.RESET}')+ break++ messages.append({"role": "assistant", "content": response})++ # 2. Parse and Execute Action+ action = parse_action(response)+ action_list = [action]++ observation, task_reward, done, info = env.step(action_list)++ # 3. Process Observation+ observation, task_reward, task_done = (+ process_ob(observation[0]),+ info["won"][0],+ done[0]+ )++ print(f'{Colors.YELLOW}Observation: \n{observation}{Colors.RESET}')++ # 4. Update History+ messages.append({"role": "user", "content": f"Observation: {observation}"})++ if task_done:+ print(f'{Colors.GREEN}Whole Task completed! Reward: {task_reward}{Colors.RESET}')++ return messages, task_done, task_reward, current_steps++# ==========================================+# Core Execution Logic+# ==========================================++def alfworld_run_single(env, obs=[], names=[], max_steps=30, model=None, Skill_Module=None):+ """+ Execute a batch of Alfworld tasks (typically size 1 when parallelized).+ Handles both standard execution and skill-augmented procedure execution.+ """+ results = []++ for task_idx, (ob, name) in enumerate(zip(obs, names)):+ print(f'{Colors.RED}Processing task {task_idx + 1}/{len(obs)}: {name}{Colors.RESET}')++ # Extract specific task query+ query = ob.split('Your task is to: ')[-1].split('\n')[0].strip()++ # Initialize context+ messages = [{"role": "system", "content": alfworld_system_prompt}]+ messages.append({"role": "user", "content": ob})++ # Initialize loop variables+ task_done = False+ task_reward = 0+ steps = 0+ relevant_skill_names = []+ overall_procedure = ""+ overall_procedure_code = ""++ # Determine Execution Strategy (Skill_Module vs Standard)+ use_skill = False+ if Skill_Module is not None:+ relevant_skill_names = Skill_Module.retrieve_relevant_skills(ob)+ if relevant_skill_names:+ use_skill = True+ print(f'{Colors.BLUE}Retrieved relevant skills: {relevant_skill_names}{Colors.RESET}')+ else:+ print(f"[INFO] No relevant skills found for task: {name}. Falling back to standard execution.")++ # Execute Strategy+ if use_skill:+ overall_procedure = Skill_Module.generate_overall_procedure(ob, relevant_skill_names)+ print(f'\n{Colors.BLUE}Generated Overall Procedure:\n{overall_procedure}{Colors.RESET}')++ MAX_RETRIES = 3+ retries = 0++ while retries < MAX_RETRIES:+ try:+ overall_procedure_code = Skill_Module.generate_overall_procedure_code(ob, overall_procedure)+ print(f'\n{Colors.BLUE}Generated Overall Procedure Code:\n{overall_procedure_code}{Colors.RESET}')++ # Dynamic execution of generated procedure+ namespace = {}+ exec(overall_procedure_code, namespace)+ func = namespace["overall_procedure_code"]++ messages, task_done, task_reward, steps = func(+ env, llm, model, process_ob, parse_action, messages, max_steps+ )++ if task_done:+ print(f'{Colors.GREEN} Task completed! Reward: {task_reward}{Colors.RESET}')+ break+ except Exception as e:+ print(f'Error loading/executing procedure script: {e}')+ retries += 1+ else:+ # Fallback to Standard Execution Loop+ messages, task_done, task_reward, steps = run_standard_procedure(+ env, llm, model, process_ob, messages, max_steps+ )++ # Record Results+ results.append({+ "query": query,+ "name": name,+ "task_done": task_done,+ "reward": task_reward,+ "steps": steps,+ "messages": messages,+ "relevant_skill_names": relevant_skill_names+ })++ return results++def eval_single_game(game_idx, args, config, split, output_path):+ """+ Worker function: Initializes an independent environment, fast-forwards to the+ specific task, and performs the evaluation.+ """+ try:+ # 1. Independent Environment Initialization (Batch Size = 1)+ # This ensures thread safety/process isolation.+ env = get_environment(config["env"]["type"])(config, train_eval=split)+ env = env.init_env(batch_size=1)++ # 2. Fast-forward to specific Game ID+ obs_list = []+ info = {}+ for _ in range(game_idx + 1):+ obs_list, info = env.reset()++ # 3. Initialize SkillModule (if enabled)+ Skill_Module = None+ if args.use_skill:+ skill_config = {+ "skills_dir": "src/skills/alfworld",+ "overall_procedure_examples_path": "src/alfworld/alfworld_overall_procedure_examples.txt",+ "procedure_code_template_path": "src/alfworld/alfworld_procedure_code_template.py",+ "model": args.model+ }+ Skill_Module = SkillModule(**skill_config)++ # 4. Prepare Observation+ ob_str = '\n'.join(obs_list[0].split('\n\n')[1:])+ game_name = '/'.join(info['extra.gamefile'][0].split('/')[-3:-1])++ # 5. Execute Task+ batch_results = alfworld_run_single(+ env=env,+ obs=[ob_str],+ names=[game_name],+ max_steps=args.max_steps,+ model=args.model,+ Skill_Module=Skill_Module+ )++ result = batch_results[0]++ # 6. Save Results (Atomic write per file)+ save_file = f'{output_path}/idx_{game_idx}.json'+ with open(save_file, 'w') as f:+ json.dump(result, f, indent=4, ensure_ascii=False)++ return result++ except Exception as e:+ print(f"Error in game {game_idx}: {e}")+ return None+ finally:+ # 6. CRITICAL: Close the environment+ if env:+ env.close()++# ==========================================+# Main Entry Point+# ==========================================++def main(args):+ model_name = args.model++ # Load configuration+ with open('src/alfworld/base_config.yaml') as reader:+ config = yaml.safe_load(reader)++ # Determine split+ split = "eval_in_distribution" if args.split == 'dev' else "eval_out_of_distribution"++ # Setup output directory+ output_path = f'results/alfworld/{model_name}/{args.split}_{args.exp_name}_skill_{args.use_skill}'+ if not os.path.exists(output_path):+ os.makedirs(output_path, exist_ok=True)++ # ---------------------------------------------------------+ # Determine Total Game Count+ # ---------------------------------------------------------+ # Temporarily initialize environment to get the total number of games+ temp_env = get_environment(config["env"]["type"])(config, train_eval=split)+ temp_env = temp_env.init_env(batch_size=1)+ num_games = len(temp_env.gamefiles)+ del temp_env+ print(f"Total games to evaluate: {num_games}")++ # ---------------------------------------------------------+ # Identify Remaining Tasks (Checkpointing)+ # ---------------------------------------------------------+ tasks_to_run = []+ finished_games = 0+ all_rewards = 0+ all_steps = 0+ existing_files = set()++ # Scan existing results+ if os.path.exists(output_path):+ for file in os.listdir(output_path):+ if file.endswith('.json') and file.startswith('idx_'):+ try:+ idx = int(file.split('_')[1].split('.')[0])+ existing_files.add(idx)++ with open(f'{output_path}/{file}', 'r') as f:+ res = json.load(f)+ all_rewards += res['reward']+ all_steps += res['steps']+ finished_games += 1+ except:+ continue++ # Filter tasks to run+ for idx in range(num_games):+ if idx not in existing_files:+ tasks_to_run.append(idx)++ print(f"Already finished: {finished_games}, Remaining: {len(tasks_to_run)}")++ # ---------------------------------------------------------+ # Parallel Execution+ # ---------------------------------------------------------+ max_workers = args.max_workers+ print(f"Starting parallel evaluation with {max_workers} workers...")++ with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor:+ # Submit all tasks+ future_to_idx = {+ executor.submit(+ eval_single_game,+ idx,+ args,+ config,+ split,+ output_path+ ): idx for idx in tasks_to_run+ }++ # Monitor progress with tqdm+ pbar = tqdm(total=len(tasks_to_run), desc="Evaluating ALFWorld")++ for future in concurrent.futures.as_completed(future_to_idx):+ idx = future_to_idx[future]+ try:+ result = future.result()+ if result:+ finished_games += 1+ all_rewards += result['reward']+ all_steps += result['steps']++ # Update progress bar description+ current_avg_reward = all_rewards / finished_games if finished_games > 0 else 0+ current_avg_steps = all_steps / finished_games if finished_games > 0 else 0+ pbar.set_postfix({+ 'Avg Reward': f'{current_avg_reward:.2f}',+ 'Avg Steps': f'{current_avg_steps:.2f}'+ })+ except Exception as exc:+ print(f'\nGame {idx} generated an exception: {exc}')++ pbar.update(1)++ pbar.close()++ # Final Summary+ print(f"Evaluation finished. Total Games: {finished_games}")+ if finished_games > 0:+ print(f"Final Avg Reward: {all_rewards / finished_games}")+ print(f"Final Avg Steps: {all_steps / finished_games}")++if __name__ == '__main__':+ parser = argparse.ArgumentParser()+ parser.add_argument('--model', type=str, default='gpt-4o')+ parser.add_argument('--split', type=str, default='dev')+ parser.add_argument('--max_workers', type=int, default=10, help="Number of parallel workers")+ parser.add_argument('--max_steps', type=int, default=30)+ parser.add_argument('--exp_name', type=str, default='')+ parser.add_argument('--use_skill', action='store_true')+ args = parser.parse_args()++ main(args)\ No newline at end of filediff --git a/experiments/requirements.txt b/experiments/requirements.txtnew file mode 100644index 0000000..2acf5bb--- /dev/null+++ b/experiments/requirements.txt@@ -0,0 +1,4 @@+openai>=1.0.0+retry+tqdm+pyyaml\ No newline at end of filediff --git a/experiments/scienceworld_run.py b/experiments/scienceworld_run.pynew file mode 100644index 0000000..b8782d0--- /dev/null+++ b/experiments/scienceworld_run.py@@ -0,0 +1,346 @@+import os+from openai import OpenAI+import re+from retry import retry+import concurrent.futures+from concurrent.futures import ThreadPoolExecutor, as_completed+from tqdm import tqdm+import json+import sys+import argparse++from scienceworld import ScienceWorldEnv++from src.scienceworld.prompts.system_prompt import scienceworld_system_prompt+from src.skill import SkillModule++client = OpenAI(+ api_key=os.environ["API_KEY"],+ base_url=os.environ["BASE_URL"]+)++@retry(tries=5, delay=5, backoff=2, jitter=(1, 3))+def llm(prompt, model="YOUR_MODEL_NAME"):+ print(f'Calling LLM with model: {model}')+ # Normalize messages format+ if isinstance(prompt, list):+ messages = prompt+ elif isinstance(prompt, str):+ messages = [{"role": "user", "content": prompt}]+ else:+ raise ValueError(f'prompt must be a list or a string, but got {type(prompt)}')+ response = client.chat.completions.create(+ model=model,+ messages=messages+ )+ # Extract content+ content = response.choices[0].message.content+ if content is not None:+ return content+ return "Output Error"++++# ==========================================+# Constants & Configuration+# ==========================================++class Colors:+ RED = '\033[91m'+ GREEN = '\033[92m'+ YELLOW = '\033[93m'+ BLUE = '\033[94m'+ RESET = '\033[0m'++# ==========================================+# Helper Functions+# ==========================================++def parse_action(response: str) -> str:+ """+ Extracts the action from the LLM response using regex.+ """+ pattern = re.compile(r"Action:\s*(.+)", re.IGNORECASE)+ match = pattern.search(response)+ if match:+ return match.group(1).strip().strip('"\'*`')+ return ""++def run_standard_procedure(env, llm, model, messages, max_steps):+ """+ Executes the standard interaction loop when no skills are used.+ """+ task_done = False+ task_reward = 0+ current_steps = 0++ while not task_done and current_steps < max_steps:+ current_steps += 1++ # 1. Get Agent Response+ try:+ response = llm(messages, model)+ print(f'{Colors.GREEN}Agent response: \n{response}{Colors.RESET}')+ except Exception as e:+ print(f'{Colors.RED}Error in LLM call: {e}{Colors.RESET}')+ break++ messages.append({"role": "assistant", "content": response})++ # 2. Parse and Execute Action+ action = parse_action(response)+ observation, step_reward, task_done, info = env.step(action)++ task_reward = info['score'] if info['score'] is not None and info['score'] > task_reward else task_reward++ print(f'{Colors.YELLOW}Observation: \n{observation}{Colors.RESET}')++ # 3. Update History+ messages.append({"role": "user", "content": f"Observation: {observation}"})++ if task_done:+ print(f'{Colors.GREEN}Whole Task completed! Reward: {task_reward}{Colors.RESET}')++ return messages, task_done, task_reward, current_steps++# ==========================================+# Core Execution Logic+# ==========================================++def scienceworld_run_single(env, task_name, var_idx, args, Skill_Module=None):+ """+ Execute a single task variation.+ """+ # 1. Reset Environment & Get Initial Observation+ # ScienceWorld reset returns (observation, info)+ obs, info = env.reset()++ # Construct Task Description+ query = env.get_task_description()++ print(f'{Colors.RED}Processing: {task_name} (Var: {var_idx}){Colors.RESET}')+ print(f"Query: {query}")++ # 2. Initialize Prompt / Messages+ messages = [{"role": "system", "content": scienceworld_system_prompt}]+ messages.append({"role": "user", "content": query})++ # 3. Execution Strategy (Skill vs Standard)+ task_done = False+ task_reward = 0+ steps = 0+ relevant_skill_names = []+ overall_procedure = ""+ overall_procedure_code = ""+++ use_skill = False+ if Skill_Module is not None:+ relevant_skill_names = Skill_Module.retrieve_relevant_skills(query)+ if relevant_skill_names:+ use_skill = True+ print(f'{Colors.BLUE}Retrieved relevant skills: {relevant_skill_names}{Colors.RESET}')++ if use_skill:+ overall_procedure = Skill_Module.generate_overall_procedure(query, relevant_skill_names)+ print(f'\n{Colors.BLUE}Generated Overall Procedure:\n{overall_procedure}{Colors.RESET}')++ MAX_RETRIES = 3+ retries = 0+ while retries < MAX_RETRIES:+ try:+ overall_procedure_code = Skill_Module.generate_overall_procedure_code(query, overall_procedure)+ print(f'\n{Colors.BLUE}Generated Procedure Code:\n{overall_procedure_code}{Colors.RESET}')++ namespace = {}+ exec(overall_procedure_code, namespace)+ func = namespace.get("overall_procedure_code")++ if func:+ messages, task_done, task_reward, steps = func(+ env, llm, args.model, parse_action, messages, args.max_steps+ )+ else:+ raise ValueError("Function 'overall_procedure_code' not found in generated code.")++ if task_done:+ print(f'{Colors.GREEN} Task completed! Reward: {task_reward}{Colors.RESET}')+ break+ except Exception as e:+ print(f'Error loading/executing procedure script: {e}')+ retries += 1+ else:+ messages, task_done, task_reward, steps = run_standard_procedure(+ env, llm, args.model, messages, args.max_steps+ )++ return {+ "query": query,+ "name": task_name,+ "variation_idx": var_idx,+ "task_done": task_done,+ "reward": task_reward,+ "steps": steps,+ "messages": messages,+ "relevant_skill_names": relevant_skill_names+ }++# ==========================================+# Worker Function+# ==========================================++def eval_single_variation(idx, indices, args, output_path):+ """+ Worker function: Instantiates its own ScienceWorldEnv.+ task_info: tuple (task_name, variation_index)+ """+ task_name, var_idx = indices[idx]+ env = None+ try:+ # 1. Independent Environment Initialization+ env = ScienceWorldEnv(taskName=None, serverPath=None, envStepLimit=args.max_steps)++ # 2. Load Specific Task & Variation+ env.load(task_name, var_idx, simplificationStr="easy")++ # 3. Initialize SkillModule (if enabled)+ Skill_Module = None+ if args.use_skill:+ skill_config = {+ "skills_dir": "src/skills/scienceworld",+ "overall_procedure_examples_path": "src/scienceworld/scienceworld_overall_procedure_examples.txt",+ "procedure_code_template_path": "src/scienceworld/scienceworld_procedure_code_template.py",+ "model": args.model+ }+ Skill_Module = SkillModule(**skill_config)++ # 4. Run Task+ result = scienceworld_run_single(env, task_name, var_idx, args, Skill_Module)++ # 5. Save Results (Atomic write per file)+ save_file = f'{output_path}/idx_{idx}.json'+ with open(save_file, 'w') as f:+ json.dump(result, f, indent=4, ensure_ascii=False)++ return result++ except Exception as e:+ print(f"Error in task {task_name} var {var_idx}: {e}")+ return None+ finally:+ # 6. CRITICAL: Close the environment to kill the Java process+ if env:+ env.close()++# ==========================================+# Main Entry Point+# ==========================================++def main(args):+ model_name = args.model++ # Setup output directory+ output_path = f'results/scienceworld/{model_name}/{args.split}_{args.exp_name}_skill_{args.use_skill}'+ if not os.path.exists(output_path):+ os.makedirs(output_path, exist_ok=True)++ if args.split == 'dev':+ with open('src/scienceworld/data/valid_indices.json', 'r') as f:+ indices = json.load(f)+ elif args.split == 'test':+ with open('src/scienceworld/data/test_indices.json', 'r') as f:+ indices = json.load(f)++ num_games = len(indices)+ print(f"Total games to evaluate: {num_games}")++ # ---------------------------------------------------------+ # Checkpointing (Filter finished)+ # ---------------------------------------------------------+ tasks_to_run = []+ finished_games = 0+ all_rewards = 0+ all_steps = 0+ existing_files = set()++ if os.path.exists(output_path):+ for file in os.listdir(output_path):+ if file.endswith('.json') and file.startswith('idx_'):+ try:+ idx = int(file.split('_')[1].split('.')[0])+ existing_files.add(idx)++ with open(f'{output_path}/{file}', 'r') as f:+ res = json.load(f)+ all_rewards += res['reward']+ all_steps += res['steps']+ finished_games += 1+ except:+ continue++ # Filter tasks to run+ for idx in range(num_games):+ if idx not in existing_files:+ tasks_to_run.append(idx)++ print(f"Already finished: {finished_games}, Remaining: {len(tasks_to_run)}")++ # ---------------------------------------------------------+ # Parallel Execution+ # ---------------------------------------------------------+ max_workers = args.max_workers+ print(f"Starting parallel evaluation with {max_workers} workers...")++ with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor:+ future_to_task = {+ executor.submit(+ eval_single_variation,+ idx,+ indices,+ args,+ output_path+ ): idx for idx in tasks_to_run+ }++ pbar = tqdm(total=len(tasks_to_run), desc="Evaluating ScienceWorld")++ for future in concurrent.futures.as_completed(future_to_task):+ idx = future_to_task[future]+ try:+ result = future.result()+ if result:+ finished_games += 1+ all_rewards += result['reward']+ all_steps += result['steps']++ # Update progress bar description+ current_avg_reward = all_rewards / finished_games if finished_games > 0 else 0+ current_avg_steps = all_steps / finished_games if finished_games > 0 else 0+ pbar.set_postfix({+ 'Avg Reward': f'{current_avg_reward:.2f}',+ 'Avg Steps': f'{current_avg_steps:.2f}'+ })+ except Exception as exc:+ print(f'\nTask {idx} generated an exception: {exc}')++ pbar.update(1)++ pbar.close()++ # Final Summary+ print(f"Evaluation finished. Total Games: {finished_games}")+ if finished_games > 0:+ print(f"Final Avg Reward: {all_rewards / finished_games}")+ print(f"Final Avg Steps: {all_steps / finished_games}")++if __name__ == '__main__':+ parser = argparse.ArgumentParser()+ parser.add_argument('--model', type=str, default='gpt-4o')+ parser.add_argument('--split', type=str, default='dev', choices=['dev', 'test'])+ parser.add_argument('--max_workers', type=int, default=5, help="Number of parallel workers")+ parser.add_argument('--max_steps', type=int, default=30)+ parser.add_argument('--exp_name', type=str, default='')+ parser.add_argument('--use_skill', action='store_true')+ args = parser.parse_args()++ main(args)\ No newline at end of filediff --git a/experiments/src/alfworld/alfworld_overall_procedure_examples.txt b/experiments/src/alfworld/alfworld_overall_procedure_examples.txtnew file mode 100644index 0000000..5e1be0e--- /dev/null+++ b/experiments/src/alfworld/alfworld_overall_procedure_examples.txt@@ -0,0 +1,120 @@+<EXAMPLE_1>++## Task Execution Guidelines++Your task is to put a hot cup in a cabinet. This requires multiple steps:++### Phase 1: Locate Cup+- Systematically search receptacles where cups are commonly found (countertops, cabinets, shelves, coffeemachine area, sinkbasin)+- Use "go to {recep}" to navigate and observe each location+- Once you find a cup, use "take cup X from {recep}" to acquire it++### Phase 2: Heat Cup+- Navigate to the microwave using "go to microwave 1"+- Open the microwave: "open microwave 1"+- Place the cup inside: "put cup X in/on microwave 1"+- Heat the cup: "heat cup X with microwave 1"+- Open microwave again if needed: "open microwave 1"+- Take the heated cup: "take cup X from microwave 1"++### Phase 3: Place Hot Cup in Cabinet+- Navigate to a cabinet (e.g., "go to cabinet 1")+- Open the cabinet if needed: "open cabinet 1"+- Place the hot cup: "put cup X in/on cabinet 1"++### Important Rules:+- Always check environment feedback after each action+- If you get "Nothing happened", your action was invalid - try a different approach+- You must actually heat the cup before placing it in the cabinet+- Only the environment feedback can confirm task completion++Begin by searching for a cup in likely locations!++<EXAMPLE_1_END>++--------------------------------------------------------------------------------++<EXAMPLE_2>++TASK PROCEDURAL GUIDANCE:+This task requires completing multiple phases in sequence:++Phase 1 - LOCATE TOMATO:+- Search high-probability locations (countertop, diningtable, fridge, cabinets)+- Use "go to {recep}" to navigate to receptacles+- Use "open {recep}" if needed to inspect enclosed locations+- Systematically search until tomato is found++Phase 2 - PICK UP TOMATO:+- Navigate to the receptacle containing the tomato+- Use "take tomato {number} from {recep}" to pick it up+- Confirm possession before proceeding++Phase 3 - HEAT TOMATO:+- Navigate to microwave using "go to microwave 1"+- Open the microwave using "open microwave 1"+- Place tomato in microwave using "put tomato {number} in/on microwave 1"+- Heat the tomato using "heat tomato {number} with microwave 1"+- Take the heated tomato back using "take tomato {number} from microwave 1"++Phase 4 - PLACE IN FRIDGE:+- Navigate to fridge using "go to fridge 1"+- Open the fridge using "open fridge 1" if needed+- Place heated tomato in fridge using "put tomato {number} in/on fridge 1"+- Task complete when tomato is successfully placed in fridge++CRITICAL REMINDERS:+- If you receive "Nothing happened", your last action was invalid. Try alternative actions.+- Always verify object possession after "take" actions+- Must heat tomato BEFORE placing in fridge+- Use exact object names with numbers as they appear in observations (e.g., "tomato 1")+- Task completion is determined ONLY by environment feedback, not your reasoning++Begin with Phase 1: Locate the tomato in the environment.++<EXAMPLE_2_END>++--------------------------------------------------------------------------------++<EXAMPLE_3>++# Task Completion Strategy: Heated Egg Placement in Fridge++To complete this task successfully, follow this strategic workflow:++## **Phase 1: Locate Object in Environment**+- Systematically search for the egg by checking **high-probability locations**:+ - Fridge 1+ - Countertops+ - Cabinets+- Use `go to {recep}` to navigate and inspect locations+- Observe feedback carefully to identify where the egg is located++## **Phase 2: Pick Up Object**+- Once the egg is located, navigate to its receptacle if not already there+- Use `take egg 1 from {recep}` to pick up the egg+- Confirm possession through environment feedback before proceeding++## **Phase 3: Heat the Object**+- Navigate to a heating appliance:+ - **Microwave 1** (most reliable)+ - Stoveburner 1-4 (alternatives)+- Use `heat egg 1 with {heating_recep}` to heat the egg+- Confirm the egg is now hot through environment feedback++## **Phase 4: Navigate to Target Receptacle**+- Move to fridge 1 using `go to fridge 1`+- Ensure you are at the correct location before attempting placement++## **Phase 5: Place Object in Receptacle**+- Use `put egg 1 in/on fridge 1` to complete the task+- Verify task completion through environment feedback++---++## **Important Reminders:**+- If you receive **"Nothing happened"**, your action was invalid β try an alternative approach+- Always base your next action on the **ACTUAL observation feedback**, not assumptions+- Complete each phase before moving to the next++<EXAMPLE_3_END>\ No newline at end of filediff --git a/experiments/src/alfworld/alfworld_procedure_code_template.py b/experiments/src/alfworld/alfworld_procedure_code_template.pynew file mode 100644index 0000000..c1bac8e--- /dev/null+++ b/experiments/src/alfworld/alfworld_procedure_code_template.py@@ -0,0 +1,118 @@+#v2+def overall_procedure_code(+ env,+ llm,+ model: str,+ process_ob,+ parse_action,+ messages: list = [],+ max_steps: int = 30+):+ """+ Procedure code template for solving a household interactive task using iterative LLM-guided actions.++ INPUTS:+ - env: The environment instance to interact with. (Predefined, call directly)+ - llm: The language model function to generate agent responses. (Predefined, call directly)+ - model: The specific model name or identifier to use with the llm. (Predefined, pass directly)+ - process_ob: A function to process raw environment observations. (Predefined, call directly)+ - parse_action: A function to extract executable actions from LLM responses. (Predefined, call directly)+ - messages: Pre-populated dialogue context as a list of message dicts. (Contains messages describing the environment background and the task)+ - max_steps: Maximum number of interaction steps before termination. (Predefined, pass directly)+ RETURNS:+ - messages: The updated dialogue context including all interactions.+ - task_done: Boolean indicating if the task was successfully completed.+ - reward: The final reward received from the environment.+ - current_steps: The total number of steps taken in the interaction loop.+ These Input Arguments and Return Types MUST NOT be changed.++ This function serves as a STRICT TEMPLATE to enforce grounded, environment-driven task execution.+ """++ # ------------------------------------------------------------------+ # [SECTION] Overall Procedural Guidance INJECTION+ # INSTRUCTION: You should add detailed Overall Procedural Guidance here to help the agent better complete the task.+ # These guidelines will be visible to the agent as user messages.+ # You may define additional helper variables and functions as needed to help the generated code running correctly and efficiently.+ # ------------------------------------------------------------------+ # Example:+ procedure_guidelines = "<detailed_overall_procedural_guidelines_here>"+ messages.append({"role": "user", "content": procedure_guidelines})+ # ------------------------------------------------------------------++ # --- Core task execution state ---+ task_done = False+ current_steps = 0+ reward = 0 # always track latest reward++ # --- Main agent loop (IMMUTABLE STRUCTURE) ---+ while not task_done and current_steps < max_steps:++ # ============================================================+ # 1) THOUGHT PHASE β Query LLM based on current message state+ # - DO NOT change this call signature+ # ============================================================+ try:+ response = llm(messages, model)+ print(f'\033[92mAgent response: \n{response}\033[0m')+ except Exception as e:+ print(f'\033[91mError in LLM call: {e}\033[0m')+ break++ # ============================================================+ # 2) Persist assistant response into dialogue+ # ============================================================+ messages.append({"role": "assistant", "content": response})++ # ============================================================+ # 3) ACTION PARSING PHASE β Extract executable command+ # Expected format: "Action: <command>"+ # ============================================================+ action = parse_action(response)++ # ============================================================+ # 4) ENVIRONMENT INTERACTION PHASE β Execute Action+ # - Must use env.step()+ # - Do not alter the list wrapping behavior+ # - Task completion (task_done) and reward MUST ONLY be+ # derived from env.step() outputs. DO NOT INFER.+ # ============================================================+ action_list = [action]+ observation, reward, task_done, info = env.step(action_list)++ # ============================================================+ # 5) OBSERVATION NORMALIZATION PHASE+ # - Convert env raw outputs into semantic signals+ # - Do NOT modify this section+ # ============================================================+ observation, reward, task_done = (+ process_ob(observation[0]),+ info['won'][0],+ task_done[0]+ )++ print(f'\033[93mObservation: \n{observation}\033[0m')++ # ============================================================+ # 6) FEEDBACK PHASE β Feed environment signal back to agent+ # ============================================================+ messages.append({"role": "user", "content": f"Observation: {observation}"})++ # ==============================================================================+ # [SECTION] RUNTIME ANALYSIS & INTERVENTION (Optional, Leave empty if not needed.)+ # INSTRUCTION: Analyze 'observation' or 'response'.+ # You can append EXTRA hints to 'messages' here.+ # WARNING: Do NOT use 'continue', 'break', or 'return'.+ # ==============================================================================+ # Example (change as needed):+ if "<specific_condition>" in observation:+ extra_hint = "<extra_hint_here>"+ messages.append({"role": "user", "content": extra_hint})+ # ==============================================================++ # ============================================================+ # 7) STEP ACCOUNTING+ # ============================================================+ current_steps += 1++ return messages, task_done, reward, current_stepsdiff --git a/experiments/src/alfworld/base_config.yaml b/experiments/src/alfworld/base_config.yamlnew file mode 100644index 0000000..460c080--- /dev/null+++ b/experiments/src/alfworld/base_config.yaml@@ -0,0 +1,145 @@+dataset:+ data_path: '$ALFWORLD_DATA/json_2.1.1/train'+ eval_id_data_path: '$ALFWORLD_DATA/json_2.1.1/valid_seen' # null/None to disable+ eval_ood_data_path: '$ALFWORLD_DATA/json_2.1.1/valid_unseen' # null/None to disable+ num_train_games: -1 # max training games (<=0 indicates full dataset)+ num_eval_games: -1 # max evaluation games (<=0 indicates full dataset)++logic:+ domain: '$ALFWORLD_DATA/logic/alfred.pddl' # PDDL domain file that defines the world dynamics+ grammar: '$ALFWORLD_DATA/logic/alfred.twl2' # Grammar file that defines the text feedbacks++env:+ type: 'AlfredTWEnv' # 'AlfredTWEnv' or 'AlfredThorEnv' or 'AlfredHybrid'+ # regen_game_files: False # [Deprecated] Use script `alfworld-generate` instead.+ domain_randomization: False # shuffle Textworld print order and object id nums+ task_types: [1, 2, 3, 4, 5, 6] # task-type ids: 1 - Pick & Place, 2 - Examine in Light, 3 - Clean & Place, 4 - Heat & Place, 5 - Cool & Place, 6 - Pick Two & Place+ expert_timeout_steps: 150 # max steps before timeout for expert to solve the task+ expert_type: "handcoded" # 'handcoded' or 'planner'. Note: the planner is very slow for real-time use+ goal_desc_human_anns_prob: 0.0 # prob of using human-annotated goal language instead of templated goals (1.0 indicates all human annotations from ALFRED)++ hybrid:+ start_eps: 100000 # starting episode of hybrid training, tw-only training upto this point+ thor_prob: 0.5 # prob of AlfredThorEnv during hybrid training+ eval_mode: "tw" # 'tw' or 'thor' - env used for evaluation during hybrid training++ thor:+ screen_width: 300 # width of THOR window+ screen_height: 300 # height of THOR window+ smooth_nav: False # smooth rotations, looks, and translations during navigation (very slow)+ save_frames_to_disk: False # save frame PNGs to disk (useful for making videos)+ save_frames_path: './videos/' # path to save frame PNGs++controller:+ type: 'oracle' # 'oracle' or 'oracle_astar' or 'mrcnn' or 'mrcnn_astar' (aka BUTLER)+ debug: False+ load_receps: True # load receptacle locations from precomputed dict (if available)++mask_rcnn:+ pretrained_model_path: '$ALFWORLD_DATA/detectors/mrcnn.pth'++general:+ random_seed: 42+ use_cuda: True # disable this when running on machine without cuda+ visdom: False # plot training/eval curves, run with visdom server+ task: 'alfred'+ training_method: 'dagger' # 'dqn' or 'dagger'+ save_path: './training/' # path to save pytorch models+ observation_pool_capacity: 3 # k-size queue, 0 indicates no observation+ hide_init_receptacles: False # remove initial observation containing navigable receptacles++ training:+ batch_size: 10+ max_episode: 50000+ smoothing_eps: 0.1+ optimizer:+ learning_rate: 0.001+ clip_grad_norm: 5++ evaluate:+ run_eval: True+ batch_size: 10+ env:+ type: "AlfredTWEnv"++ checkpoint:+ report_frequency: 1000 # report every N episode+ experiment_tag: 'test' # name of experiment+ load_pretrained: False # during test, enable this so that the agent load your pretrained model+ load_from_tag: 'not loading anything' # name of pre-trained model to load in save_path++ model:+ encoder_layers: 1+ decoder_layers: 1+ encoder_conv_num: 5+ block_hidden_dim: 64+ n_heads: 1+ dropout: 0.1+ block_dropout: 0.1+ recurrent: True++rl:+ action_space: "admissible" # 'admissible' (candidates from text engine) or 'generation' (seq2seq-style generation) or 'beam_search_choice' or 'exhaustive' (not working)+ max_target_length: 20 # max token length for seq2seq generation+ beam_width: 10 # 1 means greedy+ generate_top_k: 3++ training:+ max_nb_steps_per_episode: 50 # terminate after this many steps+ learn_start_from_this_episode: 0 # delay updates until this epsiode+ target_net_update_frequency: 500 # sync target net with online net per this many epochs++ replay:+ accumulate_reward_from_final: True+ count_reward_lambda: 0.0 # 0 to disable+ novel_object_reward_lambda: 0.0 # 0 to disable+ discount_gamma_game_reward: 0.9+ discount_gamma_count_reward: 0.5+ discount_gamma_novel_object_reward: 0.5+ replay_memory_capacity: 500000 # adjust this depending on your RAM size+ replay_memory_priority_fraction: 0.5+ update_per_k_game_steps: 5+ replay_batch_size: 64+ multi_step: 3+ replay_sample_history_length: 4+ replay_sample_update_from: 2++ epsilon_greedy:+ noisy_net: False # if this is true, then epsilon greedy is disabled+ epsilon_anneal_episodes: 1000 # -1 if not annealing+ epsilon_anneal_from: 0.3+ epsilon_anneal_to: 0.1++dagger:+ action_space: "generation" # 'admissible' (candidates from text engine) or 'generation' (seq2seq-style generation) or 'exhaustive' (not working)+ max_target_length: 20 # max token length for seq2seq generation+ beam_width: 10 # 1 means greedy+ generate_top_k: 5+ unstick_by_beam_search: False # use beam-search for failed actions, set True during evaluation++ training:+ max_nb_steps_per_episode: 50 # terminate after this many steps++ fraction_assist:+ fraction_assist_anneal_episodes: 50000+ fraction_assist_anneal_from: 1.0+ fraction_assist_anneal_to: 0.01++ fraction_random:+ fraction_random_anneal_episodes: 0+ fraction_random_anneal_from: 0.0+ fraction_random_anneal_to: 0.0++ replay:+ replay_memory_capacity: 500000+ update_per_k_game_steps: 5+ replay_batch_size: 64+ replay_sample_history_length: 4+ replay_sample_update_from: 2++vision_dagger:+ model_type: "resnet" # 'resnet' (whole image features) or 'maskrcnn_whole' (whole image MaskRCNN feats) or 'maskrcnn' (top k MaskRCNN detection feats) or 'no_vision' (zero vision input)+ resnet_fc_dim: 64+ maskrcnn_top_k_boxes: 10 # top k box features+ use_exploration_frame_feats: False # append feats from initial exploration (memory intensive!)+ sequence_aggregation_method: "average" # 'sum' or 'average' or 'rnn'diff --git a/experiments/src/alfworld/prompts/system_prompt.py b/experiments/src/alfworld/prompts/system_prompt.pynew file mode 100644index 0000000..b60a60e--- /dev/null+++ b/experiments/src/alfworld/prompts/system_prompt.py@@ -0,0 +1,20 @@+alfworld_system_prompt = """Interact with a household to solve a task. Imagine you are an intelligent agent in a household environment and your target is to perform actions to complete the task goal. At the beginning of your interactions, you will be given the detailed description of the current environment and your goal to accomplish.+For each of your turn, you will be given the observation of the last turn. You should first think about the current condition and plan for your future actions, and then output your action in this turn. Your output must strictly follow this format:"Thought: your thoughts.\nAction: your next action".++The available actions are:+1. go to {recep}+2. take {obj} from {recep}+3. move {obj} to {recep}+4. open {recep}+5. close {recep}+6. use {obj}+7. clean {obj} with {recep}+8. heat {obj} with {recep}+9. cool {obj} with {recep}+where {obj} and {recep} correspond to objects and receptacles.+After your each turn, the environment will give you immediate feedback based on which you plan your next few steps. if the envrionment output "Nothing happened", that means the previous action is invalid and you should try more options.++Your response should use the following format:++Thought: <your thoughts>+Action: <your next action>"""\ No newline at end of filediff --git a/experiments/src/prompt_generator.py b/experiments/src/prompt_generator.pynew file mode 100644index 0000000..7a21dba--- /dev/null+++ b/experiments/src/prompt_generator.py@@ -0,0 +1,81 @@+def retrieve_relevant_skills_prompt(metadata, task):+ template = "You are an expert in task analysis and skills retrieval."+ prompt = f'''+Your task is to analyze the given task description and retrieve the most relevant skills from the provided metadata (name and description pairs).++# Principles+1. **Contextual Understanding**: Thoroughly analyze the task description to grasp its requirements.+2. **Relevance Matching**: Match the task requirements with the most relevant skills based on the metadata descriptions. Only include skills that are most helpful for accomplishing the task. (No more than 5 unless necessary)+3. **Clarity and Precision**: Clearly list the names of the relevant skills in your output.+4. **Output Format**: Return the skill names as a JSON list of strings. Must strictly match names in the provided metadata.+5. **Allow Empty List**: If no relevant skills are found, return an empty list `[]`.++# Input Data+1. **Metadata:**+{metadata}+2. **Task Description:**+{task}++Keep your output in the format below:+<Analysis> your analysis here </Analysis>+<Relevant_Skill_Names> relevant skill names list in JSON format here </Relevant_Skill_Names>+'''+ return [{"role": "system", "content": template}, {"role": "user", "content": prompt}]+++def generate_overall_procedure_prompt(task, overall_procedure_examples, skill_contents):+ template = "You are a Senior Systems Architect."+ prompt = f'''+You are given a complex task description, relevant skill contents, and examples of well-structured procedural guidance texts.+Your task is to create a structured "Procedural Guidance" text. This text will serve as the "brain" for an AI Agent, telling it exactly how to solve the task.++# CRITICAL INSTRUCTIONS (Follow these strictly)+1. **Structure with Phases**: You MUST divide the task into logical phases (e.g., Phase 1: Search, Phase 2: Acquire, Phase 3: Place).+2. **Use Exact Syntax**: When describing actions, you MUST quote the exact syntax from the "Available Actions" (e.g., use "go to {{recep}}" instead of "walk to the desk").+3. **State & Preconditions**: Explicitly mention necessary preconditions (e.g., "If the drawer is closed, use 'open drawer' before taking").+4. **Error Handling**: Include a rule for what to do if the agent encounters an error or unexpected situation.++# Input Data+1. **Task Description:**+{task}+2. **Relevant Skill Contents:**+{skill_contents}++# Examples+Here are some examples of well-structured Procedural Guidance texts you should emulate (focus on style, structure, and level of detail instead of content):+{overall_procedure_examples}+++Keep your output in the format below:+<Analysis> your analysis here </Analysis>+<Overall_Procedure> your generated overall procedure guidance here </Overall_Procedure>+'''+ return [{"role": "system", "content": template}, {"role": "user", "content": prompt}]++def generate_overall_procedure_code_prompt(task, overall_procedure, procedure_code_template):+ template = "You are a Senior Software Engineer specializing in AI-driven automation and safe code generation."+ prompt = f'''+You are given a complex task description, overall procedural guidance, and a strict procedure code template.+Your task is to implement a Python function `overall_procedure_code` that follows the provided procedure code template and incorporates the overall procedure guidance to help Agent solve a complex task.++# Principles+1. **Adherence to Template**: Strictly follow the provided procedure code template. Input arguments and return types must align with the template. (Most Important)+2. **Inject Overall Procedural Guidance**: Help the agent accomplish the task by injecting the overall procedure guidance into the function.+4. **Error Handling**: Implement robust error handling for LLM calls and environment interactions.+5. **Function Naming**: Name the function `overall_procedure_code` as per the template.++# Input Data+1. **Task Description:**+{task}+2. **Overall Procedural Guidance:**+{overall_procedure}+3. **Procedure Code Template:**+```python+{procedure_code_template}+```++Keep your output in the format below:+<Analysis> your analysis here </Analysis>+<Overall_Procedure_Code> your generated overall procedure workflow code here </Overall_Procedure_Code>+'''+ return [{"role": "system", "content": template}, {"role": "user", "content": prompt}]diff --git a/experiments/src/scienceworld/data/max_steps.json b/experiments/src/scienceworld/data/max_steps.jsonnew file mode 100644index 0000000..87178da--- /dev/null+++ b/experiments/src/scienceworld/data/max_steps.json@@ -0,0 +1,26 @@+{+ "task-1-boil": 100,+ "task-1-change-the-state-of-matter-of": 80,+ "task-1-freeze": 80,+ "task-1-melt": 80,+ "task-10-measure-melting-point-(known-substance)": 120,+ "task-10-use-thermometer": 30,+ "task-2-power-component": 20,+ "task-2-power-component-(renewable-vs-nonrenewable-energy)": 30,+ "task-2a-test-conductivity": 30,+ "task-2a-test-conductivity-of-unknown-substances": 30,+ "task-3-find-animal": 15,+ "task-3-find-living-thing": 15,+ "task-3-find-non-living-thing": 15,+ "task-3-find-plant": 15,+ "task-4-grow-fruit": 60,+ "task-4-grow-plant": 30,+ "task-5-chemistry-mix": 60,+ "task-5-chemistry-mix-paint-(secondary-color)": 15,+ "task-5-chemistry-mix-paint-(tertiary-color)": 30,+ "task-6-lifespan-(longest-lived)": 10,+ "task-6-lifespan-(longest-lived-then-shortest-lived)": 12,+ "task-6-lifespan-(shortest-lived)": 10,+ "task-7-identify-life-stages-1": 30,+ "task-7-identify-life-stages-2": 30+}\ No newline at end of filediff --git a/experiments/src/scienceworld/data/taskname2id.json b/experiments/src/scienceworld/data/taskname2id.jsonnew file mode 100644index 0000000..55639db--- /dev/null+++ b/experiments/src/scienceworld/data/taskname2id.json@@ -0,0 +1,31 @@+{+ "task-1-boil": 0,+ "task-1-change-the-state-of-matter-of": 1,+ "task-1-freeze": 2,+ "task-1-melt": 3,+ "task-10-measure-melting-point-(known-substance)": 4,+ "task-10-use-thermometer": 6,+ "task-2-power-component": 7,+ "task-2-power-component-(renewable-vs-nonrenewable-energy)": 8,+ "task-2a-test-conductivity": 9,+ "task-2a-test-conductivity-of-unknown-substances": 10,+ "task-3-find-animal": 11,+ "task-3-find-living-thing": 12,+ "task-3-find-non-living-thing": 13,+ "task-3-find-plant": 14,+ "task-4-grow-fruit": 15,+ "task-4-grow-plant": 16,+ "task-5-chemistry-mix": 17,+ "task-5-chemistry-mix-paint-(secondary-color)": 18,+ "task-5-chemistry-mix-paint-(tertiary-color)": 19,+ "task-6-lifespan-(longest-lived)": 20,+ "task-6-lifespan-(longest-lived-then-shortest-lived)": 21,+ "task-6-lifespan-(shortest-lived)": 22,+ "task-7-identify-life-stages-1": 23,+ "task-7-identify-life-stages-2": 24,+ "task-8-inclined-plane-determine-angle": 25,+ "task-8-inclined-plane-friction-(named-surfaces)": 26,+ "task-8-inclined-plane-friction-(unnamed-surfaces)": 27,+ "task-9-mendellian-genetics-(known-plant)": 28,+ "task-9-mendellian-genetics-(unknown-plant)": 29+}\ No newline at end of filediff --git a/experiments/src/scienceworld/data/test_indices.json b/experiments/src/scienceworld/data/test_indices.jsonnew file mode 100644index 0000000..bf37d7b--- /dev/null+++ b/experiments/src/scienceworld/data/test_indices.json@@ -0,0 +1,846 @@+[+ [+ "task-1-boil",+ 21+ ],+ [+ "task-1-boil",+ 22+ ],+ [+ "task-1-boil",+ 23+ ],+ [+ "task-1-boil",+ 24+ ],+ [+ "task-1-boil",+ 25+ ],+ [+ "task-1-boil",+ 26+ ],+ [+ "task-1-boil",+ 27+ ],+ [+ "task-1-boil",+ 28+ ],+ [+ "task-1-boil",+ 29+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 21+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 22+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 23+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 24+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 25+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 26+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 27+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 28+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 29+ ],+ [+ "task-1-freeze",+ 21+ ],+ [+ "task-1-freeze",+ 22+ ],+ [+ "task-1-freeze",+ 23+ ],+ [+ "task-1-freeze",+ 24+ ],+ [+ "task-1-freeze",+ 25+ ],+ [+ "task-1-freeze",+ 26+ ],+ [+ "task-1-freeze",+ 27+ ],+ [+ "task-1-freeze",+ 28+ ],+ [+ "task-1-freeze",+ 29+ ],+ [+ "task-1-melt",+ 21+ ],+ [+ "task-1-melt",+ 22+ ],+ [+ "task-1-melt",+ 23+ ],+ [+ "task-1-melt",+ 24+ ],+ [+ "task-1-melt",+ 25+ ],+ [+ "task-1-melt",+ 26+ ],+ [+ "task-1-melt",+ 27+ ],+ [+ "task-1-melt",+ 28+ ],+ [+ "task-1-melt",+ 29+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 327+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 328+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 329+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 330+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 331+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 332+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 333+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 334+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 335+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 336+ ],+ [+ "task-10-use-thermometer",+ 405+ ],+ [+ "task-10-use-thermometer",+ 406+ ],+ [+ "task-10-use-thermometer",+ 407+ ],+ [+ "task-10-use-thermometer",+ 408+ ],+ [+ "task-10-use-thermometer",+ 409+ ],+ [+ "task-10-use-thermometer",+ 410+ ],+ [+ "task-10-use-thermometer",+ 411+ ],+ [+ "task-10-use-thermometer",+ 412+ ],+ [+ "task-10-use-thermometer",+ 413+ ],+ [+ "task-10-use-thermometer",+ 414+ ],+ [+ "task-2-power-component",+ 15+ ],+ [+ "task-2-power-component",+ 16+ ],+ [+ "task-2-power-component",+ 17+ ],+ [+ "task-2-power-component",+ 18+ ],+ [+ "task-2-power-component",+ 19+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 15+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 16+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 17+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 18+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 19+ ],+ [+ "task-2a-test-conductivity",+ 675+ ],+ [+ "task-2a-test-conductivity",+ 676+ ],+ [+ "task-2a-test-conductivity",+ 677+ ],+ [+ "task-2a-test-conductivity",+ 678+ ],+ [+ "task-2a-test-conductivity",+ 679+ ],+ [+ "task-2a-test-conductivity",+ 680+ ],+ [+ "task-2a-test-conductivity",+ 681+ ],+ [+ "task-2a-test-conductivity",+ 682+ ],+ [+ "task-2a-test-conductivity",+ 683+ ],+ [+ "task-2a-test-conductivity",+ 684+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 450+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 451+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 452+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 453+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 454+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 455+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 456+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 457+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 458+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 459+ ],+ [+ "task-3-find-animal",+ 225+ ],+ [+ "task-3-find-animal",+ 226+ ],+ [+ "task-3-find-animal",+ 227+ ],+ [+ "task-3-find-animal",+ 228+ ],+ [+ "task-3-find-animal",+ 229+ ],+ [+ "task-3-find-animal",+ 230+ ],+ [+ "task-3-find-animal",+ 231+ ],+ [+ "task-3-find-animal",+ 232+ ],+ [+ "task-3-find-animal",+ 233+ ],+ [+ "task-3-find-animal",+ 234+ ],+ [+ "task-3-find-living-thing",+ 225+ ],+ [+ "task-3-find-living-thing",+ 226+ ],+ [+ "task-3-find-living-thing",+ 227+ ],+ [+ "task-3-find-living-thing",+ 228+ ],+ [+ "task-3-find-living-thing",+ 229+ ],+ [+ "task-3-find-living-thing",+ 230+ ],+ [+ "task-3-find-living-thing",+ 231+ ],+ [+ "task-3-find-living-thing",+ 232+ ],+ [+ "task-3-find-living-thing",+ 233+ ],+ [+ "task-3-find-living-thing",+ 234+ ],+ [+ "task-3-find-non-living-thing",+ 225+ ],+ [+ "task-3-find-non-living-thing",+ 226+ ],+ [+ "task-3-find-non-living-thing",+ 227+ ],+ [+ "task-3-find-non-living-thing",+ 228+ ],+ [+ "task-3-find-non-living-thing",+ 229+ ],+ [+ "task-3-find-non-living-thing",+ 230+ ],+ [+ "task-3-find-non-living-thing",+ 231+ ],+ [+ "task-3-find-non-living-thing",+ 232+ ],+ [+ "task-3-find-non-living-thing",+ 233+ ],+ [+ "task-3-find-non-living-thing",+ 234+ ],+ [+ "task-3-find-plant",+ 225+ ],+ [+ "task-3-find-plant",+ 226+ ],+ [+ "task-3-find-plant",+ 227+ ],+ [+ "task-3-find-plant",+ 228+ ],+ [+ "task-3-find-plant",+ 229+ ],+ [+ "task-3-find-plant",+ 230+ ],+ [+ "task-3-find-plant",+ 231+ ],+ [+ "task-3-find-plant",+ 232+ ],+ [+ "task-3-find-plant",+ 233+ ],+ [+ "task-3-find-plant",+ 234+ ],+ [+ "task-4-grow-fruit",+ 93+ ],+ [+ "task-4-grow-fruit",+ 94+ ],+ [+ "task-4-grow-fruit",+ 95+ ],+ [+ "task-4-grow-fruit",+ 96+ ],+ [+ "task-4-grow-fruit",+ 97+ ],+ [+ "task-4-grow-fruit",+ 98+ ],+ [+ "task-4-grow-fruit",+ 99+ ],+ [+ "task-4-grow-fruit",+ 100+ ],+ [+ "task-4-grow-fruit",+ 101+ ],+ [+ "task-4-grow-fruit",+ 102+ ],+ [+ "task-4-grow-plant",+ 93+ ],+ [+ "task-4-grow-plant",+ 94+ ],+ [+ "task-4-grow-plant",+ 95+ ],+ [+ "task-4-grow-plant",+ 96+ ],+ [+ "task-4-grow-plant",+ 97+ ],+ [+ "task-4-grow-plant",+ 98+ ],+ [+ "task-4-grow-plant",+ 99+ ],+ [+ "task-4-grow-plant",+ 100+ ],+ [+ "task-4-grow-plant",+ 101+ ],+ [+ "task-4-grow-plant",+ 102+ ],+ [+ "task-5-chemistry-mix",+ 24+ ],+ [+ "task-5-chemistry-mix",+ 25+ ],+ [+ "task-5-chemistry-mix",+ 26+ ],+ [+ "task-5-chemistry-mix",+ 27+ ],+ [+ "task-5-chemistry-mix",+ 28+ ],+ [+ "task-5-chemistry-mix",+ 29+ ],+ [+ "task-5-chemistry-mix",+ 30+ ],+ [+ "task-5-chemistry-mix",+ 31+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 27+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 28+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 29+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 30+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 31+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 32+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 33+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 34+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 35+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 27+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 28+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 29+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 30+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 31+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 32+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 33+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 34+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 35+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 93+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 94+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 95+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 96+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 97+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 98+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 99+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 100+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 101+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 102+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 93+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 94+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 95+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 96+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 97+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 98+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 99+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 100+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 101+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 102+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 93+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 94+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 95+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 96+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 97+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 98+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 99+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 100+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 101+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 102+ ],+ [+ "task-7-identify-life-stages-1",+ 9+ ],+ [+ "task-7-identify-life-stages-1",+ 10+ ],+ [+ "task-7-identify-life-stages-1",+ 11+ ],+ [+ "task-7-identify-life-stages-1",+ 12+ ],+ [+ "task-7-identify-life-stages-1",+ 13+ ],+ [+ "task-7-identify-life-stages-2",+ 6+ ],+ [+ "task-7-identify-life-stages-2",+ 7+ ],+ [+ "task-7-identify-life-stages-2",+ 8+ ],+ [+ "task-7-identify-life-stages-2",+ 9+ ]+]\ No newline at end of filediff --git a/experiments/src/scienceworld/data/train_indices.json b/experiments/src/scienceworld/data/train_indices.jsonnew file mode 100644index 0000000..a313f42--- /dev/null+++ b/experiments/src/scienceworld/data/train_indices.json@@ -0,0 +1,5934 @@+[+ [+ "task-2a-test-conductivity",+ 412+ ],+ [+ "task-3-find-animal",+ 0+ ],+ [+ "task-4-grow-fruit",+ 53+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 52+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 262+ ],+ [+ "task-10-use-thermometer",+ 45+ ],+ [+ "task-10-use-thermometer",+ 141+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 99+ ],+ [+ "task-10-use-thermometer",+ 172+ ],+ [+ "task-3-find-plant",+ 70+ ],+ [+ "task-3-find-living-thing",+ 147+ ],+ [+ "task-10-use-thermometer",+ 191+ ],+ [+ "task-4-grow-fruit",+ 11+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 274+ ],+ [+ "task-5-chemistry-mix",+ 8+ ],+ [+ "task-2a-test-conductivity",+ 59+ ],+ [+ "task-2a-test-conductivity",+ 20+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 167+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 126+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 84+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 195+ ],+ [+ "task-3-find-living-thing",+ 21+ ],+ [+ "task-4-grow-fruit",+ 23+ ],+ [+ "task-4-grow-fruit",+ 20+ ],+ [+ "task-2a-test-conductivity",+ 397+ ],+ [+ "task-3-find-plant",+ 131+ ],+ [+ "task-2a-test-conductivity",+ 394+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 15+ ],+ [+ "task-3-find-living-thing",+ 89+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 51+ ],+ [+ "task-3-find-plant",+ 30+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 18+ ],+ [+ "task-4-grow-plant",+ 29+ ],+ [+ "task-3-find-plant",+ 56+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 15+ ],+ [+ "task-2a-test-conductivity",+ 197+ ],+ [+ "task-3-find-living-thing",+ 35+ ],+ [+ "task-3-find-living-thing",+ 43+ ],+ [+ "task-2a-test-conductivity",+ 23+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 40+ ],+ [+ "task-2a-test-conductivity",+ 390+ ],+ [+ "task-3-find-living-thing",+ 38+ ],+ [+ "task-4-grow-plant",+ 41+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 21+ ],+ [+ "task-3-find-plant",+ 91+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 188+ ],+ [+ "task-3-find-plant",+ 74+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 5+ ],+ [+ "task-10-use-thermometer",+ 267+ ],+ [+ "task-10-use-thermometer",+ 100+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 59+ ],+ [+ "task-2a-test-conductivity",+ 30+ ],+ [+ "task-3-find-non-living-thing",+ 99+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 53+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 0+ ],+ [+ "task-3-find-living-thing",+ 3+ ],+ [+ "task-3-find-living-thing",+ 10+ ],+ [+ "task-2a-test-conductivity",+ 336+ ],+ [+ "task-3-find-animal",+ 54+ ],+ [+ "task-3-find-plant",+ 85+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 12+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 204+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 15+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 63+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 247+ ],+ [+ "task-4-grow-plant",+ 33+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 1+ ],+ [+ "task-3-find-plant",+ 71+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 79+ ],+ [+ "task-3-find-animal",+ 22+ ],+ [+ "task-3-find-living-thing",+ 108+ ],+ [+ "task-3-find-non-living-thing",+ 58+ ],+ [+ "task-3-find-plant",+ 47+ ],+ [+ "task-2a-test-conductivity",+ 300+ ],+ [+ "task-3-find-non-living-thing",+ 59+ ],+ [+ "task-10-use-thermometer",+ 87+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 16+ ],+ [+ "task-2a-test-conductivity",+ 339+ ],+ [+ "task-3-find-non-living-thing",+ 38+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 45+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 47+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 3+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 22+ ],+ [+ "task-2a-test-conductivity",+ 78+ ],+ [+ "task-3-find-non-living-thing",+ 61+ ],+ [+ "task-4-grow-plant",+ 1+ ],+ [+ "task-10-use-thermometer",+ 214+ ],+ [+ "task-4-grow-plant",+ 5+ ],+ [+ "task-3-find-non-living-thing",+ 18+ ],+ [+ "task-3-find-living-thing",+ 121+ ],+ [+ "task-1-boil",+ 4+ ],+ [+ "task-3-find-living-thing",+ 140+ ],+ [+ "task-10-use-thermometer",+ 170+ ],+ [+ "task-3-find-plant",+ 49+ ],+ [+ "task-2a-test-conductivity",+ 228+ ],+ [+ "task-4-grow-plant",+ 51+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 184+ ],+ [+ "task-10-use-thermometer",+ 133+ ],+ [+ "task-3-find-non-living-thing",+ 96+ ],+ [+ "task-2a-test-conductivity",+ 311+ ],+ [+ "task-2a-test-conductivity",+ 401+ ],+ [+ "task-10-use-thermometer",+ 107+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 94+ ],+ [+ "task-10-use-thermometer",+ 72+ ],+ [+ "task-10-use-thermometer",+ 219+ ],+ [+ "task-1-boil",+ 11+ ],+ [+ "task-3-find-plant",+ 94+ ],+ [+ "task-2a-test-conductivity",+ 145+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 154+ ],+ [+ "task-2a-test-conductivity",+ 89+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 130+ ],+ [+ "task-1-melt",+ 2+ ],+ [+ "task-2a-test-conductivity",+ 121+ ],+ [+ "task-3-find-plant",+ 135+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 114+ ],+ [+ "task-3-find-plant",+ 55+ ],+ [+ "task-2a-test-conductivity",+ 417+ ],+ [+ "task-10-use-thermometer",+ 209+ ],+ [+ "task-10-use-thermometer",+ 82+ ],+ [+ "task-2a-test-conductivity",+ 230+ ],+ [+ "task-2a-test-conductivity",+ 192+ ],+ [+ "task-10-use-thermometer",+ 248+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 145+ ],+ [+ "task-2a-test-conductivity",+ 344+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 2+ ],+ [+ "task-3-find-animal",+ 56+ ],+ [+ "task-10-use-thermometer",+ 210+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 1+ ],+ [+ "task-2a-test-conductivity",+ 6+ ],+ [+ "task-10-use-thermometer",+ 49+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 30+ ],+ [+ "task-3-find-living-thing",+ 94+ ],+ [+ "task-10-use-thermometer",+ 198+ ],+ [+ "task-10-use-thermometer",+ 61+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 27+ ],+ [+ "task-10-use-thermometer",+ 202+ ],+ [+ "task-2a-test-conductivity",+ 330+ ],+ [+ "task-10-use-thermometer",+ 105+ ],+ [+ "task-2a-test-conductivity",+ 238+ ],+ [+ "task-10-use-thermometer",+ 256+ ],+ [+ "task-2a-test-conductivity",+ 420+ ],+ [+ "task-4-grow-plant",+ 60+ ],+ [+ "task-3-find-non-living-thing",+ 49+ ],+ [+ "task-3-find-non-living-thing",+ 39+ ],+ [+ "task-10-use-thermometer",+ 156+ ],+ [+ "task-3-find-animal",+ 26+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 134+ ],+ [+ "task-4-grow-plant",+ 38+ ],+ [+ "task-2a-test-conductivity",+ 109+ ],+ [+ "task-2a-test-conductivity",+ 29+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 95+ ],+ [+ "task-3-find-non-living-thing",+ 1+ ],+ [+ "task-2a-test-conductivity",+ 369+ ],+ [+ "task-3-find-plant",+ 121+ ],+ [+ "task-5-chemistry-mix",+ 0+ ],+ [+ "task-10-use-thermometer",+ 276+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 54+ ],+ [+ "task-2a-test-conductivity",+ 147+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 47+ ],+ [+ "task-2a-test-conductivity",+ 101+ ],+ [+ "task-5-chemistry-mix",+ 4+ ],+ [+ "task-2a-test-conductivity",+ 92+ ],+ [+ "task-4-grow-fruit",+ 52+ ],+ [+ "task-2a-test-conductivity",+ 62+ ],+ [+ "task-3-find-plant",+ 89+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 42+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 315+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 240+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 36+ ],+ [+ "task-3-find-non-living-thing",+ 7+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 22+ ],+ [+ "task-3-find-plant",+ 103+ ],+ [+ "task-10-use-thermometer",+ 221+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 139+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 12+ ],+ [+ "task-2a-test-conductivity",+ 163+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 49+ ],+ [+ "task-10-use-thermometer",+ 171+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 64+ ],+ [+ "task-2a-test-conductivity",+ 531+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 9+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 394+ ],+ [+ "task-2a-test-conductivity",+ 154+ ],+ [+ "task-2-power-component",+ 1+ ],+ [+ "task-3-find-plant",+ 44+ ],+ [+ "task-3-find-living-thing",+ 149+ ],+ [+ "task-10-use-thermometer",+ 132+ ],+ [+ "task-2a-test-conductivity",+ 247+ ],+ [+ "task-10-use-thermometer",+ 282+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 143+ ],+ [+ "task-3-find-animal",+ 4+ ],+ [+ "task-2a-test-conductivity",+ 673+ ],+ [+ "task-2a-test-conductivity",+ 525+ ],+ [+ "task-1-freeze",+ 9+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 14+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 332+ ],+ [+ "task-1-freeze",+ 5+ ],+ [+ "task-2a-test-conductivity",+ 186+ ],+ [+ "task-1-melt",+ 10+ ],+ [+ "task-2a-test-conductivity",+ 489+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 345+ ],+ [+ "task-2a-test-conductivity",+ 348+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 2+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 118+ ],+ [+ "task-2a-test-conductivity",+ 488+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 132+ ],+ [+ "task-3-find-living-thing",+ 128+ ],+ [+ "task-2a-test-conductivity",+ 427+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 323+ ],+ [+ "task-5-chemistry-mix",+ 13+ ],+ [+ "task-3-find-animal",+ 29+ ],+ [+ "task-3-find-animal",+ 34+ ],+ [+ "task-10-use-thermometer",+ 77+ ],+ [+ "task-2a-test-conductivity",+ 665+ ],+ [+ "task-10-use-thermometer",+ 366+ ],+ [+ "task-10-use-thermometer",+ 224+ ],+ [+ "task-2a-test-conductivity",+ 39+ ],+ [+ "task-10-use-thermometer",+ 192+ ],+ [+ "task-2a-test-conductivity",+ 65+ ],+ [+ "task-10-use-thermometer",+ 158+ ],+ [+ "task-2a-test-conductivity",+ 110+ ],+ [+ "task-3-find-living-thing",+ 86+ ],+ [+ "task-10-use-thermometer",+ 326+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 61+ ],+ [+ "task-5-chemistry-mix",+ 10+ ],+ [+ "task-3-find-non-living-thing",+ 47+ ],+ [+ "task-1-boil",+ 13+ ],+ [+ "task-3-find-animal",+ 69+ ],+ [+ "task-2a-test-conductivity",+ 309+ ],+ [+ "task-3-find-animal",+ 101+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 235+ ],+ [+ "task-2a-test-conductivity",+ 159+ ],+ [+ "task-3-find-non-living-thing",+ 105+ ],+ [+ "task-4-grow-plant",+ 26+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 158+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 57+ ],+ [+ "task-3-find-living-thing",+ 135+ ],+ [+ "task-3-find-plant",+ 68+ ],+ [+ "task-2a-test-conductivity",+ 648+ ],+ [+ "task-3-find-animal",+ 10+ ],+ [+ "task-2a-test-conductivity",+ 537+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 124+ ],+ [+ "task-2a-test-conductivity",+ 81+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 81+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 28+ ],+ [+ "task-3-find-living-thing",+ 124+ ],+ [+ "task-4-grow-fruit",+ 56+ ],+ [+ "task-3-find-living-thing",+ 103+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 38+ ],+ [+ "task-10-use-thermometer",+ 343+ ],+ [+ "task-2a-test-conductivity",+ 461+ ],+ [+ "task-3-find-animal",+ 99+ ],+ [+ "task-3-find-animal",+ 128+ ],+ [+ "task-3-find-plant",+ 37+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 121+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 301+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 61+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 36+ ],+ [+ "task-3-find-living-thing",+ 41+ ],+ [+ "task-2a-test-conductivity",+ 217+ ],+ [+ "task-10-use-thermometer",+ 59+ ],+ [+ "task-3-find-non-living-thing",+ 116+ ],+ [+ "task-3-find-plant",+ 24+ ],+ [+ "task-10-use-thermometer",+ 370+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 429+ ],+ [+ "task-2a-test-conductivity",+ 265+ ],+ [+ "task-2a-test-conductivity",+ 610+ ],+ [+ "task-2a-test-conductivity",+ 581+ ],+ [+ "task-10-use-thermometer",+ 296+ ],+ [+ "task-4-grow-plant",+ 11+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 51+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 329+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 125+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 273+ ],+ [+ "task-10-use-thermometer",+ 228+ ],+ [+ "task-3-find-animal",+ 9+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 22+ ],+ [+ "task-2a-test-conductivity",+ 321+ ],+ [+ "task-2a-test-conductivity",+ 362+ ],+ [+ "task-3-find-non-living-thing",+ 66+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 9+ ],+ [+ "task-10-use-thermometer",+ 404+ ],+ [+ "task-2a-test-conductivity",+ 254+ ],+ [+ "task-2a-test-conductivity",+ 42+ ],+ [+ "task-2a-test-conductivity",+ 396+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 72+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 40+ ],+ [+ "task-2a-test-conductivity",+ 290+ ],+ [+ "task-3-find-plant",+ 0+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 152+ ],+ [+ "task-2a-test-conductivity",+ 560+ ],+ [+ "task-10-use-thermometer",+ 92+ ],+ [+ "task-1-melt",+ 12+ ],+ [+ "task-2a-test-conductivity",+ 590+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 14+ ],+ [+ "task-2a-test-conductivity",+ 460+ ],+ [+ "task-2a-test-conductivity",+ 215+ ],+ [+ "task-3-find-non-living-thing",+ 114+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 72+ ],+ [+ "task-3-find-animal",+ 148+ ],+ [+ "task-4-grow-plant",+ 7+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 11+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 85+ ],+ [+ "task-3-find-plant",+ 19+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 294+ ],+ [+ "task-3-find-plant",+ 129+ ],+ [+ "task-2a-test-conductivity",+ 294+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 41+ ],+ [+ "task-10-use-thermometer",+ 389+ ],+ [+ "task-3-find-plant",+ 40+ ],+ [+ "task-10-use-thermometer",+ 42+ ],+ [+ "task-3-find-non-living-thing",+ 34+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 406+ ],+ [+ "task-10-use-thermometer",+ 86+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 360+ ],+ [+ "task-2a-test-conductivity",+ 587+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 386+ ],+ [+ "task-10-use-thermometer",+ 330+ ],+ [+ "task-2a-test-conductivity",+ 319+ ],+ [+ "task-2a-test-conductivity",+ 253+ ],+ [+ "task-7-identify-life-stages-2",+ 2+ ],+ [+ "task-2a-test-conductivity",+ 573+ ],+ [+ "task-3-find-plant",+ 98+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 151+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 35+ ],+ [+ "task-2a-test-conductivity",+ 407+ ],+ [+ "task-10-use-thermometer",+ 301+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 57+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 148+ ],+ [+ "task-10-use-thermometer",+ 7+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 8+ ],+ [+ "task-10-use-thermometer",+ 138+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 312+ ],+ [+ "task-2a-test-conductivity",+ 626+ ],+ [+ "task-2a-test-conductivity",+ 258+ ],+ [+ "task-3-find-living-thing",+ 51+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 40+ ],+ [+ "task-10-use-thermometer",+ 353+ ],+ [+ "task-2a-test-conductivity",+ 465+ ],+ [+ "task-3-find-animal",+ 130+ ],+ [+ "task-10-use-thermometer",+ 136+ ],+ [+ "task-3-find-animal",+ 113+ ],+ [+ "task-2a-test-conductivity",+ 36+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 83+ ],+ [+ "task-10-use-thermometer",+ 193+ ],+ [+ "task-3-find-animal",+ 223+ ],+ [+ "task-3-find-non-living-thing",+ 67+ ],+ [+ "task-2a-test-conductivity",+ 115+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 431+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 49+ ],+ [+ "task-3-find-animal",+ 143+ ],+ [+ "task-2a-test-conductivity",+ 188+ ],+ [+ "task-3-find-living-thing",+ 15+ ],+ [+ "task-2a-test-conductivity",+ 541+ ],+ [+ "task-3-find-plant",+ 62+ ],+ [+ "task-3-find-non-living-thing",+ 102+ ],+ [+ "task-3-find-plant",+ 60+ ],+ [+ "task-2a-test-conductivity",+ 293+ ],+ [+ "task-3-find-living-thing",+ 30+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 349+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 205+ ],+ [+ "task-2a-test-conductivity",+ 211+ ],+ [+ "task-10-use-thermometer",+ 108+ ],+ [+ "task-10-use-thermometer",+ 237+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 38+ ],+ [+ "task-3-find-plant",+ 65+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 250+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 8+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 172+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 425+ ],+ [+ "task-10-use-thermometer",+ 381+ ],+ [+ "task-10-use-thermometer",+ 187+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 303+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 44+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 1+ ],+ [+ "task-3-find-animal",+ 76+ ],+ [+ "task-3-find-animal",+ 17+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 22+ ],+ [+ "task-2a-test-conductivity",+ 500+ ],+ [+ "task-3-find-living-thing",+ 78+ ],+ [+ "task-3-find-non-living-thing",+ 188+ ],+ [+ "task-3-find-animal",+ 45+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 397+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 101+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 105+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 324+ ],+ [+ "task-2a-test-conductivity",+ 459+ ],+ [+ "task-2a-test-conductivity",+ 456+ ],+ [+ "task-2a-test-conductivity",+ 133+ ],+ [+ "task-2a-test-conductivity",+ 181+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 135+ ],+ [+ "task-2a-test-conductivity",+ 306+ ],+ [+ "task-7-identify-life-stages-2",+ 1+ ],+ [+ "task-3-find-living-thing",+ 116+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 230+ ],+ [+ "task-10-use-thermometer",+ 399+ ],+ [+ "task-3-find-plant",+ 27+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 223+ ],+ [+ "task-10-use-thermometer",+ 361+ ],+ [+ "task-3-find-non-living-thing",+ 201+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 6+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 15+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 248+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 34+ ],+ [+ "task-2a-test-conductivity",+ 521+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 254+ ],+ [+ "task-7-identify-life-stages-1",+ 4+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 178+ ],+ [+ "task-3-find-living-thing",+ 129+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 234+ ],+ [+ "task-10-use-thermometer",+ 95+ ],+ [+ "task-2a-test-conductivity",+ 618+ ],+ [+ "task-3-find-plant",+ 146+ ],+ [+ "task-3-find-non-living-thing",+ 128+ ],+ [+ "task-3-find-non-living-thing",+ 44+ ],+ [+ "task-3-find-non-living-thing",+ 98+ ],+ [+ "task-4-grow-fruit",+ 58+ ],+ [+ "task-10-use-thermometer",+ 254+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 202+ ],+ [+ "task-2a-test-conductivity",+ 423+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 328+ ],+ [+ "task-3-find-animal",+ 83+ ],+ [+ "task-3-find-living-thing",+ 138+ ],+ [+ "task-2a-test-conductivity",+ 47+ ],+ [+ "task-3-find-non-living-thing",+ 72+ ],+ [+ "task-3-find-animal",+ 97+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 385+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 189+ ],+ [+ "task-2a-test-conductivity",+ 553+ ],+ [+ "task-3-find-non-living-thing",+ 156+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 142+ ],+ [+ "task-3-find-non-living-thing",+ 196+ ],+ [+ "task-10-use-thermometer",+ 68+ ],+ [+ "task-10-use-thermometer",+ 252+ ],+ [+ "task-3-find-living-thing",+ 68+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 54+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 7+ ],+ [+ "task-3-find-living-thing",+ 24+ ],+ [+ "task-2a-test-conductivity",+ 510+ ],+ [+ "task-4-grow-fruit",+ 3+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 34+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 176+ ],+ [+ "task-2a-test-conductivity",+ 4+ ],+ [+ "task-4-grow-plant",+ 48+ ],+ [+ "task-2a-test-conductivity",+ 331+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 196+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 13+ ],+ [+ "task-2a-test-conductivity",+ 359+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 10+ ],+ [+ "task-2a-test-conductivity",+ 50+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 8+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 35+ ],+ [+ "task-4-grow-plant",+ 14+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 39+ ],+ [+ "task-3-find-living-thing",+ 143+ ],+ [+ "task-3-find-plant",+ 52+ ],+ [+ "task-2a-test-conductivity",+ 260+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 5+ ],+ [+ "task-2a-test-conductivity",+ 371+ ],+ [+ "task-2a-test-conductivity",+ 557+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 272+ ],+ [+ "task-10-use-thermometer",+ 347+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 61+ ],+ [+ "task-2a-test-conductivity",+ 540+ ],+ [+ "task-3-find-living-thing",+ 9+ ],+ [+ "task-2a-test-conductivity",+ 117+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 236+ ],+ [+ "task-10-use-thermometer",+ 235+ ],+ [+ "task-10-use-thermometer",+ 265+ ],+ [+ "task-10-use-thermometer",+ 398+ ],+ [+ "task-2a-test-conductivity",+ 601+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 19+ ],+ [+ "task-3-find-plant",+ 194+ ],+ [+ "task-3-find-animal",+ 25+ ],+ [+ "task-3-find-animal",+ 55+ ],+ [+ "task-3-find-non-living-thing",+ 81+ ],+ [+ "task-10-use-thermometer",+ 197+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 133+ ],+ [+ "task-3-find-living-thing",+ 117+ ],+ [+ "task-3-find-plant",+ 69+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 295+ ],+ [+ "task-2a-test-conductivity",+ 11+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 214+ ],+ [+ "task-3-find-non-living-thing",+ 52+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 219+ ],+ [+ "task-3-find-non-living-thing",+ 214+ ],+ [+ "task-2a-test-conductivity",+ 377+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 132+ ],+ [+ "task-3-find-plant",+ 205+ ],+ [+ "task-3-find-plant",+ 122+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 110+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 122+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 217+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 10+ ],+ [+ "task-10-use-thermometer",+ 175+ ],+ [+ "task-2a-test-conductivity",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 36+ ],+ [+ "task-3-find-plant",+ 95+ ],+ [+ "task-3-find-animal",+ 74+ ],+ [+ "task-2a-test-conductivity",+ 279+ ],+ [+ "task-2a-test-conductivity",+ 415+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 93+ ],+ [+ "task-10-use-thermometer",+ 166+ ],+ [+ "task-2a-test-conductivity",+ 323+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 264+ ],+ [+ "task-2a-test-conductivity",+ 635+ ],+ [+ "task-3-find-animal",+ 212+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 243+ ],+ [+ "task-3-find-plant",+ 78+ ],+ [+ "task-2a-test-conductivity",+ 444+ ],+ [+ "task-3-find-animal",+ 147+ ],+ [+ "task-3-find-plant",+ 105+ ],+ [+ "task-3-find-plant",+ 42+ ],+ [+ "task-2a-test-conductivity",+ 123+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 3+ ],+ [+ "task-3-find-plant",+ 59+ ],+ [+ "task-2a-test-conductivity",+ 225+ ],+ [+ "task-10-use-thermometer",+ 335+ ],+ [+ "task-10-use-thermometer",+ 149+ ],+ [+ "task-10-use-thermometer",+ 279+ ],+ [+ "task-10-use-thermometer",+ 98+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 190+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 78+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 20+ ],+ [+ "task-3-find-non-living-thing",+ 175+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 233+ ],+ [+ "task-10-use-thermometer",+ 392+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 319+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 299+ ],+ [+ "task-2a-test-conductivity",+ 647+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 120+ ],+ [+ "task-2a-test-conductivity",+ 368+ ],+ [+ "task-3-find-living-thing",+ 26+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 246+ ],+ [+ "task-3-find-non-living-thing",+ 210+ ],+ [+ "task-3-find-animal",+ 85+ ],+ [+ "task-3-find-living-thing",+ 60+ ],+ [+ "task-2a-test-conductivity",+ 512+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 231+ ],+ [+ "task-3-find-animal",+ 179+ ],+ [+ "task-2a-test-conductivity",+ 271+ ],+ [+ "task-3-find-plant",+ 64+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 0+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 2+ ],+ [+ "task-1-boil",+ 8+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 111+ ],+ [+ "task-3-find-non-living-thing",+ 162+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 244+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 91+ ],+ [+ "task-10-use-thermometer",+ 263+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 178+ ],+ [+ "task-3-find-animal",+ 107+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 150+ ],+ [+ "task-10-use-thermometer",+ 391+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 47+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 366+ ],+ [+ "task-3-find-animal",+ 215+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 38+ ],+ [+ "task-3-find-animal",+ 220+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 45+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 255+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 26+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 220+ ],+ [+ "task-10-use-thermometer",+ 367+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 2+ ],+ [+ "task-3-find-animal",+ 201+ ],+ [+ "task-3-find-plant",+ 221+ ],+ [+ "task-10-use-thermometer",+ 203+ ],+ [+ "task-3-find-non-living-thing",+ 124+ ],+ [+ "task-3-find-plant",+ 185+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 182+ ],+ [+ "task-10-use-thermometer",+ 320+ ],+ [+ "task-3-find-animal",+ 19+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 29+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 200+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 441+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 363+ ],+ [+ "task-5-chemistry-mix",+ 3+ ],+ [+ "task-3-find-plant",+ 1+ ],+ [+ "task-4-grow-plant",+ 40+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 98+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 185+ ],+ [+ "task-10-use-thermometer",+ 368+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 106+ ],+ [+ "task-3-find-plant",+ 187+ ],+ [+ "task-3-find-plant",+ 102+ ],+ [+ "task-3-find-animal",+ 62+ ],+ [+ "task-3-find-non-living-thing",+ 195+ ],+ [+ "task-10-use-thermometer",+ 188+ ],+ [+ "task-3-find-plant",+ 5+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 112+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 50+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 314+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 293+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 177+ ],+ [+ "task-10-use-thermometer",+ 91+ ],+ [+ "task-3-find-animal",+ 6+ ],+ [+ "task-10-use-thermometer",+ 293+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 9+ ],+ [+ "task-3-find-non-living-thing",+ 51+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 241+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 5+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 85+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 258+ ],+ [+ "task-3-find-plant",+ 8+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 150+ ],+ [+ "task-3-find-living-thing",+ 58+ ],+ [+ "task-10-use-thermometer",+ 401+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 138+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 154+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 16+ ],+ [+ "task-3-find-plant",+ 26+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 4+ ],+ [+ "task-10-use-thermometer",+ 124+ ],+ [+ "task-3-find-living-thing",+ 88+ ],+ [+ "task-1-melt",+ 0+ ],+ [+ "task-4-grow-fruit",+ 25+ ],+ [+ "task-10-use-thermometer",+ 144+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 353+ ],+ [+ "task-7-identify-life-stages-2",+ 0+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 10+ ],+ [+ "task-1-boil",+ 7+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 143+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 391+ ],+ [+ "task-3-find-plant",+ 211+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 261+ ],+ [+ "task-5-chemistry-mix",+ 9+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 141+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 55+ ],+ [+ "task-10-use-thermometer",+ 243+ ],+ [+ "task-4-grow-fruit",+ 37+ ],+ [+ "task-4-grow-plant",+ 25+ ],+ [+ "task-10-use-thermometer",+ 206+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 27+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 41+ ],+ [+ "task-3-find-animal",+ 68+ ],+ [+ "task-4-grow-fruit",+ 6+ ],+ [+ "task-3-find-non-living-thing",+ 70+ ],+ [+ "task-10-use-thermometer",+ 128+ ],+ [+ "task-3-find-non-living-thing",+ 110+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 422+ ],+ [+ "task-10-use-thermometer",+ 121+ ],+ [+ "task-3-find-living-thing",+ 48+ ],+ [+ "task-10-use-thermometer",+ 225+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 310+ ],+ [+ "task-1-freeze",+ 4+ ],+ [+ "task-10-use-thermometer",+ 102+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 242+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 198+ ],+ [+ "task-3-find-animal",+ 174+ ],+ [+ "task-10-use-thermometer",+ 286+ ],+ [+ "task-10-use-thermometer",+ 284+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 6+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 181+ ],+ [+ "task-10-use-thermometer",+ 155+ ],+ [+ "task-4-grow-fruit",+ 55+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 70+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 52+ ],+ [+ "task-3-find-plant",+ 164+ ],+ [+ "task-4-grow-fruit",+ 2+ ],+ [+ "task-3-find-non-living-thing",+ 46+ ],+ [+ "task-3-find-animal",+ 13+ ],+ [+ "task-3-find-living-thing",+ 213+ ],+ [+ "task-4-grow-plant",+ 54+ ],+ [+ "task-3-find-non-living-thing",+ 8+ ],+ [+ "task-3-find-living-thing",+ 13+ ],+ [+ "task-3-find-non-living-thing",+ 147+ ],+ [+ "task-10-use-thermometer",+ 169+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 119+ ],+ [+ "task-10-use-thermometer",+ 22+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 27+ ],+ [+ "task-3-find-animal",+ 53+ ],+ [+ "task-3-find-non-living-thing",+ 80+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 38+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 162+ ],+ [+ "task-3-find-non-living-thing",+ 199+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 14+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 398+ ],+ [+ "task-3-find-plant",+ 178+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 172+ ],+ [+ "task-3-find-living-thing",+ 179+ ],+ [+ "task-3-find-plant",+ 72+ ],+ [+ "task-10-use-thermometer",+ 81+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 438+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 80+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 153+ ],+ [+ "task-3-find-animal",+ 109+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 99+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 88+ ],+ [+ "task-10-use-thermometer",+ 337+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 182+ ],+ [+ "task-3-find-non-living-thing",+ 183+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 0+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 313+ ],+ [+ "task-10-use-thermometer",+ 99+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 98+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 289+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 166+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 55+ ],+ [+ "task-10-use-thermometer",+ 270+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 15+ ],+ [+ "task-10-use-thermometer",+ 190+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 342+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 59+ ],+ [+ "task-3-find-non-living-thing",+ 74+ ],+ [+ "task-3-find-living-thing",+ 206+ ],+ [+ "task-3-find-living-thing",+ 125+ ],+ [+ "task-3-find-animal",+ 120+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 76+ ],+ [+ "task-10-use-thermometer",+ 305+ ],+ [+ "task-3-find-animal",+ 84+ ],+ [+ "task-3-find-animal",+ 224+ ],+ [+ "task-10-use-thermometer",+ 359+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 65+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 4+ ],+ [+ "task-3-find-animal",+ 71+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 40+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 58+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 46+ ],+ [+ "task-3-find-animal",+ 144+ ],+ [+ "task-10-use-thermometer",+ 205+ ],+ [+ "task-10-use-thermometer",+ 90+ ],+ [+ "task-10-use-thermometer",+ 89+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 146+ ],+ [+ "task-10-use-thermometer",+ 216+ ],+ [+ "task-3-find-animal",+ 1+ ],+ [+ "task-3-find-non-living-thing",+ 113+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 64+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 92+ ],+ [+ "task-3-find-living-thing",+ 114+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 74+ ],+ [+ "task-3-find-animal",+ 156+ ],+ [+ "task-3-find-non-living-thing",+ 135+ ],+ [+ "task-3-find-living-thing",+ 90+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 206+ ],+ [+ "task-3-find-living-thing",+ 153+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 330+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 23+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 2+ ],+ [+ "task-10-use-thermometer",+ 231+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 302+ ],+ [+ "task-3-find-non-living-thing",+ 16+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 8+ ],+ [+ "task-10-use-thermometer",+ 311+ ],+ [+ "task-10-use-thermometer",+ 142+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 30+ ],+ [+ "task-10-use-thermometer",+ 317+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 28+ ],+ [+ "task-3-find-non-living-thing",+ 171+ ],+ [+ "task-3-find-living-thing",+ 131+ ],+ [+ "task-2-power-component",+ 3+ ],+ [+ "task-3-find-animal",+ 108+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 25+ ],+ [+ "task-3-find-non-living-thing",+ 62+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 216+ ],+ [+ "task-10-use-thermometer",+ 97+ ],+ [+ "task-3-find-living-thing",+ 74+ ],+ [+ "task-3-find-living-thing",+ 172+ ],+ [+ "task-3-find-non-living-thing",+ 120+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 134+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 1+ ],+ [+ "task-3-find-plant",+ 155+ ],+ [+ "task-4-grow-plant",+ 43+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 164+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 411+ ],+ [+ "task-3-find-living-thing",+ 106+ ],+ [+ "task-10-use-thermometer",+ 163+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 194+ ],+ [+ "task-3-find-animal",+ 114+ ],+ [+ "task-3-find-non-living-thing",+ 2+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 279+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 426+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 281+ ],+ [+ "task-4-grow-plant",+ 53+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 55+ ],+ [+ "task-3-find-plant",+ 173+ ],+ [+ "task-3-find-plant",+ 11+ ],+ [+ "task-3-find-non-living-thing",+ 180+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 42+ ],+ [+ "task-3-find-non-living-thing",+ 163+ ],+ [+ "task-3-find-living-thing",+ 120+ ],+ [+ "task-10-use-thermometer",+ 234+ ],+ [+ "task-10-use-thermometer",+ 2+ ],+ [+ "task-10-use-thermometer",+ 212+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 6+ ],+ [+ "task-3-find-animal",+ 93+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 125+ ],+ [+ "task-10-use-thermometer",+ 63+ ],+ [+ "task-3-find-animal",+ 127+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 11+ ],+ [+ "task-10-use-thermometer",+ 208+ ],+ [+ "task-3-find-animal",+ 67+ ],+ [+ "task-3-find-non-living-thing",+ 13+ ],+ [+ "task-10-use-thermometer",+ 24+ ],+ [+ "task-3-find-plant",+ 67+ ],+ [+ "task-1-boil",+ 9+ ],+ [+ "task-3-find-plant",+ 63+ ],+ [+ "task-3-find-plant",+ 200+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 69+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 76+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 208+ ],+ [+ "task-3-find-animal",+ 28+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 82+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 39+ ],+ [+ "task-3-find-plant",+ 142+ ],+ [+ "task-3-find-plant",+ 133+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 18+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 326+ ],+ [+ "task-3-find-animal",+ 141+ ],+ [+ "task-1-freeze",+ 2+ ],+ [+ "task-3-find-animal",+ 219+ ],+ [+ "task-3-find-animal",+ 135+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 84+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 44+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 11+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 65+ ],+ [+ "task-3-find-living-thing",+ 2+ ],+ [+ "task-3-find-living-thing",+ 100+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 79+ ],+ [+ "task-3-find-animal",+ 115+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 244+ ],+ [+ "task-3-find-living-thing",+ 167+ ],+ [+ "task-3-find-living-thing",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 92+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 209+ ],+ [+ "task-3-find-plant",+ 23+ ],+ [+ "task-3-find-non-living-thing",+ 42+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 8+ ],+ [+ "task-3-find-plant",+ 219+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 280+ ],+ [+ "task-3-find-non-living-thing",+ 200+ ],+ [+ "task-3-find-non-living-thing",+ 221+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 229+ ],+ [+ "task-3-find-plant",+ 9+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 4+ ],+ [+ "task-3-find-plant",+ 175+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 320+ ],+ [+ "task-3-find-living-thing",+ 193+ ],+ [+ "task-3-find-plant",+ 35+ ],+ [+ "task-3-find-non-living-thing",+ 184+ ],+ [+ "task-3-find-animal",+ 151+ ],+ [+ "task-3-find-non-living-thing",+ 32+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 148+ ],+ [+ "task-3-find-animal",+ 42+ ],+ [+ "task-3-find-animal",+ 112+ ],+ [+ "task-3-find-animal",+ 121+ ],+ [+ "task-4-grow-fruit",+ 42+ ],+ [+ "task-1-melt",+ 3+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 75+ ],+ [+ "task-3-find-animal",+ 158+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 17+ ],+ [+ "task-3-find-animal",+ 125+ ],+ [+ "task-3-find-plant",+ 118+ ],+ [+ "task-3-find-non-living-thing",+ 208+ ],+ [+ "task-3-find-plant",+ 143+ ],+ [+ "task-3-find-animal",+ 90+ ],+ [+ "task-3-find-living-thing",+ 157+ ],+ [+ "task-3-find-non-living-thing",+ 205+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 60+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 19+ ],+ [+ "task-3-find-non-living-thing",+ 11+ ],+ [+ "task-3-find-non-living-thing",+ 73+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 11+ ],+ [+ "task-3-find-animal",+ 195+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 54+ ],+ [+ "task-3-find-living-thing",+ 49+ ],+ [+ "task-3-find-non-living-thing",+ 100+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 287+ ],+ [+ "task-4-grow-plant",+ 6+ ],+ [+ "task-3-find-animal",+ 136+ ],+ [+ "task-4-grow-plant",+ 9+ ],+ [+ "task-3-find-animal",+ 200+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 80+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 252+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 15+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 41+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 18+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 62+ ],+ [+ "task-3-find-plant",+ 32+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 160+ ],+ [+ "task-3-find-plant",+ 100+ ],+ [+ "task-3-find-animal",+ 210+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 15+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 305+ ],+ [+ "task-3-find-plant",+ 167+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 37+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 243+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 48+ ],+ [+ "task-3-find-animal",+ 164+ ],+ [+ "task-3-find-living-thing",+ 199+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 81+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 29+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 121+ ],+ [+ "task-3-find-animal",+ 221+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 52+ ],+ [+ "task-3-find-plant",+ 90+ ],+ [+ "task-3-find-living-thing",+ 34+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 0+ ],+ [+ "task-3-find-living-thing",+ 84+ ],+ [+ "task-1-melt",+ 7+ ],+ [+ "task-3-find-animal",+ 24+ ],+ [+ "task-4-grow-fruit",+ 31+ ],+ [+ "task-1-boil",+ 3+ ],+ [+ "task-3-find-living-thing",+ 141+ ],+ [+ "task-7-identify-life-stages-1",+ 1+ ],+ [+ "task-3-find-plant",+ 123+ ],+ [+ "task-4-grow-plant",+ 0+ ],+ [+ "task-4-grow-fruit",+ 27+ ],+ [+ "task-3-find-living-thing",+ 70+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 85+ ],+ [+ "task-3-find-living-thing",+ 160+ ],+ [+ "task-3-find-non-living-thing",+ 132+ ],+ [+ "task-3-find-non-living-thing",+ 22+ ],+ [+ "task-4-grow-fruit",+ 36+ ],+ [+ "task-7-identify-life-stages-1",+ 2+ ],+ [+ "task-3-find-non-living-thing",+ 222+ ],+ [+ "task-3-find-living-thing",+ 222+ ],+ [+ "task-3-find-animal",+ 188+ ],+ [+ "task-4-grow-plant",+ 61+ ],+ [+ "task-3-find-non-living-thing",+ 111+ ],+ [+ "task-3-find-non-living-thing",+ 10+ ],+ [+ "task-4-grow-plant",+ 3+ ],+ [+ "task-3-find-plant",+ 128+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 9+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 56+ ],+ [+ "task-3-find-non-living-thing",+ 14+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 48+ ],+ [+ "task-3-find-plant",+ 217+ ],+ [+ "task-4-grow-fruit",+ 46+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 84+ ],+ [+ "task-3-find-plant",+ 106+ ],+ [+ "task-3-find-living-thing",+ 180+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 64+ ],+ [+ "task-3-find-non-living-thing",+ 0+ ],+ [+ "task-3-find-animal",+ 23+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 54+ ],+ [+ "task-3-find-living-thing",+ 77+ ],+ [+ "task-3-find-non-living-thing",+ 150+ ],+ [+ "task-3-find-animal",+ 132+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 1+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 13+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 238+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 0+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 113+ ],+ [+ "task-3-find-plant",+ 182+ ],+ [+ "task-1-freeze",+ 8+ ],+ [+ "task-3-find-living-thing",+ 188+ ],+ [+ "task-3-find-living-thing",+ 18+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 75+ ],+ [+ "task-4-grow-plant",+ 21+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 51+ ],+ [+ "task-3-find-living-thing",+ 32+ ],+ [+ "task-3-find-plant",+ 176+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 13+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 189+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 37+ ],+ [+ "task-1-freeze",+ 0+ ],+ [+ "task-3-find-non-living-thing",+ 90+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 216+ ],+ [+ "task-3-find-non-living-thing",+ 182+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 83+ ],+ [+ "task-3-find-living-thing",+ 115+ ],+ [+ "task-3-find-living-thing",+ 66+ ],+ [+ "task-3-find-plant",+ 88+ ],+ [+ "task-4-grow-plant",+ 55+ ],+ [+ "task-3-find-non-living-thing",+ 224+ ],+ [+ "task-3-find-plant",+ 117+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 195+ ],+ [+ "task-3-find-plant",+ 76+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 1+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 77+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 174+ ],+ [+ "task-3-find-living-thing",+ 214+ ],+ [+ "task-3-find-living-thing",+ 216+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 71+ ],+ [+ "task-3-find-plant",+ 17+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 91+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 44+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 204+ ],+ [+ "task-1-boil",+ 2+ ],+ [+ "task-3-find-plant",+ 208+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 11+ ],+ [+ "task-3-find-non-living-thing",+ 219+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 93+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 80+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 62+ ],+ [+ "task-3-find-living-thing",+ 81+ ],+ [+ "task-3-find-living-thing",+ 122+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 316+ ],+ [+ "task-5-chemistry-mix",+ 7+ ],+ [+ "task-3-find-living-thing",+ 159+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 14+ ],+ [+ "task-3-find-non-living-thing",+ 139+ ],+ [+ "task-3-find-living-thing",+ 102+ ],+ [+ "task-4-grow-plant",+ 27+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 64+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 51+ ],+ [+ "task-4-grow-plant",+ 36+ ],+ [+ "task-3-find-living-thing",+ 27+ ],+ [+ "task-7-identify-life-stages-1",+ 3+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 37+ ],+ [+ "task-3-find-living-thing",+ 187+ ],+ [+ "task-3-find-animal",+ 153+ ],+ [+ "task-4-grow-plant",+ 85+ ],+ [+ "task-3-find-animal",+ 39+ ],+ [+ "task-3-find-animal",+ 157+ ],+ [+ "task-3-find-animal",+ 77+ ],+ [+ "task-3-find-non-living-thing",+ 33+ ],+ [+ "task-4-grow-plant",+ 45+ ],+ [+ "task-3-find-animal",+ 89+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 32+ ],+ [+ "task-3-find-living-thing",+ 204+ ],+ [+ "task-3-find-animal",+ 161+ ],+ [+ "task-3-find-plant",+ 116+ ],+ [+ "task-3-find-non-living-thing",+ 23+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 3+ ],+ [+ "task-3-find-animal",+ 165+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 46+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 58+ ],+ [+ "task-4-grow-fruit",+ 29+ ],+ [+ "task-3-find-animal",+ 170+ ],+ [+ "task-3-find-plant",+ 81+ ],+ [+ "task-3-find-non-living-thing",+ 167+ ],+ [+ "task-3-find-animal",+ 182+ ],+ [+ "task-4-grow-plant",+ 91+ ],+ [+ "task-3-find-non-living-thing",+ 60+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 31+ ],+ [+ "task-3-find-plant",+ 109+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 11+ ],+ [+ "task-3-find-animal",+ 100+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 91+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 20+ ],+ [+ "task-4-grow-fruit",+ 12+ ],+ [+ "task-3-find-plant",+ 84+ ],+ [+ "task-3-find-living-thing",+ 0+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 14+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 7+ ],+ [+ "task-4-grow-plant",+ 42+ ],+ [+ "task-3-find-non-living-thing",+ 64+ ],+ [+ "task-3-find-plant",+ 132+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 13+ ],+ [+ "task-4-grow-plant",+ 56+ ],+ [+ "task-3-find-plant",+ 99+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 3+ ],+ [+ "task-3-find-living-thing",+ 28+ ],+ [+ "task-4-grow-plant",+ 22+ ],+ [+ "task-3-find-living-thing",+ 201+ ],+ [+ "task-4-grow-plant",+ 44+ ],+ [+ "task-3-find-animal",+ 31+ ],+ [+ "task-4-grow-fruit",+ 87+ ],+ [+ "task-3-find-animal",+ 137+ ],+ [+ "task-3-find-non-living-thing",+ 79+ ],+ [+ "task-3-find-living-thing",+ 119+ ],+ [+ "task-3-find-animal",+ 177+ ],+ [+ "task-3-find-living-thing",+ 219+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 33+ ],+ [+ "task-3-find-plant",+ 66+ ],+ [+ "task-3-find-living-thing",+ 200+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 24+ ],+ [+ "task-3-find-living-thing",+ 7+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 7+ ],+ [+ "task-3-find-plant",+ 137+ ],+ [+ "task-1-melt",+ 13+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 22+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 25+ ],+ [+ "task-3-find-plant",+ 108+ ],+ [+ "task-3-find-non-living-thing",+ 4+ ],+ [+ "task-3-find-living-thing",+ 183+ ],+ [+ "task-3-find-animal",+ 36+ ],+ [+ "task-3-find-non-living-thing",+ 63+ ],+ [+ "task-3-find-non-living-thing",+ 169+ ],+ [+ "task-3-find-living-thing",+ 76+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 23+ ],+ [+ "task-3-find-plant",+ 104+ ],+ [+ "task-3-find-non-living-thing",+ 103+ ],+ [+ "task-3-find-living-thing",+ 136+ ],+ [+ "task-4-grow-plant",+ 31+ ],+ [+ "task-3-find-animal",+ 75+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 10+ ],+ [+ "task-3-find-non-living-thing",+ 25+ ],+ [+ "task-3-find-plant",+ 171+ ],+ [+ "task-3-find-plant",+ 34+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 4+ ],+ [+ "task-3-find-animal",+ 95+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 21+ ],+ [+ "task-4-grow-fruit",+ 47+ ],+ [+ "task-3-find-plant",+ 144+ ],+ [+ "task-3-find-non-living-thing",+ 30+ ],+ [+ "task-3-find-living-thing",+ 217+ ],+ [+ "task-3-find-living-thing",+ 209+ ],+ [+ "task-4-grow-fruit",+ 9+ ],+ [+ "task-3-find-non-living-thing",+ 148+ ],+ [+ "task-7-identify-life-stages-2",+ 3+ ],+ [+ "task-3-find-plant",+ 77+ ],+ [+ "task-3-find-living-thing",+ 176+ ],+ [+ "task-3-find-living-thing",+ 118+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 86+ ],+ [+ "task-4-grow-fruit",+ 0+ ],+ [+ "task-3-find-animal",+ 102+ ],+ [+ "task-3-find-living-thing",+ 91+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 34+ ],+ [+ "task-3-find-plant",+ 50+ ],+ [+ "task-3-find-non-living-thing",+ 45+ ],+ [+ "task-4-grow-plant",+ 84+ ],+ [+ "task-3-find-living-thing",+ 185+ ],+ [+ "task-3-find-non-living-thing",+ 37+ ],+ [+ "task-3-find-animal",+ 3+ ],+ [+ "task-3-find-living-thing",+ 110+ ],+ [+ "task-1-boil",+ 6+ ],+ [+ "task-3-find-animal",+ 49+ ],+ [+ "task-3-find-plant",+ 25+ ],+ [+ "task-3-find-plant",+ 124+ ],+ [+ "task-3-find-animal",+ 167+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 73+ ],+ [+ "task-3-find-non-living-thing",+ 160+ ],+ [+ "task-3-find-non-living-thing",+ 36+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 9+ ],+ [+ "task-3-find-plant",+ 160+ ],+ [+ "task-3-find-living-thing",+ 186+ ],+ [+ "task-3-find-non-living-thing",+ 215+ ],+ [+ "task-4-grow-fruit",+ 61+ ],+ [+ "task-3-find-animal",+ 40+ ],+ [+ "task-3-find-animal",+ 181+ ],+ [+ "task-3-find-non-living-thing",+ 43+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 3+ ],+ [+ "task-3-find-living-thing",+ 57+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 66+ ],+ [+ "task-3-find-animal",+ 60+ ],+ [+ "task-3-find-non-living-thing",+ 41+ ],+ [+ "task-3-find-living-thing",+ 177+ ],+ [+ "task-3-find-plant",+ 169+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 77+ ],+ [+ "task-4-grow-plant",+ 76+ ],+ [+ "task-3-find-plant",+ 3+ ],+ [+ "task-3-find-living-thing",+ 46+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 90+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 63+ ],+ [+ "task-3-find-animal",+ 134+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 36+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 56+ ],+ [+ "task-4-grow-plant",+ 35+ ],+ [+ "task-3-find-non-living-thing",+ 12+ ],+ [+ "task-4-grow-fruit",+ 60+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 17+ ],+ [+ "task-3-find-plant",+ 206+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 74+ ],+ [+ "task-3-find-non-living-thing",+ 131+ ],+ [+ "task-4-grow-fruit",+ 28+ ],+ [+ "task-3-find-animal",+ 82+ ],+ [+ "task-3-find-living-thing",+ 144+ ],+ [+ "task-1-boil",+ 5+ ],+ [+ "task-3-find-animal",+ 8+ ],+ [+ "task-3-find-animal",+ 104+ ],+ [+ "task-3-find-non-living-thing",+ 202+ ],+ [+ "task-3-find-living-thing",+ 42+ ],+ [+ "task-4-grow-fruit",+ 39+ ],+ [+ "task-3-find-non-living-thing",+ 76+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 55+ ],+ [+ "task-3-find-animal",+ 166+ ],+ [+ "task-3-find-animal",+ 175+ ],+ [+ "task-3-find-non-living-thing",+ 40+ ],+ [+ "task-3-find-plant",+ 218+ ],+ [+ "task-3-find-plant",+ 41+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 14+ ],+ [+ "task-3-find-non-living-thing",+ 179+ ],+ [+ "task-3-find-living-thing",+ 158+ ],+ [+ "task-3-find-plant",+ 149+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 5+ ],+ [+ "task-4-grow-plant",+ 50+ ],+ [+ "task-3-find-living-thing",+ 71+ ],+ [+ "task-3-find-plant",+ 83+ ],+ [+ "task-3-find-plant",+ 86+ ],+ [+ "task-3-find-plant",+ 92+ ],+ [+ "task-3-find-animal",+ 206+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 49+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 32+ ],+ [+ "task-3-find-animal",+ 216+ ],+ [+ "task-3-find-animal",+ 203+ ],+ [+ "task-4-grow-plant",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 65+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 7+ ],+ [+ "task-3-find-non-living-thing",+ 181+ ],+ [+ "task-3-find-plant",+ 18+ ],+ [+ "task-3-find-living-thing",+ 19+ ],+ [+ "task-3-find-non-living-thing",+ 206+ ],+ [+ "task-3-find-plant",+ 165+ ],+ [+ "task-3-find-non-living-thing",+ 55+ ],+ [+ "task-3-find-plant",+ 39+ ],+ [+ "task-4-grow-plant",+ 86+ ],+ [+ "task-3-find-non-living-thing",+ 21+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 50+ ],+ [+ "task-3-find-non-living-thing",+ 97+ ],+ [+ "task-4-grow-fruit",+ 13+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 90+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 70+ ],+ [+ "task-1-freeze",+ 7+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 77+ ],+ [+ "task-3-find-animal",+ 2+ ],+ [+ "task-3-find-non-living-thing",+ 48+ ],+ [+ "task-3-find-living-thing",+ 142+ ],+ [+ "task-3-find-non-living-thing",+ 93+ ],+ [+ "task-3-find-non-living-thing",+ 27+ ],+ [+ "task-3-find-animal",+ 193+ ],+ [+ "task-3-find-living-thing",+ 47+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 72+ ],+ [+ "task-3-find-plant",+ 114+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 24+ ],+ [+ "task-3-find-living-thing",+ 69+ ],+ [+ "task-3-find-plant",+ 203+ ],+ [+ "task-3-find-non-living-thing",+ 53+ ],+ [+ "task-3-find-animal",+ 21+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 39+ ],+ [+ "task-3-find-non-living-thing",+ 56+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 72+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 60+ ],+ [+ "task-3-find-animal",+ 222+ ],+ [+ "task-4-grow-plant",+ 28+ ],+ [+ "task-3-find-animal",+ 218+ ],+ [+ "task-3-find-living-thing",+ 107+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 10+ ],+ [+ "task-3-find-non-living-thing",+ 153+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 2+ ],+ [+ "task-3-find-plant",+ 147+ ],+ [+ "task-4-grow-fruit",+ 83+ ],+ [+ "task-1-melt",+ 5+ ],+ [+ "task-3-find-non-living-thing",+ 172+ ],+ [+ "task-3-find-plant",+ 16+ ],+ [+ "task-3-find-animal",+ 138+ ],+ [+ "task-3-find-non-living-thing",+ 68+ ],+ [+ "task-3-find-non-living-thing",+ 26+ ],+ [+ "task-3-find-living-thing",+ 133+ ],+ [+ "task-3-find-plant",+ 87+ ],+ [+ "task-4-grow-fruit",+ 33+ ],+ [+ "task-3-find-animal",+ 180+ ],+ [+ "task-3-find-non-living-thing",+ 5+ ],+ [+ "task-3-find-non-living-thing",+ 107+ ],+ [+ "task-3-find-living-thing",+ 152+ ],+ [+ "task-3-find-plant",+ 33+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 4+ ],+ [+ "task-4-grow-fruit",+ 66+ ],+ [+ "task-3-find-living-thing",+ 203+ ],+ [+ "task-3-find-living-thing",+ 169+ ],+ [+ "task-2-power-component",+ 9+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 28+ ],+ [+ "task-3-find-plant",+ 214+ ],+ [+ "task-4-grow-fruit",+ 10+ ],+ [+ "task-3-find-living-thing",+ 150+ ],+ [+ "task-4-grow-fruit",+ 17+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 44+ ],+ [+ "task-4-grow-fruit",+ 73+ ],+ [+ "task-3-find-living-thing",+ 6+ ],+ [+ "task-3-find-animal",+ 47+ ],+ [+ "task-3-find-animal",+ 96+ ],+ [+ "task-3-find-animal",+ 140+ ],+ [+ "task-3-find-living-thing",+ 63+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 67+ ],+ [+ "task-3-find-animal",+ 73+ ],+ [+ "task-3-find-living-thing",+ 154+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 54+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 76+ ],+ [+ "task-4-grow-plant",+ 8+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 79+ ],+ [+ "task-4-grow-fruit",+ 35+ ],+ [+ "task-3-find-living-thing",+ 98+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 46+ ],+ [+ "task-4-grow-fruit",+ 72+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 6+ ],+ [+ "task-4-grow-fruit",+ 14+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 27+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 34+ ],+ [+ "task-3-find-living-thing",+ 132+ ],+ [+ "task-4-grow-fruit",+ 16+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 6+ ],+ [+ "task-3-find-living-thing",+ 72+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 4+ ],+ [+ "task-4-grow-fruit",+ 69+ ],+ [+ "task-1-melt",+ 4+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 42+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 63+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 83+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 31+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 26+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 84+ ],+ [+ "task-5-chemistry-mix",+ 2+ ],+ [+ "task-4-grow-plant",+ 17+ ],+ [+ "task-4-grow-fruit",+ 5+ ],+ [+ "task-4-grow-plant",+ 80+ ],+ [+ "task-5-chemistry-mix",+ 5+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 92+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 8+ ],+ [+ "task-5-chemistry-mix",+ 1+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 5+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 0+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 61+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 2+ ],+ [+ "task-4-grow-plant",+ 89+ ],+ [+ "task-4-grow-plant",+ 19+ ],+ [+ "task-4-grow-fruit",+ 43+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 76+ ],+ [+ "task-4-grow-fruit",+ 68+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 67+ ],+ [+ "task-4-grow-fruit",+ 64+ ],+ [+ "task-1-freeze",+ 6+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 48+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 16+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 10+ ],+ [+ "task-4-grow-plant",+ 58+ ],+ [+ "task-4-grow-plant",+ 70+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 17+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 0+ ],+ [+ "task-4-grow-plant",+ 92+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 24+ ],+ [+ "task-4-grow-plant",+ 74+ ],+ [+ "task-4-grow-fruit",+ 57+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 7+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 35+ ],+ [+ "task-4-grow-plant",+ 39+ ],+ [+ "task-1-freeze",+ 11+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 43+ ],+ [+ "task-4-grow-fruit",+ 24+ ],+ [+ "task-4-grow-plant",+ 13+ ],+ [+ "task-4-grow-plant",+ 67+ ],+ [+ "task-4-grow-plant",+ 72+ ],+ [+ "task-4-grow-fruit",+ 80+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 49+ ],+ [+ "task-1-freeze",+ 10+ ],+ [+ "task-4-grow-plant",+ 73+ ],+ [+ "task-1-freeze",+ 1+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 1+ ],+ [+ "task-4-grow-plant",+ 49+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 45+ ],+ [+ "task-4-grow-plant",+ 52+ ],+ [+ "task-4-grow-plant",+ 18+ ],+ [+ "task-1-freeze",+ 12+ ],+ [+ "task-4-grow-plant",+ 83+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 45+ ],+ [+ "task-4-grow-fruit",+ 50+ ],+ [+ "task-4-grow-fruit",+ 18+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 13+ ],+ [+ "task-4-grow-plant",+ 90+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 11+ ],+ [+ "task-4-grow-fruit",+ 19+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 12+ ],+ [+ "task-7-identify-life-stages-1",+ 5+ ],+ [+ "task-5-chemistry-mix",+ 11+ ],+ [+ "task-1-boil",+ 0+ ],+ [+ "task-1-boil",+ 1+ ],+ [+ "task-1-melt",+ 1+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 46+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 10+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 5+ ],+ [+ "task-5-chemistry-mix",+ 15+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 77+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 7+ ],+ [+ "task-4-grow-plant",+ 30+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 29+ ],+ [+ "task-4-grow-plant",+ 2+ ],+ [+ "task-4-grow-plant",+ 24+ ],+ [+ "task-4-grow-plant",+ 20+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 3+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 23+ ],+ [+ "task-4-grow-plant",+ 10+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 31+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 55+ ],+ [+ "task-4-grow-plant",+ 59+ ],+ [+ "task-2-power-component",+ 0+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 6+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 91+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 5+ ],+ [+ "task-2-power-component",+ 6+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 35+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 50+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 75+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 5+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 37+ ],+ [+ "task-7-identify-life-stages-1",+ 0+ ],+ [+ "task-4-grow-plant",+ 47+ ],+ [+ "task-4-grow-plant",+ 81+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 19+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 12+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 87+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 4+ ],+ [+ "task-4-grow-plant",+ 37+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 12+ ],+ [+ "task-4-grow-plant",+ 46+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 88+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 6+ ],+ [+ "task-4-grow-fruit",+ 49+ ],+ [+ "task-4-grow-fruit",+ 92+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 14+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 2+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 13+ ],+ [+ "task-4-grow-fruit",+ 78+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 21+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 9+ ],+ [+ "task-4-grow-fruit",+ 8+ ],+ [+ "task-4-grow-plant",+ 57+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 53+ ],+ [+ "task-4-grow-fruit",+ 48+ ],+ [+ "task-4-grow-plant",+ 78+ ],+ [+ "task-4-grow-plant",+ 66+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 71+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 67+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 11+ ],+ [+ "task-4-grow-fruit",+ 90+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 9+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 0+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 72+ ],+ [+ "task-2-power-component",+ 2+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 39+ ],+ [+ "task-5-chemistry-mix",+ 12+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 79+ ],+ [+ "task-4-grow-plant",+ 15+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 12+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 13+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 25+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 83+ ],+ [+ "task-4-grow-plant",+ 75+ ],+ [+ "task-4-grow-plant",+ 62+ ],+ [+ "task-4-grow-fruit",+ 76+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 33+ ],+ [+ "task-2-power-component",+ 7+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 17+ ],+ [+ "task-1-freeze",+ 3+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 47+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 38+ ],+ [+ "task-4-grow-fruit",+ 34+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 17+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 7+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 82+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 56+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 3+ ],+ [+ "task-4-grow-plant",+ 64+ ],+ [+ "task-4-grow-fruit",+ 21+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 33+ ],+ [+ "task-1-melt",+ 11+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 42+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 18+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 29+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 53+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 20+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 60+ ],+ [+ "task-4-grow-plant",+ 34+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 58+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 43+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 4+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 32+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 16+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 51+ ],+ [+ "task-4-grow-fruit",+ 15+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 9+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 8+ ],+ [+ "task-4-grow-fruit",+ 91+ ],+ [+ "task-4-grow-plant",+ 12+ ],+ [+ "task-1-boil",+ 10+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 86+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 78+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 58+ ],+ [+ "task-1-boil",+ 12+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 75+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 74+ ],+ [+ "task-4-grow-plant",+ 23+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 18+ ],+ [+ "task-4-grow-fruit",+ 45+ ],+ [+ "task-4-grow-plant",+ 32+ ],+ [+ "task-1-melt",+ 9+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 2+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 26+ ],+ [+ "task-5-chemistry-mix",+ 14+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 53+ ],+ [+ "task-1-melt",+ 8+ ],+ [+ "task-2-power-component",+ 8+ ],+ [+ "task-4-grow-plant",+ 4+ ],+ [+ "task-1-freeze",+ 13+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 59+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 1+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 30+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 63+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 59+ ],+ [+ "task-5-chemistry-mix",+ 6+ ],+ [+ "task-1-melt",+ 6+ ]+]\ No newline at end of filediff --git a/experiments/src/scienceworld/data/valid_indices.json b/experiments/src/scienceworld/data/valid_indices.jsonnew file mode 100644index 0000000..47656d6--- /dev/null+++ b/experiments/src/scienceworld/data/valid_indices.json@@ -0,0 +1,778 @@+[+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 418+ ],+ [+ "task-3-find-living-thing",+ 186+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 326+ ],+ [+ "task-3-find-animal",+ 193+ ],+ [+ "task-4-grow-plant",+ 65+ ],+ [+ "task-3-find-plant",+ 179+ ],+ [+ "task-2a-test-conductivity",+ 587+ ],+ [+ "task-3-find-animal",+ 218+ ],+ [+ "task-10-use-thermometer",+ 384+ ],+ [+ "task-2a-test-conductivity",+ 479+ ],+ [+ "task-3-find-animal",+ 159+ ],+ [+ "task-2a-test-conductivity",+ 528+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 413+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 352+ ],+ [+ "task-10-use-thermometer",+ 385+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 69+ ],+ [+ "task-3-find-animal",+ 211+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 313+ ],+ [+ "task-3-find-plant",+ 175+ ],+ [+ "task-2a-test-conductivity",+ 474+ ],+ [+ "task-2a-test-conductivity",+ 662+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 386+ ],+ [+ "task-1-melt",+ 14+ ],+ [+ "task-3-find-plant",+ 209+ ],+ [+ "task-2a-test-conductivity",+ 579+ ],+ [+ "task-10-use-thermometer",+ 314+ ],+ [+ "task-1-boil",+ 14+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 280+ ],+ [+ "task-10-use-thermometer",+ 378+ ],+ [+ "task-2a-test-conductivity",+ 655+ ],+ [+ "task-3-find-living-thing",+ 161+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 448+ ],+ [+ "task-10-use-thermometer",+ 360+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 389+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 287+ ],+ [+ "task-10-use-thermometer",+ 364+ ],+ [+ "task-2a-test-conductivity",+ 640+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 409+ ],+ [+ "task-2a-test-conductivity",+ 523+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 25+ ],+ [+ "task-10-use-thermometer",+ 284+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 14+ ],+ [+ "task-2a-test-conductivity",+ 485+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 286+ ],+ [+ "task-3-find-living-thing",+ 180+ ],+ [+ "task-4-grow-fruit",+ 85+ ],+ [+ "task-3-find-plant",+ 177+ ],+ [+ "task-3-find-living-thing",+ 209+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 394+ ],+ [+ "task-1-melt",+ 18+ ],+ [+ "task-3-find-animal",+ 173+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 281+ ],+ [+ "task-3-find-animal",+ 221+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 14+ ],+ [+ "task-1-melt",+ 16+ ],+ [+ "task-3-find-living-thing",+ 216+ ],+ [+ "task-4-grow-fruit",+ 90+ ],+ [+ "task-2a-test-conductivity-of-unknown-substances",+ 376+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 87+ ],+ [+ "task-3-find-animal",+ 213+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 300+ ],+ [+ "task-3-find-plant",+ 203+ ],+ [+ "task-10-use-thermometer",+ 285+ ],+ [+ "task-3-find-animal",+ 216+ ],+ [+ "task-3-find-animal",+ 188+ ],+ [+ "task-3-find-animal",+ 176+ ],+ [+ "task-3-find-plant",+ 206+ ],+ [+ "task-4-grow-plant",+ 77+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 253+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 87+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 299+ ],+ [+ "task-10-use-thermometer",+ 358+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 292+ ],+ [+ "task-10-use-thermometer",+ 291+ ],+ [+ "task-3-find-living-thing",+ 214+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 67+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 16+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 83+ ],+ [+ "task-3-find-living-thing",+ 221+ ],+ [+ "task-10-measure-melting-point-(known-substance)",+ 325+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 91+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 84+ ],+ [+ "task-3-find-non-living-thing",+ 150+ ],+ [+ "task-4-grow-plant",+ 84+ ],+ [+ "task-4-grow-plant",+ 68+ ],+ [+ "task-3-find-plant",+ 181+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 76+ ],+ [+ "task-3-find-living-thing",+ 202+ ],+ [+ "task-7-identify-life-stages-1",+ 7+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 88+ ],+ [+ "task-3-find-living-thing",+ 206+ ],+ [+ "task-3-find-non-living-thing",+ 184+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 68+ ],+ [+ "task-3-find-living-thing",+ 218+ ],+ [+ "task-3-find-non-living-thing",+ 187+ ],+ [+ "task-1-boil",+ 15+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 84+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 66+ ],+ [+ "task-3-find-non-living-thing",+ 214+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 25+ ],+ [+ "task-2-power-component",+ 11+ ],+ [+ "task-3-find-plant",+ 164+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 66+ ],+ [+ "task-3-find-plant",+ 154+ ],+ [+ "task-3-find-non-living-thing",+ 198+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 68+ ],+ [+ "task-3-find-plant",+ 165+ ],+ [+ "task-3-find-non-living-thing",+ 209+ ],+ [+ "task-3-find-non-living-thing",+ 185+ ],+ [+ "task-1-boil",+ 20+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 21+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 80+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 64+ ],+ [+ "task-3-find-non-living-thing",+ 179+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 78+ ],+ [+ "task-3-find-non-living-thing",+ 192+ ],+ [+ "task-1-boil",+ 17+ ],+ [+ "task-1-melt",+ 20+ ],+ [+ "task-4-grow-fruit",+ 72+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 69+ ],+ [+ "task-3-find-non-living-thing",+ 158+ ],+ [+ "task-4-grow-plant",+ 64+ ],+ [+ "task-4-grow-fruit",+ 88+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 17+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 80+ ],+ [+ "task-4-grow-plant",+ 85+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 80+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 82+ ],+ [+ "task-4-grow-plant",+ 86+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 18+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 26+ ],+ [+ "task-4-grow-plant",+ 78+ ],+ [+ "task-1-melt",+ 19+ ],+ [+ "task-5-chemistry-mix",+ 21+ ],+ [+ "task-4-grow-fruit",+ 65+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 72+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 20+ ],+ [+ "task-4-grow-plant",+ 88+ ],+ [+ "task-1-melt",+ 15+ ],+ [+ "task-6-lifespan-(longest-lived-then-shortest-lived)",+ 85+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 78+ ],+ [+ "task-4-grow-plant",+ 87+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 23+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 70+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 85+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 72+ ],+ [+ "task-5-chemistry-mix",+ 19+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 18+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 73+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 15+ ],+ [+ "task-4-grow-fruit",+ 84+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 19+ ],+ [+ "task-6-lifespan-(longest-lived)",+ 92+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 22+ ],+ [+ "task-4-grow-fruit",+ 80+ ],+ [+ "task-4-grow-fruit",+ 71+ ],+ [+ "task-7-identify-life-stages-2",+ 5+ ],+ [+ "task-7-identify-life-stages-2",+ 4+ ],+ [+ "task-1-freeze",+ 19+ ],+ [+ "task-6-lifespan-(shortest-lived)",+ 71+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 10+ ],+ [+ "task-1-freeze",+ 15+ ],+ [+ "task-4-grow-fruit",+ 62+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 26+ ],+ [+ "task-1-freeze",+ 18+ ],+ [+ "task-7-identify-life-stages-1",+ 8+ ],+ [+ "task-4-grow-fruit",+ 68+ ],+ [+ "task-7-identify-life-stages-1",+ 6+ ],+ [+ "task-5-chemistry-mix",+ 18+ ],+ [+ "task-1-freeze",+ 16+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 23+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 24+ ],+ [+ "task-1-melt",+ 17+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 22+ ],+ [+ "task-1-boil",+ 16+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 19+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 18+ ],+ [+ "task-2-power-component",+ 13+ ],+ [+ "task-5-chemistry-mix",+ 23+ ],+ [+ "task-2-power-component",+ 12+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 19+ ],+ [+ "task-2-power-component-(renewable-vs-nonrenewable-energy)",+ 13+ ],+ [+ "task-1-freeze",+ 17+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 21+ ],+ [+ "task-1-boil",+ 19+ ],+ [+ "task-1-freeze",+ 14+ ],+ [+ "task-5-chemistry-mix",+ 20+ ],+ [+ "task-5-chemistry-mix-paint-(secondary-color)",+ 24+ ],+ [+ "task-1-freeze",+ 20+ ],+ [+ "task-1-change-the-state-of-matter-of",+ 20+ ],+ [+ "task-5-chemistry-mix",+ 17+ ],+ [+ "task-5-chemistry-mix-paint-(tertiary-color)",+ 20+ ],+ [+ "task-5-chemistry-mix",+ 16+ ],+ [+ "task-5-chemistry-mix",+ 22+ ]+]\ No newline at end of filediff --git a/experiments/src/scienceworld/prompts/system_prompt.py b/experiments/src/scienceworld/prompts/system_prompt.pynew file mode 100644index 0000000..eb8d038--- /dev/null+++ b/experiments/src/scienceworld/prompts/system_prompt.py@@ -0,0 +1,31 @@+scienceworld_system_prompt = """ You are a helpful assistant to do some scientific experiment in an environment.+In the environment, there are several rooms: kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallway+You should explore the environment and find the items you need to complete the experiment.+You can teleport to any room in one step.+All containers in the environment have already been opened, you can directly get items from the containers.+The available actions are:+ open OBJ: open a container+ close OBJ: close a container+ activate OBJ: activate a device+ deactivate OBJ: deactivate a device+ connect OBJ to OBJ: connect electrical components+ disconnect OBJ: disconnect electrical components+ use OBJ [on OBJ]: use a device/item+ look around: describe the current room+ examine OBJ: describe an object in detail+ look at OBJ: describe a container's contents+ read OBJ: read a note or book+ move OBJ to OBJ: move an object to a container+ pick up OBJ: move an object to the inventory+ pour OBJ into OBJ: pour a liquid into a container+ mix OBJ: chemically mix a container+ teleport to LOC: teleport to a specific room+ focus on OBJ: signal intent on a task object+ wait: task no action for 10 steps+ wait1: task no action for a step"++Your response should use the following format:++Thought: <your thoughts>+Action: <your next action>+"""\ No newline at end of filediff --git a/experiments/src/scienceworld/scienceworld_overall_procedure_examples.txt b/experiments/src/scienceworld/scienceworld_overall_procedure_examples.txtnew file mode 100644index 0000000..7b783d5--- /dev/null+++ b/experiments/src/scienceworld/scienceworld_overall_procedure_examples.txt@@ -0,0 +1,200 @@+<EXAMPLE_1>++# Task Completion Strategy: Locate Living Thing and Move to Red Box in Bathroom++Your task is to find a living thing, focus on it, and move it to the red box in the bathroom. This requires completing multiple phases in sequence.++## **Phase 1: Search and Locate Living Thing**++- Systematically search **high-probability locations** where living things are typically found:+ - **greenhouse** (plants, insects, small animals)+ - **outside** (birds, insects, outdoor creatures)+ - **living room** (pets, plants)+ - **bedroom** (pets, plants)++- Use `teleport to [ROOM]` to navigate to each location+- Upon arrival, use `look around` to survey the room and identify all visible objects+- Scan the observation carefully for any living things (animals, plants, insects, birds)+- If the target is not found, continue to the next high-probability room+- Once a living thing is identified, note its exact name as shown in the environment (e.g., "dove", "plant", "butterfly")++## **Phase 2: Focus on the Living Thing**++- **CRITICAL**: Before picking up the object, you MUST signal your intent+- Use `focus on [LIVING_THING]` where [LIVING_THING] is the exact name observed in the environment+- Wait for confirmation feedback that the focus action was successful+- This step is mandatory before proceeding to acquisition++## **Phase 3: Acquire the Living Thing**++- Ensure you are in the same room as the focused living thing+- Use `pick up [LIVING_THING]` to transfer it to your inventory+- Verify through environment feedback that the object is now in your inventory+- Confirm the living thing is no longer visible in the room description++## **Phase 4: Transport to Bathroom**++- With the living thing secured in your inventory, navigate to the bathroom+- Use `teleport to bathroom` to travel directly+- Upon arrival, use `look around` to confirm you are in the bathroom+- Identify the red box in the room description and note its exact identifier (e.g., "red box")++## **Phase 5: Place Living Thing in Red Box**++- Verify the living thing is still in your inventory+- Use `move [LIVING_THING] to red box` to transfer the object from inventory to the target container+- Confirm through environment feedback that the placement was successful+- Task is complete when the living thing is successfully placed in the red box++## **Critical Reminders:**++- **Search Pattern**: If initial high-probability rooms yield no results, expand search to: hallway, art studio, workshop, kitchen+- **Exact Naming**: Always use the exact object name as it appears in the environment observation (e.g., if you see "dove 1", use "dove 1" in commands)+- **Focus is Mandatory**: The task explicitly requires focusing on the living thing before moving it. Do NOT skip Phase 2+- **Container Pre-opened**: All containers including the red box are already open; you can directly move objects into them+- **Error Handling**: If you receive an error message, verify:+ - You are in the correct room+ - The object name matches exactly what's in the environment+ - The object is in your inventory (for placement actions)+ - Try `look around` to refresh your understanding of the current state+- **Inventory Verification**: After `pick up` actions, always check that the object is confirmed in your inventory before proceeding+- **Task Completion**: Success is determined ONLY by environment feedback confirming the living thing is in the red box in the bathroom++<EXAMPLE_1_END>++--------------------------------------------------------------------------------++<EXAMPLE_2>++# Task Completion Strategy: Move Animal to Green Box++To complete this task successfully, follow this structured workflow:++## **Phase 1: Locate the Animal**+- Begin systematic search for an animal in high-probability locations+- Recommended search order:+ 1. **Living room** (the destination room - efficient to check first)+ 2. **Outside** (animals commonly found outdoors)+ 3. **Greenhouse** (animals/organisms may be present)+ 4. **Bedroom, hallway, other rooms** (if not found above)+- For each location:+ - Use `teleport to ROOM_NAME` to navigate to the room+ - Use `look around` to observe all visible items and containers+ - Use `examine OBJECT` if you need detailed inspection of a suspected animal+ - Carefully read the observation feedback to identify any animal+- Continue searching until an animal is definitively identified++## **Phase 2: Focus on the Animal**+- Once you have identified the animal in the environment, you MUST signal your intent before acquiring it+- Use `focus on ANIMAL_NAME` where ANIMAL_NAME is the exact identifier from your observation (e.g., `focus on dove`, `focus on butterfly`)+- Verify the focus confirmation in the system feedback before proceeding+- **Critical**: Do not skip this step - the task explicitly requires focusing on the thing++## **Phase 3: Acquire the Animal**+- Ensure you are in the same room as the animal+- Use `pick up ANIMAL_NAME` to transfer the animal to your inventory+- Confirm through observation feedback that the animal is now in your inventory+- If you receive "Nothing happened", verify:+ - You are in the correct room with the animal+ - You have used the correct object identifier+ - The animal is accessible (not inside a closed container - though all containers are pre-opened)++## **Phase 4: Transport to Living Room**+- If you are not already in the living room, use `teleport to living room` to navigate there+- Use `look around` to confirm you are in the living room and to locate the green box+- Visually identify the green box in the room description+- Verify the animal remains in your inventory++## **Phase 5: Place Animal in Green Box**+- Ensure you can see the green box in your current observation+- Use `move ANIMAL_NAME to green box` to place the animal in the target container+- Verify task completion through environment feedback+- The task is complete when the animal is successfully placed in the green box++## **Critical Reminders:**+- **Always use exact object names** as they appear in observations (e.g., "dove 1", "butterfly")+- **The `focus on` action is mandatory** - the task explicitly states "focus on the thing"+- **All containers are pre-opened** - you can directly interact with contents without using `open`+- **If you receive an error feedback:+ - Double-check object identifiers match observation exactly+ - Verify you are in the correct room+ - Ensure the object is in your inventory before attempting to move it+- **Task completion is confirmed ONLY by environment feedback**, not by your reasoning+- **Base each action on actual observation feedback**, not assumptions++<EXAMPLE_2_END>++--------------------------------------------------------------------------------++<EXAMPLE_3>++# TASK PROCEDURAL GUIDANCE: Find Plant and Move to Purple Box++Your task is to locate a plant, focus on it to signal intent, and then transport it to the purple box in the workshop. Complete all phases in sequence.++## **Phase 1: LOCATE THE PLANT**++**Objective:** Find the plant in the environment++**Procedure:**+1. Start by teleporting to the most likely location for a plant:+ - Use `teleport to greenhouse` (highest probability)+ - Alternative locations: living room, bedroom, outside+2. Upon arrival, use `look around` to survey the current room+3. Examine the observation output to identify if a plant is present+4. If the plant is found, proceed to Phase 2+5. **If plant is NOT found:** Teleport to the next probable location and repeat steps 2-3:+ - `teleport to living room`+ - `teleport to bedroom`+ - `teleport to outside`+ - Continue until plant is located++## **Phase 2: FOCUS ON THE PLANT**++**Objective:** Signal intent on the target object++**Procedure:**+1. Identify the exact name/identifier of the plant from your observation (e.g., "plant", "plant 1", etc.)+2. Use the focus command with exact syntax: `focus on plant`+ - Substitute the actual identifier if it includes a number (e.g., `focus on plant 1`)+3. Verify the system confirms the focus action before proceeding++## **Phase 3: ACQUIRE THE PLANT**++**Objective:** Transfer the plant to your inventory++**Procedure:**+1. Use the pick up command: `pick up plant`+ - Use the exact identifier from Phase 2 (e.g., `pick up plant 1` if numbered)+2. Confirm the plant is now in your inventory through observation feedback+3. Verify the plant is no longer visible in the room description++## **Phase 4: TRANSPORT TO WORKSHOP**++**Objective:** Navigate to the workshop with the plant++**Procedure:**+1. Use the teleport command: `teleport to workshop`+2. Upon arrival, use `look around` to confirm you are in the workshop+3. Identify the purple box in the room description+4. Verify the plant is still in your inventory++## **Phase 5: PLACE PLANT IN PURPLE BOX**++**Objective:** Complete the task by placing the plant in the target container++**Procedure:**+1. Use the move command with exact syntax: `move plant to purple box`+ - If the purple box has a number identifier, use it (e.g., `move plant to purple box 1`)+2. Verify through environment feedback that the plant is now inside the purple box+3. Confirm the plant is no longer in your inventory++## **CRITICAL RULES & ERROR HANDLING:**++- **Invalid Action Response:** If you receive an error message, review the observation for the exact object identifier and retry with corrected syntax.+- **Object Not Found:** If the plant is not in any of the primary locations (greenhouse, living room, bedroom, outside), systematically check remaining rooms: kitchen, foundry, bathroom, art studio, hallway.+- **Exact Naming:** Always use the precise object names as they appear in observations, including any numbers (e.g., "plant 1" not "plant").+- **Phase Order:** You MUST complete phases in sequence. Do not skip the "focus on" action in Phase 2.+- **Completion Verification:** Task success is determined ONLY by environment feedback confirming the plant is in the purple box, not by your reasoning.++<EXAMPLE_3_END>\ No newline at end of filediff --git a/experiments/src/scienceworld/scienceworld_procedure_code_template.py b/experiments/src/scienceworld/scienceworld_procedure_code_template.pynew file mode 100644index 0000000..823d929--- /dev/null+++ b/experiments/src/scienceworld/scienceworld_procedure_code_template.py@@ -0,0 +1,107 @@+# ==========================================+# Procedure code template for ScienceWorld environment+# ==========================================+def overall_procedure_code(+ env,+ llm,+ model: str,+ parse_action,+ messages: list = [],+ max_steps: int = 30+):+ """+ Procedure code template for solving a ScienceWorld interactive task using iterative LLM-guided actions.++ INPUTS:+ - env: The environment instance to interact with. (Predefined, call directly)+ - llm: The language model function to generate agent responses. (Predefined, call directly)+ - model: The specific model name or identifier to use with the llm. (Predefined, pass directly)+ - parse_action: A function to extract executable actions from LLM responses. (Predefined, call directly)+ - messages: Pre-populated dialogue context as a list of message dicts. (Contains messages describing the environment background and the task, or previous examples)+ - max_steps: Maximum number of interaction steps before termination. (Predefined, pass directly)+ RETURNS:+ - messages: The updated dialogue context including all interactions.+ - task_done: Boolean indicating if the task was successfully completed.+ - task_reward: The final reward received from the environment.+ - current_steps: The total number of steps taken in the interaction loop.+ These Input Arguments and Return Types MUST NOT be changed.++ This function serves as a STRICT TEMPLATE to enforce grounded, environment-driven task execution.+ """++ # ------------------------------------------------------------------+ # [SECTION] Overall Procedural Guidance INJECTION+ # INSTRUCTION: You should add detailed Overall Procedural Guidance here to help the agent better complete the task.+ # These guidelines will be visible to the agent as user messages.+ # You may define additional helper variables and functions as needed to help the generated code running correctly and efficiently.+ # ------------------------------------------------------------------+ # Example:+ procedure_guidelines = "<detailed_overall_procedural_guidelines_here>"+ messages.append({"role": "user", "content": procedure_guidelines})+ # ------------------------------------------------------------------++ # --- Core task execution state ---+ task_done = False+ current_steps = 0+ task_reward = 0++ # --- Main agent loop (IMMUTABLE STRUCTURE) ---+ while not task_done and current_steps < max_steps:++ # ============================================================+ # 1) THOUGHT PHASE β Query LLM based on current message state+ # - DO NOT change this call signature+ # ============================================================+ try:+ response = llm(messages, model)+ print(f'\033[92mAgent response: \n{response}\033[0m')+ except Exception as e:+ print(f'\033[91mError in LLM call: {e}\033[0m')+ break++ # ============================================================+ # 2) Persist assistant response into dialogue+ # ============================================================+ messages.append({"role": "assistant", "content": response})++ # ============================================================+ # 3) ACTION PARSING PHASE β Extract executable command+ # Expected format: "Action: <command>"+ # ============================================================+ action = parse_action(response)++ # ============================================================+ # 4) ENVIRONMENT INTERACTION PHASE β Execute Action+ # - Must use env.step()+ # - Do not alter the list wrapping behavior+ # - Task completion (task_done) and reward MUST ONLY be+ # derived from env.step() outputs. DO NOT INFER.+ # ============================================================+ observation, step_reward, task_done, info = env.step(action)+ task_reward = info['score'] if info['score'] is not None and info['score'] > task_reward else task_reward++ print(f'\033[93mObservation: \n{observation}\033[0m')++ # ============================================================+ # 5) FEEDBACK PHASE β Feed environment signal back to agent+ # ============================================================+ messages.append({"role": "user", "content": f"Observation: {observation}"})++ # ==============================================================================+ # 6) RUNTIME ANALYSIS & INTERVENTION (Optional, Leave empty if not needed.)+ # INSTRUCTION: Analyze 'observation' or 'response'.+ # You can append EXTRA hints to 'messages' here.+ # WARNING: Do NOT use 'continue', 'break', or 'return'.+ # ==============================================================================+ # Example (change as needed):+ if "<specific_condition>" in observation:+ extra_hint = "<extra_hint_here>"+ messages.append({"role": "user", "content": extra_hint})+ # ==============================================================++ # ============================================================+ # 7) STEP ACCOUNTING+ # ============================================================+ current_steps += 1++ return messages, task_done, task_reward, current_stepsdiff --git a/experiments/src/skill.py b/experiments/src/skill.pynew file mode 100644index 0000000..cfb33fd--- /dev/null+++ b/experiments/src/skill.py@@ -0,0 +1,158 @@+import json+import os+import re+from pathlib import Path+from tqdm import tqdm+import yaml++from src.utils import get_llm_response+from src.prompt_generator import (+ retrieve_relevant_skills_prompt,+ generate_overall_procedure_prompt,+ generate_overall_procedure_code_prompt+)+++class SkillModule:+ def __init__(self, **kwargs):+ self.skills_dir = Path(kwargs.get("skills_dir", "skills"))+ self.overall_procedure_examples_path = kwargs.get("overall_procedure_examples_path", "")+ self.procedure_code_template_path = kwargs.get("procedure_code_template_path", None)+ self.model = kwargs.get("model", "gpt-4o")++ self.metadata = self._load_metadata()++ # Load procedure code template and overall procedure examples+ if self.procedure_code_template_path is not None and os.path.exists(self.procedure_code_template_path):+ with open(self.procedure_code_template_path, "r") as f:+ self.procedure_code_template = f.read()+ else:+ self.procedure_code_template = ''++ if self.overall_procedure_examples_path is not None and os.path.exists(self.overall_procedure_examples_path):+ with open(self.overall_procedure_examples_path, "r") as f:+ self.overall_procedure_examples = f.read()+ else:+ self.overall_procedure_examples = ''+++ def _load_metadata(self):+ """Load existing metadata from file, return empty dict if file does not exist."""+ metadata = {}+ for skill_dir in self.skills_dir.iterdir():+ if skill_dir.is_dir():+ skill_md_path = skill_dir / "SKILL.md"+ if skill_md_path.exists():+ try:+ content = skill_md_path.read_text(encoding="utf-8")+ if content.strip().startswith('---'):+ parts = content.split('---', 2)+ if len(parts) >= 3:+ header_str = parts[1]+ header_data = yaml.safe_load(header_str)+ if isinstance(header_data, dict) and header_data.get('name') and header_data.get('description'):+ metadata[header_data['name']] = {+ 'description': header_data['description'],+ 'skill_dir': str(skill_dir)+ }+ else:+ print(f"[WARNING] Invalid metadata format in {skill_dir.name}, skipping.")+ else:+ print(f"[WARNING] No valid metadata found in {skill_dir.name}, skipping.")+ else:+ print(f"[WARNING] No metadata header found in {skill_dir.name}, skipping.")+ except Exception as e:+ print(f"[ERROR] Failed to read or parse SKILL.md for {skill_dir.name}: {e}")+ else:+ print(f"[WARNING] SKILL.md not found for {skill_dir.name}, skipping.")+ print(f"[INFO] Loaded metadata for {len(metadata)} skills.")+ return metadata++ def retrieve_relevant_skills(self, task):+ """+ Retrieve relevant skills from metadata based on task description.+ """+ response = get_llm_response(+ retrieve_relevant_skills_prompt(self.metadata, task),+ is_string=True,+ model=self.model+ )+ relevant_skill_names = response.split("<Relevant_Skill_Names>")[1].split("</Relevant_Skill_Names>")[0].strip("`json\n").strip("`\n").strip("```\n")+ relevant_skill_names = json.loads(relevant_skill_names)++ return relevant_skill_names++ def generate_overall_procedure(self, task, skill_names):+ """+ Generate overall procedure by combining individual skill contents.+ """+ # skill_contents = []+ # try:+ # for skill_name in skill_names:+ # skill_path = Path(self.metadata[skill_name]['path'])+ # with open(skill_path, 'r') as file:+ # skill_content = file.read()+ # skill_contents.append((skill_name, skill_content))+ # except Exception as e:+ # print(f"[ERROR] Failed to read skill scripts: {e}")+ skill_contents = []+ try:+ for skill_name in skill_names:+ skill_dir = Path(self.metadata[skill_name]['skill_dir'])+ if not skill_dir.is_dir():+ continue++ # 1. Initialize combined text with skill name as header+ combined_text = f"=== Skill: {skill_name} ===\n"++ # 2. First read the main SKILL.md for core instructions, if it exists+ main_file = skill_dir / "SKILL.md"+ if main_file.exists():+ combined_text += f"\n[File: SKILL.md]\n"+ combined_text += main_file.read_text(encoding='utf-8') + "\n"++ # 3. Then read all other files in the skill directory (excluding SKILL.md) and append their content+ for file_path in skill_dir.rglob('*'):+ if file_path.is_file() and file_path.name != "SKILL.md":+ try:+ relative_path = file_path.relative_to(skill_dir)+ content = file_path.read_text(encoding='utf-8')++ combined_text += f"\n[File: {relative_path}]\n"+ combined_text += content + "\n"+ except (UnicodeDecodeError, Exception):+ continue++ skill_contents.append((skill_name, combined_text))++ except Exception as e:+ print(f"[ERROR] Failed to compile skill data: {e}")++ response = get_llm_response(+ generate_overall_procedure_prompt(task, self.overall_procedure_examples, skill_contents),+ is_string=True,+ model=self.model+ )+ overall_procedure = response.split("<Overall_Procedure>")[1].split("</Overall_Procedure>")[0].strip()+ return overall_procedure++ def generate_overall_procedure_code(self, task, overall_procedure):+ """+ Generate overall procedure code.+ """+ response = get_llm_response(+ generate_overall_procedure_code_prompt(task, overall_procedure, self.procedure_code_template),+ is_string=True,+ model=self.model+ )+ pattern = r"<Overall_Procedure_Code>(.*?)</Overall_Procedure_Code>"+ matchs = re.findall(pattern, response, re.DOTALL)+ if matchs:+ raw_content = matchs[-1]+ if "<Overall_Procedure_Code>" in raw_content: # handle nested tags+ overall_procedure_code = raw_content.split("<Overall_Procedure_Code>")[-1]+ overall_procedure_code = raw_content.strip().strip("```python").strip("```")+ else:+ overall_procedure_code = ""++ return overall_procedure_code\ No newline at end of filediff --git a/experiments/src/skills/alfworld/alfworld-appliance-navigator/SKILL.md b/experiments/src/skills/alfworld/alfworld-appliance-navigator/SKILL.mdnew file mode 100644index 0000000..35f7701--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-appliance-navigator/SKILL.md@@ -0,0 +1,17 @@+---+name: alfworld-appliance-navigator+description: This skill navigates the agent to a target appliance (like a microwave, stove, or fridge) needed for a task. It should be triggered when the agent has an object that requires processing (heating, cooling, cleaning) and needs to move to the appropriate station. The skill identifies the appliance from the environment and executes the movement action.+---+# Instructions+Use this skill when you are holding an object that needs to be processed (heated, cooled, or cleaned) and you must locate and move to the correct appliance to perform the action.++## Process+1. **Identify the Target Appliance:** Determine which appliance is required for the task (e.g., microwave for heating, fridge for cooling, sink for cleaning). The required appliance is implied by the action needed (`heat`, `cool`, `clean`).+2. **Locate the Appliance:** Scan the provided environment observation for the target appliance (e.g., `microwave 1`, `fridge 1`, `sinkbasin 1`).+3. **Navigate:** Execute the `go to {appliance}` action to move to the identified appliance location.+4. **Prepare Appliance (if needed):** Upon arrival, check if the appliance requires preparation (e.g., opening a closed microwave or fridge door). If so, perform the necessary action (`open {appliance}`) before proceeding with the object processing.++## Key Principles+* **Trigger:** The agent is holding an object and the next step in the task is to `heat`, `cool`, or `clean` it.+* **Core Action:** The primary output of this skill is the navigation command `go to {target_appliance}`.+* **Prerequisite Check:** Always ensure the appliance is accessible (e.g., open) before attempting to use it for processing.diff --git a/experiments/src/skills/alfworld/alfworld-appliance-preparer/SKILL.md b/experiments/src/skills/alfworld/alfworld-appliance-preparer/SKILL.mdnew file mode 100644index 0000000..b3709f3--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-appliance-preparer/SKILL.md@@ -0,0 +1,26 @@+---+name: alfworld-appliance-preparer+description: This skill prepares an appliance (like a microwave, oven, or toaster) for use by ensuring it is in the correct open/closed state. Trigger this when the agent needs to use an appliance for heating, cooling, or cooking and must first open or close it. It takes an appliance identifier as input and outputs a confirmation that the appliance is ready.+---+# Instructions++## Goal+Prepare a specified household appliance for immediate use by ensuring it is in the correct open or closed state. This is a prerequisite step before performing actions like `heat`, `cool`, or `toggle` with the appliance.++## Input+- **appliance_identifier**: The name of the appliance to prepare (e.g., `microwave 1`, `toaster 1`, `fridge 1`).++## Core Logic+1. **Navigate to the Appliance**: First, go to the location of the target appliance.+2. **Check State & Prepare**: Determine if the appliance needs to be opened or closed based on the intended subsequent action. The standard rule is:+ * For appliances used to contain items for processing (e.g., microwave, oven, fridge), they typically need to be **open** to receive the item.+ * Use the `open {appliance}` or `close {appliance}` action as needed.+3. **Confirm Readiness**: The skill is complete when the appliance is in the correct state, confirmed by an observation from the environment (e.g., "The microwave 1 is open.").++## Important Considerations+- **State Awareness**: Always observe the environment's feedback after each action (e.g., "The microwave 1 is closed."). Do not assume the state.+- **Error Handling**: If the action fails (environment outputs "Nothing happened"), the appliance may already be in the desired state. Re-check the observation and proceed.+- **Trajectory Insight**: Refer to the example in `references/trajectory_example.md` to see a practical application of this skill in the context of a larger task.++## Output+A confirmation that the appliance is ready, typically in the form of the agent's `Thought` summarizing the prepared state and the environment's observation.diff --git a/experiments/src/skills/alfworld/alfworld-appliance-preparer/references/trajectory_example.md b/experiments/src/skills/alfworld/alfworld-appliance-preparer/references/trajectory_example.mdnew file mode 100644index 0000000..6f5240f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-appliance-preparer/references/trajectory_example.md@@ -0,0 +1,19 @@+# Skill Application Example++The following trajectory snippet from the `heat some potato` task demonstrates the `alfworld-appliance-preparer` skill in action. The core skill steps are highlighted.++**Goal:** Heat some potato and put it in diningtable.++1. **[Prerequisite]** Agent acquires a potato.+2. **[Skill Trigger]** Agent needs to use the `microwave 1` to heat the potato.+3. **[Skill Execution - Prepare Appliance]**+ * `Thought:` Now that I have the potato, I need to find an appliance to heat it. The microwave is a suitable option for heating food quickly.+ * `Action: go to microwave 1`+ * `Observation:` The microwave 1 is closed.+ * `Thought:` Before I can heat the potato, I need to open the microwave to place the potato inside. *(Decision to open the appliance)*+ * `Action: open microwave 1` *(Core preparation action)*+ * `Observation:` You open the microwave 1. The microwave 1 is open. In it, you see nothing.+ * **Skill Outcome:** The microwave is now successfully prepared (open) and ready to receive an item for heating.+4. **[Post-Skill Action]** The agent proceeds to `heat potato 3 with microwave 1`.++**Key Takeaway:** The skill encapsulates the sequence of navigating to the appliance, checking its state (`is closed`), and taking the correct action (`open`) to make it ready for the next operation (`heat`).diff --git a/experiments/src/skills/alfworld/alfworld-clean-object/SKILL.md b/experiments/src/skills/alfworld/alfworld-clean-object/SKILL.mdnew file mode 100644index 0000000..d2bf2da--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-clean-object/SKILL.md@@ -0,0 +1,28 @@+---+name: alfworld-clean-object+description: This skill cleans a specified object using an appropriate cleaning receptacle (e.g., sink). It should be triggered when a task requires an object to be in a clean state (e.g., 'clean potato') before proceeding. The skill involves navigating to the cleaning location and performing the clean action, outputting confirmation that the object is now clean.+---+# Instructions++## When to Use+Use this skill when your task requires an object to be in a "clean" state before proceeding (e.g., "clean potato", "wash apple"). The skill is specifically designed for the ALFWorld environment.++## Prerequisites+1. You must already possess the target object in your inventory.+2. You must have identified an appropriate cleaning receptacle (typically a sinkbasin).++## Core Procedure+1. **Navigate to Cleaning Location**: Go to the identified cleaning receptacle (e.g., `sinkbasin 1`).+2. **Execute Clean Action**: Perform the `clean` action using the format: `clean {object_name} with {receptacle_name}`.+3. **Confirm Success**: Verify the environment's observation confirms the object has been cleaned.++## Action Format+- Use the exact ALFWorld action: `clean {obj} with {recep}`+- Example: `clean potato 1 with sinkbasin 1`++## Error Handling+- If the action fails (e.g., "Nothing happened"), consult the troubleshooting guide in the references.+- Ensure you are at the correct receptacle and the object is in your inventory before attempting to clean.++## Post-Condition+After successful execution, the object will be in a clean state. You may proceed with the next step of your task (e.g., placing the clean object in a microwave).diff --git a/experiments/src/skills/alfworld/alfworld-clean-object/references/trajectory_analysis.md b/experiments/src/skills/alfworld/alfworld-clean-object/references/trajectory_analysis.mdnew file mode 100644index 0000000..f3df585--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-clean-object/references/trajectory_analysis.md@@ -0,0 +1,25 @@+# Trajectory Analysis & Skill Derivation++## Source Trajectory+**Task:** "put a clean potato in microwave"++**Key Steps:**+1. Agent acquires potato from fridge.+2. **Skill Trigger:** Task requires a *clean* potato.+3. Agent navigates to `sinkbasin 1`.+4. Agent executes: `clean potato 1 with sinkbasin 1`+5. Environment confirms: "You clean the potato 1 using the sinkbasin 1."+6. Agent proceeds to place the now-clean potato in the microwave.++## Skill Abstraction+The trajectory demonstrates a clear, reusable subroutine:+1. **Condition:** Object needs to be cleaned.+2. **Action:** `clean {obj} with {recep}`+3. **Location:** Typically a `sinkbasin`.+4. **Prerequisite:** Object must be in agent's inventory.+5. **Outcome:** Object state changes to "clean".++## Environment Notes+- The `clean` action is a discrete, atomic command in ALFWorld.+- The cleaning receptacle must be appropriate (e.g., `sinkbasin`, not `countertop`).+- The action consumes one turn and provides immediate success/failure feedback.diff --git a/experiments/src/skills/alfworld/alfworld-clean-object/references/troubleshooting.md b/experiments/src/skills/alfworld/alfworld-clean-object/references/troubleshooting.mdnew file mode 100644index 0000000..2007ba2--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-clean-object/references/troubleshooting.md@@ -0,0 +1,29 @@+# Troubleshooting Guide++## Common Failure Modes++### 1. "Nothing happened" after clean action+**Possible Causes:**+- You are not at the correct receptacle. Ensure you have executed `go to {recep}` first.+- The object is not in your inventory. You must `take` the object before cleaning.+- The receptacle is not valid for cleaning (e.g., `cabinet`). Use only `sinkbasin`.++**Solution:**+1. Verify your location with `Observation`.+2. Verify inventory by checking if you recently picked up the object.+3. Ensure the receptacle name matches exactly (e.g., `sinkbasin 1`).++### 2. Cannot find a cleaning receptacle+**Solution:**+- Scan the initial observation for `sinkbasin`. There is typically at least one.+- If no sink is present, the task may not require cleaning or the environment is anomalous.++### 3. Object not found in inventory+**Solution:**+- You must acquire the object first (e.g., from a `fridge`, `cabinet`).+- Execute `take {obj} from {recep}` before attempting to clean.++## Success Verification+A successful clean action will yield an observation similar to:+- "You clean the {object_name} using the {receptacle_name}."+- This confirms the object's state is now "clean" for subsequent task steps.diff --git a/experiments/src/skills/alfworld/alfworld-device-operator/SKILL.md b/experiments/src/skills/alfworld/alfworld-device-operator/SKILL.mdnew file mode 100644index 0000000..505c403--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-device-operator/SKILL.md@@ -0,0 +1,44 @@+---+name: alfworld-device-operator+description: This skill operates a device or appliance (like a desklamp) to interact with another object. It should be triggered when the task requires using a tool on a target item (e.g., 'look at laptop under the desklamp'). The skill assumes the target object and the operating device are co-located, and it executes the appropriate use action (e.g., toggle, heat, 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.diff --git a/experiments/src/skills/alfworld/alfworld-device-operator/references/device_location_guide.md b/experiments/src/skills/alfworld/alfworld-device-operator/references/device_location_guide.mdnew file mode 100644index 0000000..7b3a0a7--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-device-operator/references/device_location_guide.md@@ -0,0 +1,28 @@+# Common Device Locations in ALFWorld++This guide lists typical receptacles where specific devices are found. Use this to prioritize search order in **Phase 1** of the skill.++## Lighting & Electronics+* **Desklamp:** `desk`, `sidetable`, `dresser`+* **Floorlamp:** Next to `armchair`, `sofa`, in `corner`+* **Cellphone:** `sidetable`, `desk`, `bed`++## Kitchen Appliances+* **Microwave:** `countertop`, `kitchen cabinet`+* **Fridge:** Standalone unit (often its own receptacle like `fridge 1`)+* **Faucet:** `sink`, `bathtub`+* **Toaster:** `countertop`+* **Coffee Machine:** `countertop`++## Cleaning Tools+* **Spraybottle:** `countertop`, `sink`, `cabinet`+* **Soapbar:** `sink`, `soapdish`, `shower`++## Climate Control+* **Houseplant:** `floor`, `sidetable`, `desk`+* **Candle:** `sidetable`, `mantel`, `desk`++## General Search Heuristics+1. **Check the most specific receptacle first** (e.g., for a `desklamp`, check `desk 1` before `sidetable 1`).+2. **If not found, check similar receptacles** in the room.+3. **Devices are often static** and do not move between receptacles during a task.diff --git a/experiments/src/skills/alfworld/alfworld-environment-scanner/SKILL.md b/experiments/src/skills/alfworld/alfworld-environment-scanner/SKILL.mdnew file mode 100644index 0000000..d8fb613--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-environment-scanner/SKILL.md@@ -0,0 +1,28 @@+---+name: alfworld-environment-scanner+description: Performs an initial scan of the Alfworld environment to identify all visible objects and receptacles. Processes raw observation text into a structured list of entities to build a mental map for planning.+---+# Instructions++## Primary Objective+Execute an initial environmental scan at the start of any Alfworld task. Your goal is to systematically identify and catalog all objects and receptacles mentioned in the initial observation text.++## Core Workflow+1. **Trigger:** This skill is triggered immediately upon receiving the initial environment description from the simulator (e.g., "You are in the middle of a room. Looking quickly around you, you see...").+2. **Parse & Extract:** Process the raw observation text. Extract every noun phrase that represents a physical entity (object or receptacle). Note the naming convention (e.g., "armchair 2", "diningtable 1").+3. **Categorize:** Mentally categorize each entity. A **receptacle** is a surface or container that can hold other objects (e.g., `sofa`, `sidetable`, `diningtable`, `dresser`). An **object** is an item that can be manipulated (e.g., `laptop`, `creditcard`, `pillow`). Some entities (like `ottoman`) can be both depending on context.+4. **Output Structured Mental Map:** Formulate a clear, concise internal summary. Do not output this summary to the simulatorβit is for your planning use only.+ * **Format:** `Scan Complete. Receptacles: [list]. Objects: [list].`+ * **Example:** Based on the trajectory, the mental map should be: `Scan Complete. Receptacles: [armchair 2, armchair 1, diningtable 1, drawer 4, drawer 3, drawer 2, drawer 1, dresser 1, garbagecan 1, ottoman 1, sidetable 3, sidetable 2, sidetable 1, sofa 1]. Objects: [].` *(Note: Initial scan only lists visible furniture; objects on them are discovered upon interaction.)*++## Execution Rules+* **Single Action:** This skill culminates in a single `go to <receptacle>` action to begin the task-specific search. Choose the most logical first receptacle to inspect (e.g., large central surfaces like `diningtable 1` or `sofa 1`).+* **No Looping:** Do not create a loop of `go to` actions. After executing the first `go to`, the skill ends, and standard task planning takes over.+* **Integration:** The mental map generated by this skill must inform all subsequent planning. When searching for a target object, reason about which receptacles from your map are most likely to contain it.++## Example from Trajectory+**Initial Observation:** "You are in the middle of a room... you see a armchair 2, a armchair 1, a diningtable 1, a drawer 4... sofa 1."+**Skill Execution:**+* **Thought:** `Initiating environment scan. I see multiple receptacles: armchairs, tables, drawers, a dresser, garbage can, ottoman, sidetables, and a sofa. I will build a mental map and then start searching for the laptop on a likely surface.`+* **Action:** `go to sofa 1`+*(The agent then proceeds with the main task using the knowledge from the scan.)*diff --git a/experiments/src/skills/alfworld/alfworld-environment-scanner/references/alfworld_actions_guide.md b/experiments/src/skills/alfworld/alfworld-environment-scanner/references/alfworld_actions_guide.mdnew file mode 100644index 0000000..6029afa--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-environment-scanner/references/alfworld_actions_guide.md@@ -0,0 +1,31 @@+# Alfworld Action Guide & Conventions++## Core Action Set+The agent can perform the following atomic actions. `{obj}` and `{recep}` must be replaced with exact names from observations.++1. `go to {recep}` - Navigate to a receptacle.+2. `take {obj} from {recep}` - Pick up an object from a receptacle.+3. `put {obj} in/on {recep}` - Place a held object onto/in a receptacle.+4. `open {recep}` - Open a closed receptacle (e.g., drawer, fridge).+5. `close {recep}` - Close an open receptacle.+6. `toggle {obj} {recep}` - Interact with a toggleable object (e.g., switch on a lamp).+7. `clean {obj} with {recep}` - Clean an object using a receptacle/tool.+8. `heat {obj} with {recep}` - Heat an object using a receptacle/appliance.+9. `cool {obj} with {recep}` - Cool an object using a receptacle/appliance.++## Naming Conventions+* Entities are always named with a **base type** and an **instance number** (e.g., `laptop 1`, `sidetable 2`).+* The simulator uses the exact string. `armchair 1` is different from `armchair1`.+* Observations list entities with an indefinite article "a", even before vowels (e.g., "a armchair 1"). Use the entity name *without* the article in actions.++## Observation Semantics+* `On the {recep}, you see...` - Lists objects currently on that receptacle.+* `You see nothing.` - The receptacle is empty.+* `Nothing happened.` - The last action was **invalid** (e.g., object not found, precondition not met). This is critical feedback for replanning.+* `You pick up the {obj} from the {recep}.` - Confirmation of a successful `take` action.+* `You open the {recep}.` - Confirmation of a successful `open` action.++## Strategic Implications for Scanning+1. **Receptacle Primacy:** The `go to` action only accepts receptacle targets. Therefore, identifying all receptacles is the first step for navigation.+2. **Object Discovery:** Objects are only revealed when you are at (`go to`) a receptacle and receive the "On the..." observation. The initial scan provides the list of locations to check.+3. **Containment Hierarchy:** Some receptacles (like `drawer`) may be closed initially, requiring an `open` action before their contents are known. The scanner should note these for potential future exploration.diff --git a/experiments/src/skills/alfworld/alfworld-goal-interpreter/SKILL.md b/experiments/src/skills/alfworld/alfworld-goal-interpreter/SKILL.mdnew file mode 100644index 0000000..41570dd--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-goal-interpreter/SKILL.md@@ -0,0 +1,32 @@+---+name: alfworld-goal-interpreter+description: Parses 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).+---+# Goal Interpretation Protocol++## 1. Parse the Task Statement+When a new task is assigned, immediately analyze the natural language instruction to extract its core components. Use the parsing script (`parse_goal.py`) to perform this analysis.++**Input:** The raw task string (e.g., "look at pillow under the desklamp").+**Output:** A structured dictionary containing:+- `primary_target`: The main object to interact with.+- `reference_object`: The object that defines a location or condition.+- `spatial_relation`: The preposition linking them (e.g., under, on, in).+- `action`: The verb defining the required interaction.++## 2. Generate Sub-Objectives+Based on the parsed components, formulate a clear, sequential plan. The plan must account for the spatial relationship.++**Example Logic:**+- **IF** relation is `under` β Sub-goal 1: Locate the `reference_object`. Sub-goal 2: Inspect the area beneath it for the `primary_target`.+- **IF** relation is `in` or `on` β Sub-goal 1: Locate the `reference_object`. Sub-goal 2: Check its contents/surface.++## 3. Identify Required Objects & Actions+Map the parsed objects to the available action types in the environment. The primary action verbs (look, take, use, etc.) from the task must be translated into the agent's available action set (go to, take, use, etc.).++**Critical Check:** If the `reference_object` is a container (drawer, fridge), ensure the plan includes the `open` action before inspection.++## 4. Execute & Adapt+Initiate the plan. After each action, monitor the observation. If the expected object is not found, or the action fails ("Nothing happened"), consult the fallback logic in the reference guide (`search_patterns.md`).++**Remember:** The agent must maintain object permanence. If an object is moved (e.g., a pillow is picked up), it is now in the agent's inventory and the spatial relationship is void.diff --git a/experiments/src/skills/alfworld/alfworld-goal-interpreter/references/search_patterns.md b/experiments/src/skills/alfworld/alfworld-goal-interpreter/references/search_patterns.mdnew file mode 100644index 0000000..0838eb4--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-goal-interpreter/references/search_patterns.md@@ -0,0 +1,30 @@+# ALFWorld Search & Fallback Patterns++## Core Principle+When the primary search path fails, systematically explore the environment using known object-location associations.++## 1. Object Location Priors+Use these common associations to guide search when an object is not in its expected location.++| Object Type | Common Receptacles/Locations | Priority |+|------------------|------------------------------------------------------|----------|+| desklamp | desk, sidetable, shelf | High |+| pillow | bed, sofa, armchair | High |+| book | desk, shelf, sidetable, bed | Medium |+| cellphone | sidetable, desk, shelf | Medium |+| keychain | drawer, sidetable, desk | Low |+| CD | drawer, shelf, desk | Low |+| pen/pencil | desk, drawer, shelf | Medium |++## 2. Spatial Relation Resolution+For each spatial relation, define the required inspection action.++| Relation | Required Agent Actions (Sequence) | Notes |+|----------|------------------------------------------------------|-----------------------------------------------------------------------|+| under | 1. `go to` reference_object. 2. `look`/`examine` area beneath it. | The target may be physically under or logically associated (e.g., in a drawer below). |+| on | 1. `go to` reference_object. 2. Inspect its surface. | Check for clutter. The target might be obscured by other objects. |+| in | 1. `go to` reference_object. 2. `open` it (if closed). 3. Inspect contents. | Always check if the receptacle is closed first. |++## 3. Fallback Search Algorithm+If the target is not found at the primary location, execute this expanded search pattern.+diff --git a/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/SKILL.md b/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/SKILL.mdnew file mode 100644index 0000000..e385946--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/SKILL.md@@ -0,0 +1,29 @@+---+name: alfworld-heat-object-with-appliance+description: This skill uses a heating appliance (e.g., microwave, stove) to apply heat to a specified object. It should be triggered when the task requires warming or cooking an item, and the appliance is available and properly prepared (e.g., empty, closed). The input is the object name and appliance name, and the output is the object being heated, changing its state to fulfill task goals like 'heat some egg'.+---+# Skill: Heat Object with Appliance++## Purpose+Heat a specified object using a designated kitchen appliance to change its state (e.g., from cold to hot, raw to cooked) as required by a task.++## Core Workflow+Follow this sequence of actions. Use the bundled `validate_and_plan.py` script to check for common preconditions before starting.++1. **Navigate & Locate:** Go to the location of the target object.+2. **Acquire Object:** Take the object from its current receptacle.+3. **Navigate to Appliance:** Go to the specified heating appliance.+4. **Prepare Appliance:**+ * If the appliance is closed, open it.+ * If the appliance contains other items, you may need to remove them (context-dependent). The default action is to close it and proceed, as some environments abstract this step.+5. **Execute Heating:** Use the `heat {object} with {appliance}` action.+6. **Complete Task:** Navigate to the final target location (e.g., a dining table) and put the heated object there.++## Key Decision Points+* **Appliance State:** If the appliance is occupied, assess if the task implies clearing it. The trajectory shows proceeding without removal is sometimes valid.+* **Object Location:** The object may not be at the initial location. Be prepared to search other receptacles (e.g., fridge, countertop, cabinet) if not found.+* **Alternative Appliances:** If the primary appliance (e.g., microwave) is unavailable or broken, consider alternatives like a stoveburner.++## Bundled Resources+* `scripts/validate_and_plan.py`: A utility to check the initial environment state against the skill's prerequisites.+* `references/common_heating_appliances.md`: A list of typical appliances and their properties in the ALFWorld environment.diff --git a/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/references/common_heating_appliances.md b/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/references/common_heating_appliances.mdnew file mode 100644index 0000000..40ac148--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-heat-object-with-appliance/references/common_heating_appliances.md@@ -0,0 +1,29 @@+# Common Heating Appliances in ALFWorld++This reference lists typical appliances used for the `heat` action and their common states.++## Primary Appliances+* **microwave {N}**+ * **Default State:** Usually closed.+ * **Preparation:** Often requires opening. May contain other items that need removal.+ * **Action:** `heat {obj} with microwave {N}`+* **stoveburner {N}**+ * **Default State:** Typically off (not toggled).+ * **Preparation:** May need to be toggled on first (`toggle stoveburner {N}`). Requires a pot or pan for most foods.+ * **Action:** `heat {obj} with stoveburner {N}` (often requires the object to be in a container).++## Secondary/Alternative Appliances+* **toaster {N}:** For bread-like items.+* **oven {N}:** For baking (less common in simple tasks).++## Appliance States & Keywords+When observing the environment, look for these phrases:+* `is closed` / `is open`: For microwaves, ovens.+* `is off` / `is on`: For stoveburners.+* `In it, you see...`: Indicates contents of an open receptacle.+* `Nothing happened.`: The previous action was invalid. Re-evaluate the object, appliance, or preconditions.++## Skill Execution Notes+1. The `heat` action is often an abstraction. You may not need to explicitly place the object inside the appliance first.+2. If an appliance is occupied, the task may or may not require you to empty it. Use context from the goal description (e.g., "heat some egg" vs. "prepare a meal by heating an egg").+3. Always verify the object is in your inventory or at the target location after heating.diff --git a/experiments/src/skills/alfworld/alfworld-inventory-management/SKILL.md b/experiments/src/skills/alfworld/alfworld-inventory-management/SKILL.mdnew file mode 100644index 0000000..6b696e5--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-inventory-management/SKILL.md@@ -0,0 +1,32 @@+---+name: alfworld-inventory-management+description: This skill tracks which objects have been collected and which remain to be found for multi-object tasks. It should be triggered when working with tasks requiring multiple instances of the same object type. The skill maintains a count of collected vs. needed objects and guides the search for remaining items.+---+# Inventory Management Skill++## When to Use+Activate this skill when:+- Task requires collecting **multiple instances** of the same object type (e.g., "put two cellphone in bed")+- You need to track progress toward a quantity-based goal+- Searching through multiple locations systematically++## Core Workflow++### 1. Initialize Inventory+- Parse the task description to identify:+ - Target object type (e.g., "cellphone")+ - Required quantity (e.g., "two")+- Initialize counters: `collected = 0`, `needed = <quantity>`+- Create empty list for searched locations++### 2. Systematic Search Pattern+Follow this search priority:+1. **Visible surfaces** (desks, dressers, beds) - check first+2. **Closed containers** (drawers, cabinets) - open and inspect+3. **Return to known locations** if inventory incomplete++**Critical Rule:** After finding an object, immediately place it at the target location before searching for the next one.++### 3. Action Decision Logic+Use this decision tree:+diff --git a/experiments/src/skills/alfworld/alfworld-inventory-management/references/common_mistakes.md b/experiments/src/skills/alfworld/alfworld-inventory-management/references/common_mistakes.mdnew file mode 100644index 0000000..9abd17c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-inventory-management/references/common_mistakes.md@@ -0,0 +1,31 @@+# Common Mistakes in Multi-Object Collection Tasks++## Analysis from Trajectory Data++### 1. Redundant Searching+**Mistake:** Checking the same empty container multiple times consecutively+**Example from trajectory:** After finding cellphones on desk, agent rechecked all drawers+**Solution:** Maintain search history and skip recently-searched empty locations++### 2. Delayed Placement+**Mistake:** Continuing search after finding first object instead of placing it immediately+**Optimal pattern:** Find β Place β Continue search+**Rationale:** Reduces risk of losing track or dropping object++### 3. Inefficient Search Order+**Mistake:** Searching all containers before checking visible surfaces+**Observation:** Cellphones were on desk (visible), but agent searched 5 drawers first+**Optimal order:** Visible surfaces β Closed containers++### 4. State Management Errors+**Mistake:** Not closing containers after checking+**Impact:** Environment clutter, potential for navigation issues+**Best practice:** Always close containers unless actively retrieving object++### 5. Quantity Confusion+**Mistake:** Losing count of collected vs. needed items+**Solution:** Explicit tracking with counters updated on each placement++## Efficiency Patterns Identified++### High-Efficiency Pattern:diff --git a/experiments/src/skills/alfworld/alfworld-locate-target-object/SKILL.md b/experiments/src/skills/alfworld/alfworld-locate-target-object/SKILL.mdnew file mode 100644index 0000000..6007f8f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-locate-target-object/SKILL.md@@ -0,0 +1,40 @@+---+name: alfworld-locate-target-object+description: This skill navigates to a suspected location and identifies a target object. It should be triggered when the agent's goal requires finding a specific object (e.g., 'potato', 'plate') and its location is not immediately known. The skill involves moving to a relevant receptacle (like a fridge or cabinet) and checking its contents, outputting the object's location or confirming its absence.+---+# Skill: Locate Target Object++## Purpose+Use this skill when your goal requires a specific object and you need to find it. The skill directs you to a likely receptacle, inspects it, and confirms if the target is present.++## Core Workflow+1. **Identify Target & Suspected Location:** Determine the object you need and the most logical place to find it (e.g., food in the `fridge`, utensils in a `drawer`).+2. **Navigate:** Go to the suspected receptacle.+3. **Inspect:** If the receptacle is closed, open it.+4. **Locate:** Visually scan the contents for the target object.+5. **Report:** Output the object's location if found, or note its absence.++## Instructions+Follow this sequence of actions and reasoning.++**Thought:** I need to find a `<target_object>`. The most likely place for it is the `<suspected_receptacle>`.+**Action:** `go to <suspected_receptacle>`++**Observation:** *[You arrive at the receptacle. It may be open or closed.]*++**Thought:** I am at the `<suspected_receptacle>`. To see inside, I must open it.+**Action:** `open <suspected_receptacle>`++**Observation:** *[The receptacle opens, revealing its contents.]*++**Thought:** The `<suspected_receptacle>` is open. I will now look for the `<target_object>` among its contents.+* **If the object is visible:** I have located the `<target_object>` in the `<suspected_receptacle>`. My location task is complete.+* **If the object is not visible:** The `<target_object>` is not in the `<suspected_receptacle>`. I must consider the next most likely location.++## Key Principles+* **Contextual Guessing:** Use common sense to guess the initial search location (e.g., `fridge` for perishables, `cabinet` for dry goods).+* **Sequential Access:** You must `go to` a location before you can `open` it.+* **Visual Confirmation:** Only trust the `Observation` after opening a receptacle to confirm an object's presence or absence.++## Next Steps+After successfully locating the object, you will typically need to `take` it or interact with it, which is outside the scope of this skill. If the object is not found, trigger this skill again with a new suspected location.diff --git a/experiments/src/skills/alfworld/alfworld-locate-target-object/references/action_primer.md b/experiments/src/skills/alfworld/alfworld-locate-target-object/references/action_primer.mdnew file mode 100644index 0000000..81c0611--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-locate-target-object/references/action_primer.md@@ -0,0 +1,18 @@+# Action Primer for ALFWorld++This reference details the core actions used in the `alfworld-locate-target-object` skill.++## Primary Skill Actions+| Action Format | Purpose | Example in Skill Context |+| :--- | :--- | :--- |+| `go to {recep}` | Move the agent to a specific receptacle or appliance. | `go to fridge 1` |+| `open {recep}` | Open a closed receptacle to see or access its contents. | `open fridge 1` |++## Critical Observation Patterns+* `The {recep} is closed.` -> You must `open` it.+* `You open the {recep}. The {recep} is open. In it, you see...` -> The contents are now listed. Scan for your target object.+* `Nothing happened.` -> The previous action was invalid (e.g., trying to open an already open receptacle). Re-assess the state.++## Object & Receptacle Notation+* Objects and receptacles have unique identifiers (`potato 1`, `fridge 1`, `cabinet 3`).+* Always use the full identifier as provided in observations.diff --git a/experiments/src/skills/alfworld/alfworld-location-navigator/SKILL.md b/experiments/src/skills/alfworld/alfworld-location-navigator/SKILL.mdnew file mode 100644index 0000000..2fb5424--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-location-navigator/SKILL.md@@ -0,0 +1,19 @@+---+name: alfworld-location-navigator+description: Moves 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.+---+# Instructions+Use this skill to navigate to a specific location in the Alfworld environment. The skill will move the agent directly to the target receptacle or object.++## Input+Provide the target location name as a string (e.g., "toiletpaperhanger 1", "toilet 1").++## Process+1. The skill validates the target location against the current environment observation.+2. It executes the `go to {target}` action.+3. It returns the environment's observation after the move.++## Notes+- Ensure the target location is visible in the agent's current observation before calling this skill.+- This skill is for navigation only. Use other skills for object interaction (take, put, etc.).+- If the action fails (e.g., "Nothing happened"), the agent may need to replan its path or verify the target name.diff --git a/experiments/src/skills/alfworld/alfworld-location-navigator/references/action_primer.md b/experiments/src/skills/alfworld/alfworld-location-navigator/references/action_primer.mdnew file mode 100644index 0000000..b5f2b22--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-location-navigator/references/action_primer.md@@ -0,0 +1,22 @@+# Alfworld Action Primer++## Core Navigation Action+The primary action used by this skill is:+- **`go to {recep}`**: Moves the agent to the specified receptacle or object location.++## Action Format Rules+1. The action must be output exactly as: `go to <target_name>`+2. `<target_name>` must match the environment's object naming exactly (e.g., "toiletpaperhanger 1", not "toilet paper hanger").+3. The agent must be able to see the target in its current observation for the action to succeed.++## Common Navigation Patterns from Trajectory+1. **Initial Approach**: `go to toiletpaperhanger 1` - Move to inspect a target.+2. **Object Retrieval Path**: `go to toilet 1` - Move to a location containing a needed object.+3. **Return for Placement**: `go to toiletpaperhanger 1` - Return to original target after obtaining object.++## Error Handling+- If the environment responds with "Nothing happened", the `go to` action likely failed because:+ - The target name was incorrect or misspelled.+ - The target is not currently visible/accessible from the agent's location.+ - The target is not a valid receptacle/object for navigation.+- Recommended response: Re-examine the observation for correct target names and accessible paths.diff --git a/experiments/src/skills/alfworld/alfworld-location-navigator/references/trajectory_analysis.md b/experiments/src/skills/alfworld/alfworld-location-navigator/references/trajectory_analysis.mdnew file mode 100644index 0000000..4524a9e--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-location-navigator/references/trajectory_analysis.md@@ -0,0 +1,22 @@+# Skill Derivation from Trajectory++## Source Trajectory Summary+**Task**: Put a toiletpaper in toiletpaperhanger.+**Successful Navigation Sequence**:+1. `go to toiletpaperhanger 1` - Initial approach to check state+2. `go to toilet 1` - Navigate to object source+3. `go to toiletpaperhanger 1` - Return for final placement++## Extracted Navigation Logic+1. **Target Identification**: Agent first identifies the target location from the task description.+2. **State Checking**: Agent navigates to target to inspect current state (empty/full).+3. **Path Planning**: Based on inspection, agent determines needed object and navigates to its location.+4. **Return Navigation**: After obtaining object, agent returns to original target.++## Skill Abstraction+The trajectory shows a repeated pattern of `go to` actions for:+- Initial target inspection+- Moving to object sources+- Returning to placement locations++This pattern is abstracted into the `alfworld-location-navigator` skill that encapsulates the fundamental "move to location" capability used in all three trajectory steps.diff --git a/experiments/src/skills/alfworld/alfworld-navigation-planner/SKILL.md b/experiments/src/skills/alfworld/alfworld-navigation-planner/SKILL.mdnew file mode 100644index 0000000..e087570--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-navigation-planner/SKILL.md@@ -0,0 +1,27 @@+---+name: alfworld-navigation-planner+description: Plans 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.+---+# Instructions++Use this skill to navigate between receptacles (e.g., bed, desk, drawer) in a household environment to locate objects. The core logic is handled by the bundled script.++## Input/Output Format+- **Input:** Provide the agent's **current location** and the **target receptacle**.+- **Output:** The skill will return the next `go to {recep}` action to execute.++## How to Use+1. **Identify your goal.** Determine which receptacle you need to search (e.g., `desk 1` to find a `desklamp`).+2. **Call the skill.** Pass your current location and the target receptacle.+3. **Execute the action.** Perform the `go to` action returned by the skill.+4. **Observe and repeat.** After moving, observe the new location. If the target object is not found, use this skill again to plan movement to the next most promising receptacle.++## Key Principles+- **Systematic Search:** Move efficiently between likely receptacles instead of random exploration.+- **Adaptive Planning:** If an action fails ("Nothing happened"), the script's logic helps choose an alternative path.+- **Context Preservation:** Always note your current location after each move for the next planning step.++**Example Thought Process:**+> Thought: I need to find a desklamp. The `desk 1` is a likely location. I am currently at `bed 1`.+> Action: Use `alfworld-navigation-planner` with current location `bed 1` and target `desk 1`.+> Result: `go to desk 1`diff --git a/experiments/src/skills/alfworld/alfworld-navigation-planner/references/action_primer.md b/experiments/src/skills/alfworld/alfworld-navigation-planner/references/action_primer.mdnew file mode 100644index 0000000..c30894f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-navigation-planner/references/action_primer.md@@ -0,0 +1,33 @@+# ALFWorld Action Primer++## Core Action Set+The agent can perform the following atomic actions. The `{obj}` and `{recep}` placeholders must be replaced with specific object and receptacle names observed in the environment.++1. `go to {recep}` - Move to a specified receptacle (e.g., `go to desk 1`).+2. `take {obj} from {recep}` - Pick up an object from a receptacle.+3. `put {obj} in/on {recep}` - Place an object into or onto a receptacle.+4. `open {recep}` - Open a closed receptacle (e.g., a drawer).+5. `close {recep}` - Close an open receptacle.+6. `toggle {obj} {recep}` - Toggle the state of an object (e.g., turn on a lamp).+7. `clean {obj} with {recep}` - Clean an object using a receptacle/tool.+8. `heat {obj} with {recep}` - Heat an object using a receptacle/tool.+9. `cool {obj} with {recep}` - Cool an object using a receptacle/tool.++## Navigation-Specific Guidance+- The `go to` action is the primary movement command.+- Receptacles are fixed locations (`desk 1`, `shelf 1`) or containers (`drawer 2`).+- Before interacting with an object on a receptacle, you must first `go to` that receptacle.+- If an action fails with "Nothing happened", the target may be invalid, inaccessible, or require a prerequisite action (e.g., `open` before `take` from a closed drawer).++## Common Receptacle Types & Associations+| Receptacle | Typical Contents |+|---------------|-----------------------------------------------|+| `desk 1` | desklamp, book, laptop, pen |+| `bed 1` | pillow, book, cellphone |+| `sidetable 1` | alarm clock, CD, keychain |+| `shelf 1` | pen, book |+| `drawer 1/2` | CD, credit card, small items |+| `garbagecan 1`| (often empty) |++## Response Format+The agent must always output its reasoning and action in the following strict format:diff --git a/experiments/src/skills/alfworld/alfworld-object-cooler/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-cooler/SKILL.mdnew file mode 100644index 0000000..306da10--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-cooler/SKILL.md@@ -0,0 +1,29 @@+---+name: alfworld-object-cooler+description: This skill cools a held object using an appropriate cooling appliance, such as a fridge. It should be triggered when the task requires reducing the temperature of an object (e.g., a hot pot). The skill assumes the agent is holding the object and is near the cooling receptacle; it performs the 'cool' action to achieve the desired state change, preparing the object for subsequent steps like placement or serving.+---+# Skill: Cool Held Object++## Purpose+Use this skill when you are holding an object (e.g., `pot 1`) that needs to be cooled and you are at the location of a valid cooling receptacle (e.g., `fridge 1`). The skill executes the `cool` action to change the object's state.++## Prerequisites+1. **Object in Hand:** You must already be holding the target object (e.g., `pot 1`).+2. **At Cooling Receptacle:** You must be at the location of the cooling appliance (e.g., `fridge 1`). Use `go to {recep}` to navigate first if needed.+3. **Valid Receptacle:** The receptacle must be a valid target for the `cool` action (e.g., fridge, freezer). The environment will validate this.++## Core Action+Execute the `cool` action with the format: `cool {obj} with {recep}`.++## Execution Flow+1. **Verify State:** Confirm you are holding the object and are at the cooling receptacle's location.+2. **Execute:** Perform the `cool` action.+3. **Verify Outcome:** The expected observation is "You cool the {obj} using the {recep}." If the observation is "Nothing happened," the action was invalidβcheck the prerequisites or try a different receptacle.++## Example from Trajectory+* **State:** Holding `pot 1`, at `fridge 1`.+* **Action:** `cool pot 1 with fridge 1`+* **Result:** Observation: "You cool the pot 1 using the fridge 1."++## Next Steps+After successful cooling, the object is ready for the next task step (e.g., `put {obj} in/on {recep}`).diff --git a/experiments/src/skills/alfworld/alfworld-object-cooler/references/action_semantics.md b/experiments/src/skills/alfworld/alfworld-object-cooler/references/action_semantics.mdnew file mode 100644index 0000000..8c1f910--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-cooler/references/action_semantics.md@@ -0,0 +1,25 @@+# Action Semantics for 'cool'++## Definition+The `cool {obj} with {recep}` action reduces the temperature of a held object (`{obj}`) by interacting with a cooling appliance (`{recep}`).++## Semantics from Trajectory+* **Agent State:** The agent must be holding `{obj}`.+* **Location:** The agent must be at the location of `{recep}`. The trajectory shows the agent at `fridge 1` before executing `cool pot 1 with fridge 1`.+* **Receptacle State:** The receptacle (e.g., `fridge 1`) does not necessarily need to be open. The trajectory executed the action successfully while the fridge was closed.+* **Object State:** The object is assumed to be in a state where cooling is a valid operation (e.g., a hot pot).++## Expected Outcomes+1. **Success:** "You cool the {obj} using the {recep}." This indicates the object's state has changed.+2. **Failure (Invalid Action):** "Nothing happened." This indicates a prerequisite was not met (wrong object, wrong location, invalid receptacle).++## Common Valid Receptacles+* `fridge 1`+* `freezer 1`+* (Other environment-specific cooling appliances)++## Related Actions+* `heat {obj} with {recep}`: The inverse operation.+* `take {obj} from {recep}`: To acquire the object.+* `go to {recep}`: To navigate to the cooling appliance.+* `put {obj} in/on {recep}`: Likely the next step after cooling.diff --git a/experiments/src/skills/alfworld/alfworld-object-disposer/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-disposer/SKILL.mdnew file mode 100644index 0000000..68fbb7c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-disposer/SKILL.md@@ -0,0 +1,20 @@+---+name: alfworld-object-disposer+description: This skill disposes of an object by placing it into a disposal receptacle like a garbage can. It should be triggered when the task requires discarding an object (e.g., 'put it in garbagecan') and the agent is at the disposal location with the object in hand. The skill executes the 'put' action to place the object in/on the target receptacle, completing the disposal subtask.+---+# Skill: Object Disposer++## Trigger Condition+Activate this skill when:+1. The task goal explicitly requires disposing of an object (e.g., "put it in garbagecan", "throw away the X").+2. The agent is holding the target object.+3. The agent is at the location of the disposal receptacle (e.g., garbagecan).++## Execution+1. **Verify Prerequisites**: Confirm the object is in hand and the disposal receptacle is present at your location.+2. **Execute Disposal**: Perform the `put` action with the object and receptacle.+3. **Completion**: The skill is complete when the object has been successfully placed into/onto the disposal receptacle.++## Notes+- This skill handles only the final disposal action. Object acquisition and navigation to the disposal location are separate skills.+- If the disposal fails (e.g., "Nothing happened"), re-evaluate the object and receptacle identifiers or check if the receptacle can accept the object.diff --git a/experiments/src/skills/alfworld/alfworld-object-disposer/references/alfworld_actions.md b/experiments/src/skills/alfworld/alfworld-object-disposer/references/alfworld_actions.mdnew file mode 100644index 0000000..aa0e412--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-disposer/references/alfworld_actions.md@@ -0,0 +1,23 @@+# AlfWorld Action Reference for Disposal++## Relevant Action Template+`put {obj} in/on {recep}`++## Description+Places an object into or onto a receptacle. For disposal tasks, the receptacle is typically a `garbagecan`.++## Preconditions+1. The agent must be holding the object (`{obj}`).+2. The agent must be at the location of the receptacle (`{recep}`).+3. The receptacle must be accessible (e.g., not inside a closed container).++## Common Disposal Receptacles+- `garbagecan`+- `sinkbasin` (for liquid disposal)+- `toilet` (if available in the environment)++## Error Handling+If the action fails and returns "Nothing happened":+1. Verify the object identifier is correct and matches an object in inventory.+2. Verify the receptacle identifier is correct and present.+3. Ensure the receptacle can accept the object (some receptacles may have capacity limits).diff --git a/experiments/src/skills/alfworld/alfworld-object-disposer/references/trajectory_pattern.md b/experiments/src/skills/alfworld/alfworld-object-disposer/references/trajectory_pattern.mdnew file mode 100644index 0000000..bb97aa7--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-disposer/references/trajectory_pattern.md@@ -0,0 +1,18 @@+# Trajectory Pattern Analysis++## Skill Context in Provided Trajectory+The disposal action occurs as the final step in a larger task sequence:++1. **Task Goal**: "cool some potato and put it in garbagecan"+2. **Skill Trigger**: The subtask "put it in garbagecan" matches this skill's purpose.+3. **Prerequisite Steps** (handled by other skills):+ - Locate and acquire object: `go to diningtable 1`, `take potato 3 from diningtable 1`+ - Process object if needed: `cool potato 3 with fridge 1`+ - Navigate to disposal location: `go to garbagecan 1`+4. **Skill Execution**: `put potato 3 in/on garbagecan 1`++## Key Observations+- The disposal action is simple and atomic once prerequisites are met.+- No additional manipulation of the receptacle (opening/closing) is needed for garbagecan.+- The skill completes immediately after successful execution.+- The trajectory shows successful disposal with no intermediate steps between arrival at garbagecan and the put action.diff --git a/experiments/src/skills/alfworld/alfworld-object-heater/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-heater/SKILL.mdnew file mode 100644index 0000000..f2b310f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-heater/SKILL.md@@ -0,0 +1,31 @@+---+name: alfworld-object-heater+description: This skill heats a specified object using an available heating appliance (e.g., microwave, stove). Activate this skill when the agent has an object that requires heating and the appliance is prepared. It requires the object and appliance as inputs and results in the object being heated.+---+# Skill: Heat Object++## Purpose+Use this skill to heat a specified object (e.g., potato, soup) using a compatible heating appliance (e.g., microwave, stove) in the ALFWorld environment. The skill handles the sequence of navigation, preparation, and operation of the appliance.++## Prerequisites+1. **Object in Inventory:** The target object must be in the agent's possession (e.g., recently taken from a receptacle).+2. **Appliance Available:** A compatible heating appliance (microwave, stoveburner) must be present and accessible in the environment.+3. **Appliance State:** The appliance must be in a state ready for heating (e.g., microwave door open, stove burner available).++## Core Workflow+Follow this high-level sequence. For detailed, error-prone steps (like checking appliance state), use the bundled script.++1. **Navigate** to the target heating appliance.+2. **Prepare** the appliance (e.g., open the microwave door).+3. **Execute** the heating action on the object using the appliance.+4. **(Optional) Navigate** to a target location (e.g., dining table) to place the heated object.++## Key Decision Points+* **Appliance Selection:** Choose the most appropriate appliance based on the object and context (e.g., use a microwave for quick heating, a stove for cooking).+* **Error Recovery:** If an action fails ("Nothing happened"), re-evaluate the appliance's state (is it open? is it free?) or your inventory (do you have the object?).+* **Post-Heating Action:** Decide if the heated object should be placed elsewhere (e.g., on a dining table) as part of the task.++## Important Notes+* The `heat` action requires the object to be in your inventory and the appliance to be ready.+* Always verify the observation after each action to confirm success before proceeding.+* Refer to the bundled reference for a detailed breakdown of the example trajectory and common pitfalls.diff --git a/experiments/src/skills/alfworld/alfworld-object-heater/references/trajectory_breakdown.md b/experiments/src/skills/alfworld/alfworld-object-heater/references/trajectory_breakdown.mdnew file mode 100644index 0000000..9bee4a4--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-heater/references/trajectory_breakdown.md@@ -0,0 +1,29 @@+# Trajectory Breakdown & Common Pitfalls++## Example Trajectory Analysis+The provided successful trajectory for heating a potato and placing it on a dining table follows this pattern:++1. **Locate & Acquire Object:** `go to garbagecan 1` -> `take potato 3 from garbagecan 1`+2. **Navigate to Appliance:** `go to microwave 1`+3. **Prepare Appliance:** `open microwave 1` (Observation: "The microwave 1 is open.")+4. **Execute Heating:** `heat potato 3 with microwave 1` (Observation: "You heat the potato 3 using the microwave 1.")+5. **Deliver Object (Task Specific):** `go to diningtable 1` -> `put potato 3 in/on diningtable 1`++## Critical Observations & Lessons++1. **State Verification is Key:** After `open microwave 1`, the observation confirmed "The microwave 1 is open. In it, you see nothing." This confirms the appliance is ready for the `heat` action.+2. **Error Pattern - Premature Closing:** The trajectory shows an erroneous step: after opening the microwave, the agent issued `close microwave 1` without placing the object, which would have made the next `heat` action fail. The correct sequence is **open -> heat**.+3. **Inventory Requirement:** The `heat` action (`heat potato 3 with microwave 1`) only succeeded because the potato was in the agent's inventory (`You pick up the potato 3 from the garbagecan 1.`). You cannot heat an object that is still in a receptacle.+4. **"Nothing Happened" Response:** This is the environment's signal for an invalid action. If you receive this after a `heat` command, check:+ * Is the appliance open/on?+ * Is the target object in your inventory?+ * Is the appliance compatible with the object?++## Action Template+The core heating action follows this strict template:+`heat {object_id} with {appliance_id}`++## Compatible Appliances+* `microwave {n}`+* `stoveburner {n}`+* (Potentially other heating receptacles like `oven` in other scenarios)diff --git a/experiments/src/skills/alfworld/alfworld-object-locator/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-locator/SKILL.mdnew file mode 100644index 0000000..1f3f6c6--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-locator/SKILL.md@@ -0,0 +1,22 @@+---+name: alfworld-object-locator+description: This skill scans the current environment observation to identify the presence and location of a target object needed for a task. It should be triggered when the agent's goal requires an object that is not currently in the agent's inventory, and the observation does not explicitly state where the object is. The skill analyzes the textual observation to find receptacles that likely contain the target, based on common sense or domain knowledge (e.g., a 'dishsponge' might be on a 'cart'), and outputs the identified target receptacle location for navigation.+---+# Skill: Object Locator for ALFWorld++## When to Use+Trigger this skill when:+1. Your goal requires a specific object+2. The object is not in your inventory+3. The current observation does not explicitly state the object's location++## Core Logic+1. **Parse Observation**: Extract all mentioned receptacles from the environment description+2. **Analyze Likelihood**: Use common-sense reasoning to rank receptacles where the target object is most likely to be found+3. **Output Action**: Generate a navigation action to the most promising receptacle++## Quick Reference+- For detailed object-receptacle mappings, see `references/object_mappings.md`+- For the core location algorithm, see `scripts/locate_object.py`++## Basic Usage Patterndiff --git a/experiments/src/skills/alfworld/alfworld-object-locator/references/object_mappings.md b/experiments/src/skills/alfworld/alfworld-object-locator/references/object_mappings.mdnew file mode 100644index 0000000..ef571c3--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-locator/references/object_mappings.md@@ -0,0 +1,40 @@+# Object-Receptacle Common-Sense Mappings++## Kitchen & Dining Objects+| Object | Most Likely Receptacles | Reasoning |+|--------|------------------------|-----------|+| dishsponge | cart, sinkbasin, countertop | Cleaning items often stored near sinks or on cleaning carts |+| soapbottle | sinkbasin, countertop, shelf | Hygiene products near water sources |+| plate | countertop, shelf, cart | Food service items on surfaces |+| cup | countertop, shelf, cart | Drinkware on accessible surfaces |+| bowl | countertop, shelf, cart | Food containers on surfaces |+| spoon | drawer, countertop, sinkbasin | Utensils in drawers or near washing areas |+| fork | drawer, countertop, sinkbasin | Utensils in drawers or near washing areas |+| knife | drawer, countertop, sinkbasin | Utensils in drawers (safety) |++## Bathroom Objects+| Object | Most Likely Receptacles | Reasoning |+|--------|------------------------|-----------|+| toiletpaper | toiletpaperhanger, shelf, countertop | Paper products near toilet or in storage |+| handtowel | handtowelholder, towelholder, shelf | Towels on designated holders |+| soapbottle | bathtubbasin, sinkbasin, countertop | Cleaning products near water sources |++## Cleaning Supplies+| Object | Most Likely Receptacles | Reasoning |+|--------|------------------------|-----------|+| dishsponge | cart, sinkbasin, shelf | On cleaning carts or near sinks |+| towel | towelholder, shelf, cart | On holders or in storage |+| spraybottle | shelf, countertop, cart | Cleaning solutions on surfaces |++## General Storage Patterns+1. **Drawers**: Small items, utensils, personal items+2. **Shelves**: General storage, containers, supplies+3. **Countertops**: Frequently used items, in-progress tasks+4. **Carts**: Mobile storage, cleaning supplies, transport items+5. **Holders**: Designated for specific items (towels, paper)++## ALFWorld Specific Notes+- Objects often have numbers (e.g., "cart 1", "drawer 2")+- Receptacle names are concatenated (e.g., "bathtubbasin", "sinkbasin")+- Observations list receptacles before objects on them+- "On the [receptacle], you see..." indicates visible objectsdiff --git a/experiments/src/skills/alfworld/alfworld-object-locator/references/skill_usage_examples.md b/experiments/src/skills/alfworld/alfworld-object-locator/references/skill_usage_examples.mdnew file mode 100644index 0000000..0d4e3c5--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-locator/references/skill_usage_examples.md@@ -0,0 +1,39 @@+# Skill Usage Examples++## Example 1: Basic Location (from trajectory)+**Observation**: "You are in the middle of a room. Looking quickly around you, you see a bathtubbasin 1, a cart 1, a countertop 1, a drawer 4, a drawer 3, a drawer 2, a drawer 1, a garbagecan 1, a handtowelholder 1, a shelf 1, a sinkbasin 1, a toilet 1, a toiletpaperhanger 1, and a towelholder 1."++**Goal**: "put some dishsponge on toilet"++**Agent Thought**: "I need to find the dishsponge. Let me scan the environment for likely locations."++**Skill Output**: "go to cart 1"++**Reasoning**: Dishsponge is mapped to 'cart' in common-sense knowledge, and cart is present in the observation.++## Example 2: Multiple Possible Locations+**Observation**: "You see a countertop 1, a sinkbasin 1, a shelf 2, a shelf 1, and a drawer 1."++**Goal**: "get a spoon"++**Skill Output**: "go to drawer 1"++**Reasoning**: Spoon is strongly associated with drawers in the mappings.++## Example 3: No Clear Match+**Observation**: "You see a toilet 1, a bathtubbasin 1, and a towelholder 1."++**Goal**: "find a plate"++**Skill Output**: None (or "Observation: Target object not found in visible receptacles")++**Reasoning**: Plate typically appears in kitchen areas (countertop, shelf, cart), none of which are present.++## Example 4: Visible Object+**Observation**: "On the countertop 1, you see a plate 1, a cup 1, and a spoon 1."++**Goal**: "take the spoon"++**Skill Not Needed**: The object is already visible in the observation, so no location scanning is required.++## Integration Patterndiff --git a/experiments/src/skills/alfworld/alfworld-object-picker/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-picker/SKILL.mdnew file mode 100644index 0000000..93b6448--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-picker/SKILL.md@@ -0,0 +1,19 @@+---+name: alfworld-object-picker+description: Picks up a specified object from a given receptacle. Use this skill when the agent has located a required object and needs to acquire it for later use, such as taking an item from a surface or container. The skill requires the object and source receptacle as inputs, executing a 'take' action to transfer the object into the agent's inventory, enabling further manipulation like placement or usage.+---+# Instructions+Execute the `take` action to acquire the target object from the source receptacle.++## Inputs+- `object`: The identifier of the object to pick up (e.g., "toiletpaper 1").+- `source_receptacle`: The identifier of the receptacle where the object is located (e.g., "toilet 1").++## Process+1. **Verify Context:** Ensure the agent is at the location of the `source_receptacle`. If not, the agent must navigate there first using a separate movement skill.+2. **Execute Action:** Perform the action: `take {object} from {source_receptacle}`.+3. **Handle Feedback:** If the environment indicates "Nothing happened," consult the troubleshooting guide in `references/troubleshooting.md` for potential issues.++## Output+- The specified object is transferred to the agent's inventory.+- The agent receives an observation confirming the successful pickup (e.g., "You pick up the {object} from the {source_receptacle}").diff --git a/experiments/src/skills/alfworld/alfworld-object-picker/references/troubleshooting.md b/experiments/src/skills/alfworld/alfworld-object-picker/references/troubleshooting.mdnew file mode 100644index 0000000..e6d558d--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-picker/references/troubleshooting.md@@ -0,0 +1,9 @@+# Troubleshooting: Failed Pickup Actions++If the `take` action results in "Nothing happened," consider the following common issues:++1. **Agent Position:** The agent must be at the same location as the source receptacle. Verify your location using the last observation.+2. **Object Visibility:** The object must be visible on the receptacle. Check the last observation for a list of items on the `source_receptacle`.+3. **Object Name:** Ensure the `object` identifier matches exactly the name shown in the observation (e.g., "toiletpaper 1" not "toiletpaper").+4. **Receptacle State:** Some receptacles (like cabinets) may need to be opened before their contents can be accessed.+5. **Inventory Limit:** The agent may have a limited carrying capacity. Ensure you are not already holding the maximum number of items.diff --git a/experiments/src/skills/alfworld/alfworld-object-placer/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-placer/SKILL.mdnew file mode 100644index 0000000..7ccebec--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-placer/SKILL.md@@ -0,0 +1,19 @@+---+name: alfworld-object-placer+description: Places a held object onto or into a target receptacle. Trigger this skill when the agent is carrying an object and needs to deposit it at a specific location to complete a task, such as installing an item on a holder or storing it in a container. It takes the object and destination receptacle as inputs, performing a 'put' action to finalize the object's positioning according to the task goal.+---+# Instructions+1. **Verify Prerequisites**:+ - Confirm you are currently holding the target object (`{obj}`).+ - Confirm the target receptacle (`{recep}`) is present and accessible in the environment.+ - If the receptacle is a container (e.g., cabinet, drawer), ensure it is open.++2. **Navigate to Receptacle**:+ - Use the `go to {recep}` action to move to the target receptacle's location.++3. **Execute Placement**:+ - Use the `put {obj} in/on {recep}` action to deposit the held object.+ - The phrasing (`in` vs `on`) is determined by the receptacle type (e.g., `in` for containers, `on` for surfaces/holders). Use the trajectory as a reference.++4. **Handle Errors**:+ - If the environment responds with "Nothing happened", the action was invalid. Consult the `references/action_guide.md` for troubleshooting common failure modes.diff --git a/experiments/src/skills/alfworld/alfworld-object-placer/references/action_guide.md b/experiments/src/skills/alfworld/alfworld-object-placer/references/action_guide.mdnew file mode 100644index 0000000..aa6ddf3--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-placer/references/action_guide.md@@ -0,0 +1,39 @@+# AlfWorld Action Guide for Object Placement++## Core Action+`put {obj} in/on {recep}`++## Preposition Rules+Use the following guide to choose `in` or `on`:++### Use `in` for:+- Enclosed containers: `cabinet`, `fridge`, `microwave`, `drawer`, `garbagecan`, `box`, `shelf` (if it has walls).+- Receptacles that hold items internally.++### Use `on` for:+- Surfaces: `countertop`, `desk`, `table`, `shelf` (open).+- Holders: `toiletpaperhanger`, `towelholder`, `handtowelholder`, `plateholder`.+- Appliances: `stoveburner`, `toaster`.++## Common Failure Modes & Solutions+1. **"Nothing happened" on `put` action:**+ - **Cause 1:** The agent is not holding the specified `{obj}`.+ - *Solution:* Use `take {obj} from {source_recep}` first.+ - **Cause 2:** The `{recep}` is closed or inaccessible.+ - *Solution:* Use `open {recep}` before placing the object inside.+ - **Cause 3:** The preposition (`in`/`on`) is incorrect for the receptacle type.+ - *Solution:* Consult the table above and try the alternative preposition.+ - **Cause 4:** The receptacle is already occupied/full.+ - *Solution:* Clear the receptacle first (e.g., remove existing objects).++2. **Object not found for pickup:**+ - Search common locations: countertops, tables, shelves, cabinets, and other receptacles relevant to the object's type (e.g., toilet paper is often near a toilet).++## Example from Trajectory+**Goal:** Put a toiletpaper in toiletpaperhanger.+**Successful Sequence:**+1. `go to toiletpaperhanger 1` (Verify it's empty)+2. `go to toilet 1` (Locate object)+3. `take toiletpaper 1 from toilet 1` (Acquire object)+4. `go to toiletpaperhanger 1` (Navigate to target)+5. `put toiletpaper 1 on toiletpaperhanger 1` (Execute placement - uses 'on' for a holder)diff --git a/experiments/src/skills/alfworld/alfworld-object-retriever/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-retriever/SKILL.mdnew file mode 100644index 0000000..e2ca941--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-retriever/SKILL.md@@ -0,0 +1,14 @@+---+name: alfworld-object-retriever+description: This skill picks up a target object from a specified receptacle after the object has been visually confirmed. Use this skill when the agent has located an object in a receptacle and needs to acquire it. It requires the object and source receptacle as inputs and results in the object being added to the agent's inventory.+---+# Instructions++Use this skill to acquire a target object from a known source receptacle in the ALFWorld environment.++## Prerequisites+1. **Visual Confirmation**: You must have directly observed the target object within the specified source receptacle in a prior observation (e.g., "On the {recep}, you see a {obj}...").+2. **Proximity**: You should be at or near the location of the source receptacle.++## Core Action Sequence+Execute the following action precisely:diff --git a/experiments/src/skills/alfworld/alfworld-object-retriever/references/trajectory_example.md b/experiments/src/skills/alfworld/alfworld-object-retriever/references/trajectory_example.mdnew file mode 100644index 0000000..01a0ad0--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-retriever/references/trajectory_example.md@@ -0,0 +1,19 @@+# Full Task Trajectory Example++This reference document contains the complete execution trajectory from which the `alfworld-object-retriever` skill was derived. It demonstrates the skill's use in context.++## Original Task+**Goal**: "heat some potato and put it in diningtable."++## Relevant Skill Execution Segment+1. **Observation**: "On the garbagecan 1, you see a egg 2, a potato 3, and a soapbottle 1."+ *This provides the visual confirmation required for the skill.*+2. **Thought**: "I've found a potato in the garbage can. I should take it so I can heat it up."+ *The agent recognizes the prerequisite is met and plans to use the skill.*+3. **Action**: `take potato 3 from garbagecan 1`+ *This is the exact skill execution.*+4. **Observation**: "You pick up the potato 3 from the garbagecan 1."+ *This confirms successful skill execution. The object (`potato 3`) is now in the agent's inventory.*++## Key Insight+The skill is a discrete, atomic operation within a larger task chain. Its sole purpose is to transfer a visually confirmed object from a known receptacle into the agent's inventory. It does not handle object search, navigation, or subsequent actions like heating or placing.diff --git a/experiments/src/skills/alfworld/alfworld-object-state-inspector/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-state-inspector/SKILL.mdnew file mode 100644index 0000000..0efd3dc--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-state-inspector/SKILL.md@@ -0,0 +1,30 @@+---+name: alfworld-object-state-inspector+description: Checks the current state or contents of a specified object or receptacle. Trigger this skill when the agent needs to determine if an object is present, missing, or in a certain condition before proceeding with a task, such as verifying if a holder is empty or if an item is available. It typically follows navigation and involves observing the environment's feedback, providing crucial information for decision-making in the task flow.+---+# Instructions++Use this skill to inspect the state of a target object or receptacle in an AlfWorld household environment. The primary goal is to obtain the observation feedback from the environment about what is currently on or in the target.++## When to Trigger+Trigger this skill immediately after navigating to a target receptacle (e.g., `go to toiletpaperhanger 1`) when you need to know:+* If the target is empty.+* What specific objects are present on/in the target.+* The condition or state of the target (implied by the environment's observation).++## Core Procedure+1. **Navigate to Target:** First, ensure the agent has executed a `go to {target_receptacle}` action. This skill assumes the agent is already at the target's location.+2. **Observe Environment Feedback:** The skill is complete once the environment provides an observation in response to the navigation. **Do not perform an additional inspection action.** The observation from the `go to` action contains the state information.+3. **Parse Observation:** Interpret the observation message (e.g., "On the toiletpaperhanger 1, you see nothing." or "On the toilet 1, you see a soapbottle 1, and a toiletpaper 1.").+4. **Output Decision Data:** Based on the observation, determine the next step in the broader task (e.g., "Target is empty, proceed to find item" or "Target contains required item, proceed to pick it up").++## Input/Output Format+* **Input Context:** The agent must be at the target location. The last action should be `go to {target_receptacle}`.+* **Output:** The observation string from the environment and a brief interpretation.+ * **Example Output:** `Observation: On the toiletpaperhanger 1, you see nothing. | Interpretation: The holder is empty. A toiletpaper roll must be found elsewhere.`++## Error Handling+* If the observation is "Nothing happened," the previous `go to` action was likely invalid. Re-evaluate the target's name or location.+* This skill does not involve actions like `open`, `close`, or `toggle`. It relies solely on the observational feedback from navigation.++**Key Principle:** This skill encapsulates the **waiting and parsing** of the environment's state disclosure after navigation. It provides the critical information needed to decide the subsequent `take`, `put`, or further `go to` action.diff --git a/experiments/src/skills/alfworld/alfworld-object-state-inspector/references/alfworld_actions_ref.md b/experiments/src/skills/alfworld/alfworld-object-state-inspector/references/alfworld_actions_ref.mdnew file mode 100644index 0000000..28f6c7f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-state-inspector/references/alfworld_actions_ref.md@@ -0,0 +1,28 @@+# AlfWorld Action Reference for State Inspection++## Relevant Actions for This Skill+This skill is used in conjunction with the `go to` action. The inspection is performed by the environment's feedback *after* a successful navigation.++**Primary Pre-condition Action:**+* `go to {recep}` - Moves the agent to a specific receptacle. The subsequent observation reveals the receptacle's state.++## Observation Patterns+The environment responds to `go to {recep}` with one of the following patterns:++1. **Empty Receptacle:**+ * `On the {recep}, you see nothing.`+ * *Interpretation:* The target is empty. The required object is not here.++2. **Populated Receptacle:**+ * `On the {recep}, you see a {obj1} {id1}{, and a {objN} {idN}}*.`+ * *Examples:*+ * `On the toilet 1, you see a soapbottle 1, and a toiletpaper 1.`+ * `On the countertop 1, you see a mug 1.`+ * *Interpretation:* The target contains the listed object(s). The IDs (e.g., `1`) are important for subsequent `take` or `put` actions.++3. **Invalid Action:**+ * `Nothing happened.`+ * *Interpretation:* The previous `go to` action failed. The receptacle name may be incorrect, or the agent cannot path to it.++## Skill Integration in Task Flow+A typical task sequence involving this skill:diff --git a/experiments/src/skills/alfworld/alfworld-object-state-modifier/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-state-modifier/SKILL.mdnew file mode 100644index 0000000..9da402f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-state-modifier/SKILL.md@@ -0,0 +1,31 @@+---+name: alfworld-object-state-modifier+description: This skill uses an appliance to change the state of an object (e.g., cooling, heating, cleaning). It should be triggered when the task requires altering an object's temperature or cleanliness using a specific device (like cooling with a fridge or heating with a microwave). The skill requires the object, the target state, and the appliance as inputs, and executes the corresponding modifier action (e.g., 'cool X with Y').+---+# Instructions++## When to Use+Use this skill when the task requires you to **change the state of an object** using a specific household appliance. The primary actions are:+- **Cool** an object (e.g., with a fridge).+- **Heat** an object (e.g., with a microwave or stove).+- **Clean** an object (e.g., with a sink).++## Core Procedure+1. **Locate & Acquire Object:** First, navigate to and pick up the target object.+2. **Navigate to Appliance:** Go to the appliance required for the state change (e.g., `fridge 1`, `microwave 1`).+3. **Prepare Appliance (if needed):** Some appliances require preparation (e.g., opening a fridge or microwave door). Perform the necessary `open` or `toggle` action.+4. **Execute State Change:** Perform the core modifier action: `cool {obj} with {appliance}`, `heat {obj} with {appliance}`, or `clean {obj} with {appliance}`.+5. **Complete Task:** After the state is changed, proceed with the next task step (e.g., placing the object elsewhere).++## Key Considerations+- **Invalid Actions:** If the environment responds with "Nothing happened," your action was invalid. Consult the `references/appliance_interaction_guide.md` for troubleshooting.+- **Appliance State:** Always check if an appliance is open/closed/on/off before attempting the modifier action.+- **Object Holding:** You must be holding the target object (`{obj}`) before executing the state change action.++## Inputs Required+- `{obj}`: The specific object identifier (e.g., `tomato 1`).+- `{target_state}`: The desired state change (`cool`, `heat`, or `clean`).+- `{appliance}`: The specific appliance identifier (e.g., `fridge 1`).++## Output Action+The skill's final output is a single, formatted action string: `{target_state} {obj} with {appliance}`.diff --git a/experiments/src/skills/alfworld/alfworld-object-state-modifier/references/appliance_interaction_guide.md b/experiments/src/skills/alfworld/alfworld-object-state-modifier/references/appliance_interaction_guide.mdnew file mode 100644index 0000000..2d5bd63--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-state-modifier/references/appliance_interaction_guide.md@@ -0,0 +1,42 @@+# Appliance Interaction Guide++This guide details the prerequisites and common issues for using appliances to modify object states.++## Core Modifier Actions+The following actions are directly supported by the skill:+- `cool {obj} with {appliance}`+- `heat {obj} with {appliance}`+- `clean {obj} with {appliance}`++## Appliance-Specific Protocols++### Refrigerator (`fridge`)+* **Purpose:** Cooling objects.+* **Typical Prerequisites:**+ * The fridge does **not** need to be open to perform the `cool` action externally.+ * You must be holding the object.+ * You must be at the fridge's location (`go to fridge 1`).+* **Common Error:** Attempting `cool` from a distance or without the object.++### Microwave (`microwave`)+* **Purpose:** Heating objects.+* **Typical Prerequisites:**+ * The microwave usually must be **open** to place an object inside *before* heating.+ * The `heat` action may be performed after the object is placed inside (`put {obj} in/on microwave 1`).+* **Note:** The trajectory shows `heat` as the modifier action. Placing an object inside is a separate step (`put`).++### Sink (`sinkbasin`)+* **Purpose:** Cleaning objects.+* **Typical Prerequisites:**+ * You must be at the sink.+ * You must be holding the object.+* **Common Error:** Attempting to clean an object that is not dirty or using the wrong receptacle.++## Troubleshooting "Nothing happened"+If the environment returns "Nothing happened" after your modifier action, check this list:++1. **Object in Hand?** Verify you have successfully taken the object (`take {obj} from {recep}`).+2. **Correct Location?** Verify you are at the appliance (`go to {appliance}`).+3. **Appliance State?** For microwaves/ovens, ensure they are open if required. For stoves, ensure the burner is toggled on.+4. **Valid Combination?** Ensure the appliance can perform the requested state change (e.g., you cannot `heat` with a fridge).+5. **Action Syntax?** Double-check the action format: `{state} {obj} with {appliance}`. Spelling and spacing matter.diff --git a/experiments/src/skills/alfworld/alfworld-object-storer/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-storer/SKILL.mdnew file mode 100644index 0000000..7317695--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-storer/SKILL.md@@ -0,0 +1,34 @@+---+name: alfworld-object-storer+description: This skill places an object into a selected storage receptacle after confirming its suitability. It should be triggered when the agent has identified an appropriate storage location and is ready to complete the storage task. The skill takes the object and target receptacle as inputs and results in the object being stored.+---+# Skill: Object Storer++## Purpose+This skill orchestrates the final step of storing a clean object into a designated receptacle within a household environment. It is triggered after the agent has:+1. Located the target object.+2. Cleaned the object if required.+3. Identified and validated a suitable storage location.++## Core Logic+The skill performs a final suitability check and executes the storage action. The core decision is:+- **If the receptacle is open and empty (or appropriately designated)**, proceed with storage.+- **If the receptacle is closed**, open it first, then store the object.+- **If the receptacle is unsuitable** (e.g., already contains unrelated items), the agent should abort this skill and search for an alternative location.++## Inputs & Execution+- **Primary Inputs:** `{object_name}`, `{target_receptacle}`+- **Prerequisite State:** The agent must be holding the clean `{object_name}` and be at the location of the `{target_receptacle}`.+- **Action:** Execute the `put {object_name} in/on {target_receptacle}` command.++## Example from Trajectory+**Scenario:** Storing a clean knife.+1. **Trigger Condition:** Agent is holding `knife 1` (cleaned) and has determined `drawer 1` is a suitable, empty storage location.+2. **Skill Execution:**+ - Agent is at `drawer 1`.+ - Observation: `On the drawer 1, you see nothing.`+ - **Action:** `put knife 1 in/on drawer 1`++## Error Handling+- If the environment responds with "Nothing happened," the action was invalid. Consult the `receptacle_suitability_guide.md` reference and restart the search process.+- Do not use this skill if the receptacle contains items that conflict with the object's storage norms (e.g., putting a knife in a drawer full of spoons).diff --git a/experiments/src/skills/alfworld/alfworld-object-storer/references/receptacle_suitability_guide.md b/experiments/src/skills/alfworld/alfworld-object-storer/references/receptacle_suitability_guide.mdnew file mode 100644index 0000000..337b706--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-storer/references/receptacle_suitability_guide.md@@ -0,0 +1,25 @@+# Receptacle Suitability Guide++## Derived from Execution Trajectory+This guide summarizes the decision logic for selecting a storage receptacle, based on the observed agent behavior.++## Core Principles+1. **Primary Storage:** Drawers are the primary candidate for storing utensils like knives, forks, and spoons.+2. **Suitability Check Protocol:**+ a. **Go to** the candidate receptacle.+ b. If closed, **open** it.+ c. **Observe contents.**+ d. **Evaluate:**+ - **Empty:** Suitable for storage. Proceed with the `alfworld-object-storer` skill.+ - **Contains Similar Items:** May be suitable (e.g., a spoon in a drawer could indicate a utensil drawer). Use context to decide.+ - **Contains Unrelated Items:** Likely unsuitable. Close the receptacle and continue searching.+ e. If unsuitable, **close** the receptacle before leaving.++## Common Receptacle Types & Heuristics+- **Drawers (1-N):** Default search location for cutlery and small kitchen tools. Search sequentially.+- **Countertops:** Typically are **not** storage locations. They are surfaces for temporary placement.+- **Cabinets:** Potential for larger item storage. Not explored in the base trajectory but follow the same check protocol.+- **Sinkbasin:** A cleaning location, **not** a storage location.+- **Dining Table:** A surface for items in use, **not** for permanent storage.++## Flowchart for Decision Makingdiff --git a/experiments/src/skills/alfworld/alfworld-object-transporter/SKILL.md b/experiments/src/skills/alfworld/alfworld-object-transporter/SKILL.mdnew file mode 100644index 0000000..6e05bb6--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-transporter/SKILL.md@@ -0,0 +1,37 @@+---+name: alfworld-object-transporter+description: This skill picks up a target object from its current receptacle and moves it to a specified destination receptacle. It should be triggered when the agent has located an object and needs to relocate it to complete a task (e.g., moving a laptop to a desk). The skill requires the object identifier and source location as input, and it outputs the action sequence to take and transport the object.+---+# Instructions++## When to Use+Use this skill when you have:+1. **Identified the target object** (e.g., `laptop 1`) and its **current source receptacle** (e.g., `bed 2`).+2. **Identified the destination receptacle** (e.g., `desk 1`).+3. The goal requires moving the object to the destination to complete a task.++## Input Requirements+You must provide the following information to execute this skill:+- **`target_object`**: The identifier of the object to move (e.g., `laptop 1`).+- **`source_receptacle`**: The identifier of the receptacle where the object is currently located (e.g., `bed 2`).+- **`destination_receptacle`**: The identifier of the receptacle where the object must be placed (e.g., `desk 1`).++## Execution Flow+1. **Navigate to Source**: Go to the `source_receptacle`.+2. **Pick Up Object**: Take the `target_object` from the `source_receptacle`.+3. **Navigate to Destination**: Go to the `destination_receptacle`.+4. **Place Object**: Put the `target_object` in/on the `destination_receptacle`.++## Action Format+All actions must follow the Alfworld environment's strict format:+- `go to {receptacle}`+- `take {object} from {receptacle}`+- `put {object} in/on {receptacle}`++## Error Handling+- If an action fails (environment returns "Nothing happened"), consult the troubleshooting guide in `references/troubleshooting.md`.+- If the object or receptacle is not found, re-scan the environment before retrying.++## Bundled Resources+- **Script**: `scripts/transport_sequence.py` provides a deterministic sequence generator.+- **Reference**: `references/troubleshooting.md` contains common failure patterns and solutions.diff --git a/experiments/src/skills/alfworld/alfworld-object-transporter/references/troubleshooting.md b/experiments/src/skills/alfworld/alfworld-object-transporter/references/troubleshooting.mdnew file mode 100644index 0000000..717a77c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-object-transporter/references/troubleshooting.md@@ -0,0 +1,34 @@+# Troubleshooting Guide++## Common Failure Patterns++### 1. "Nothing happened" after `go to {receptacle}`+- **Cause**: The receptacle identifier may be incorrect or the agent is not close enough.+- **Solution**:+ - Verify the receptacle name from the latest observation.+ - Ensure you are using the exact identifier (e.g., `sidetable 1` not `side table 1`).+ - If multiple receptacles exist, try the closest one first.++### 2. "Nothing happened" after `take {object} from {receptacle}`+- **Cause**:+ - The object is not on the specified receptacle.+ - The object identifier is incorrect.+ - The object is not takeable.+- **Solution**:+ - Re-examine the observation for the receptacle's contents.+ - Confirm the object exists and is spelled correctly.+ - Try taking a different instance (e.g., `laptop 2` if `laptop 1` fails).++### 3. "Nothing happened" after `put {object} in/on {receptacle}`+- **Cause**:+ - The destination receptacle is full or does not accept the object.+ - The agent is not holding the object.+- **Solution**:+ - Check if the destination has capacity (e.g., not already holding many items).+ - Verify the agent successfully picked up the object in the previous step.+ - Try a different destination receptacle if the task allows.++## Best Practices+1. **Always validate inputs**: Cross-check object and receptacle names with the latest observation.+2. **Order matters**: Execute actions in the sequence order (go β take β go β put).+3. **Handle variants**: Some tasks may require `put {object} in {receptacle}` vs. `on {receptacle}`. Use the preposition that matches the destination type (e.g., `in` for containers, `on` for surfaces).diff --git a/experiments/src/skills/alfworld/alfworld-open-receptacle/SKILL.md b/experiments/src/skills/alfworld/alfworld-open-receptacle/SKILL.mdnew file mode 100644index 0000000..708d2e4--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-open-receptacle/SKILL.md@@ -0,0 +1,30 @@+---+name: alfworld-open-receptacle+description: This skill opens a closed receptacle to access its contents. It should be triggered when an agent needs to interact with items inside a closed container (e.g., fridge, microwave, drawer). The skill takes a receptacle identifier as input, performs the open action, and outputs the observation of the interior, enabling subsequent item retrieval or placement.+---+# Skill: Open Receptacle++## Purpose+Open a closed container to reveal its contents for subsequent interaction.++## When to Use+Use this skill when:+- You need to take an item from inside a closed receptacle+- You need to put an item into a closed receptacle+- You observe a receptacle is closed (e.g., "The fridge 1 is closed")+- The task requires accessing items inside containers++## Input Format+The skill requires a receptacle identifier as input. This should match the environment's naming convention (e.g., "fridge 1", "microwave 1", "drawer 3").++## Execution Steps+1. **Verify receptacle state**: Check if the receptacle is mentioned as "closed" in the observation+2. **Navigate to receptacle**: Use `go to {recep}` if not already at the location+3. **Execute open action**: Use `open {recep}` where `{recep}` is the receptacle identifier+4. **Process result**: The environment will respond with the interior contents or an error++## Expected Outcomes+- **Success**: Observation showing the receptacle is open and listing contained items+- **Failure**: "Nothing happened" indicates the action was invalid (e.g., already open, wrong identifier)++## Example from Trajectorydiff --git a/experiments/src/skills/alfworld/alfworld-open-receptacle/receptors/action_sequence_examples.md b/experiments/src/skills/alfworld/alfworld-open-receptacle/receptors/action_sequence_examples.mdnew file mode 100644index 0000000..8ea82be--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-open-receptacle/receptors/action_sequence_examples.md@@ -0,0 +1,5 @@+# Action Sequence Examples++## Successful Opening Sequences++### Example 1: Opening Fridgediff --git a/experiments/src/skills/alfworld/alfworld-open-receptacle/references/common_receptacles.md b/experiments/src/skills/alfworld/alfworld-open-receptacle/references/common_receptacles.mdnew file mode 100644index 0000000..ed325e1--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-open-receptacle/references/common_receptacles.md@@ -0,0 +1,73 @@+# Common Receptacles in ALFWorld Environment++## Overview+This document lists common receptacle types found in ALFWorld household environments and their typical contents.++## Kitchen Receptacles++### Refrigeration+- **fridge 1**: Cold storage for perishable items+ - Typical contents: vegetables, fruits, dairy, meats+ - Example: potato, tomato, plate, milk++### Cooking Appliances+- **microwave 1**: For heating food+ - May contain: previously heated items+ - Example: apple, mug, plate++### Storage+- **cabinet 1-9**: General storage+ - Contents vary: dishes, food packages, utensils+- **drawer 1-13**: Smaller storage+ - Often contains: utensils, small items+ - Example: fork, spoon, knife++### Countertops+- **countertop 1-2**: Surface areas+ - May hold: various objects temporarily+ - Not typically "opened" but can hold items++## Living/Bedroom Receptacles+- **desk 1**: Work surface with drawers+- **sidetable 1-2**: Small tables with storage+- **dresser 1**: Clothing storage++## Bathroom Receptacles+- **cabinetbath 1**: Bathroom storage+- **drawerbath 1**: Bathroom drawer++## Opening Mechanics++### States+1. **Closed**: Cannot see contents, must open first+2. **Open**: Contents visible, can interact with items+3. **Locked**: Requires key or specific action (rare)++### Action Requirements+- Most receptacles require `open {receptacle}` before accessing contents+- Some may be initially open+- Closing is optional but can be done with `close {receptacle}`++### Special Cases+- **toaster 1**: May require toggling rather than opening+- **coffeemachine 1**: May have specific interaction sequences+- **garbagecan 1**: Usually open, but may have lid++## Best Practices++### Before Opening+1. Verify you are at the receptacle location+2. Check observation for "closed" status+3. Ensure no conflicting actions needed first++### After Opening+1. Note all visible items+2. Check if target item is present+3. Plan next action (take, put, etc.)++### Error Recovery+If "Nothing happened" when trying to open:+1. Re-read observation - receptacle might already be open+2. Check spelling of receptacle identifier+3. Verify you're at correct location+4. Try alternative approach if applicablediff --git a/experiments/src/skills/alfworld/alfworld-receptacle-closer/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-closer/SKILL.mdnew file mode 100644index 0000000..76a4612--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-closer/SKILL.md@@ -0,0 +1,21 @@+---+name: alfworld-receptacle-closer+description: Closes an open receptacle to maintain environment tidiness after inspection. Trigger this after you have finished searching a container and no longer need it open. It helps prevent clutter and is often used as a cleanup step following object searching inside drawers or similar containers.+---+# Skill: Receptacle Closer++## When to Use+Use this skill **immediately after** you have finished inspecting the contents of an open receptacle (e.g., a drawer, cabinet, or container) and have determined you no longer need it to remain open. This is a cleanup action to maintain a tidy environment.++## Core Instruction+1. **Identify the Target:** The target is the receptacle you just finished searching. It must be open.+2. **Execute Action:** Perform the `close` action on the identified receptacle.+3. **Format:** Your output must follow the standard action format: `Action: close {recep}`++## Example from Trajectory+* **Context:** After opening and inspecting `drawer 2` (finding it empty), the agent closed it.+* **Thought:** "I should close drawer 2 to keep the room tidy and continue my search."+* **Action:** `close drawer 2`++## Key Principle+This is a low-cognitive-load, procedural step. Do not overthink it. If you opened a receptacle to look inside and are done with it, close it.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-closer/references/action_primer.md b/experiments/src/skills/alfworld/alfworld-receptacle-closer/references/action_primer.mdnew file mode 100644index 0000000..b6c9a0d--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-closer/references/action_primer.md@@ -0,0 +1,22 @@+# ALFWorld Action Primer for Receptacle Closing++## Available Actions Context+The agent operates with a discrete set of actions. The relevant action for this skill is:+- `close {recep}`: Closes the specified receptacle if it is currently open.++## Common Receptacle Types+* `drawer #`+* `cabinet #`+* `fridge #`+* `microwave #`+* `box #`+* `washingmachine #`++## Trajectory Logic Extract+The skill is derived from the following step in the provided trajectory:+1. Agent opened `drawer 2` to inspect contents.+2. Agent observed contents (`nothing`).+3. Agent's **Thought** explicitly stated the tidiness rationale: *"I should close drawer 2 to keep the room tidy and continue my search."*+4. Agent executed **Action:** `close drawer 2`.++This demonstrates the skill's trigger condition: **post-inspection cleanup**.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-finder/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-finder/SKILL.mdnew file mode 100644index 0000000..76dbebf--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-finder/SKILL.md@@ -0,0 +1,24 @@+---+name: alfworld-receptacle-finder+description: This skill searches for a suitable empty or appropriately occupied receptacle (like a shelf) to place an object. It should be triggered when the agent needs to store or place an object and must evaluate available receptacles. The skill examines candidate receptacles and identifies one meeting the placement criteria.+---+# Instructions++**Trigger:** Use this skill when you have an object in your inventory that needs to be stored or placed, and you must find a suitable receptacle (e.g., shelf, table, basin).++## Core Procedure+1. **Identify Target Object:** Confirm the object you are holding and its state (e.g., `soapbar 1`, `clean`).+2. **Survey Environment:** Use `go to {recep}` actions to navigate to and visually inspect candidate receptacles from the observation list.+3. **Evaluate Candidates:** For each receptacle, assess its suitability:+ * **Primary Goal:** Find an **empty receptacle**.+ * **Fallback:** If no empty receptacle is available, identify one that can logically accommodate the object without conflict (e.g., a shelf with a tissuebox may still have space for a soapbar).+4. **Select & Place:** Navigate to the chosen suitable receptacle and execute `put {obj} in/on {recep}`.++## Key Considerations+* **Object State:** Ensure the object meets any required pre-conditions (e.g., `clean`) before searching for a receptacle. Use skills like `clean` if necessary.+* **Efficiency:** Prioritize receptacles that are logically appropriate for the object (e.g., a `shelf` for a `soapbar` over a `toilet`).+* **Observation Parsing:** Carefully read the observation after each `go to` action. The line "On the {recep}, you see..." lists its contents. "you see nothing." indicates it is empty.+* **Invalid Actions:** If an action fails ("Nothing happened"), re-evaluate your target and try a different receptacle or confirm the object is in your inventory.++## Example Trajectory (from `references/example_trajectory.md`)+For a detailed example of this skill in action, including handling object pre-cleaning and sequential shelf evaluation, refer to the bundled reference.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-finder/references/example_trajectory.md b/experiments/src/skills/alfworld/alfworld-receptacle-finder/references/example_trajectory.mdnew file mode 100644index 0000000..3f71a16--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-finder/references/example_trajectory.md@@ -0,0 +1,18 @@+# Example Execution: Placing a Clean Soapbar++This document provides a reference trajectory demonstrating the `alfworld-receptacle-finder` skill.++**Task:** `put a clean soapbar in shelf.`++**Agent Trajectory:**+1. **Locate Object:** The agent first finds a `soapbar 1` on the `toilet 1` and takes it.+2. **Pre-condition Check:** The agent ensures the soapbar is `clean` by using the `sinkbasin 1`.+3. **Receptacle Search Initiated:** The skill is triggered. The agent begins surveying shelves.+ * `go to shelf 1`: Observation shows `tissuebox 1`. Not empty, but could be a fallback.+ * `go to shelf 2`: Observation shows `nothing`. **Suitable empty receptacle found.**+4. **Placement:** The agent executes `put soapbar 1 in/on shelf 2`, completing the task.++**Key Skill Behaviors Demonstrated:**+* **Sequential Inspection:** The agent checked shelves in order (`shelf 1`, then `shelf 2`).+* **Empty Receptacle Priority:** `shelf 2` was chosen because it was empty, satisfying the primary goal.+* **Integration with Pre-conditions:** The cleaning step was performed *before* the receptacle search, ensuring the object state ("clean soapbar") was correct.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-navigator/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-navigator/SKILL.mdnew file mode 100644index 0000000..8f8e815--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-navigator/SKILL.md@@ -0,0 +1,28 @@+---+name: alfworld-receptacle-navigator+description: This skill plans and executes movement to a target receptacle within the environment. It should be triggered when the agent needs to interact with an object at a specific location (e.g., go to fridge to cool an item) or needs to access a receptacle itself (e.g., go to garbagecan to dispose of an item). The skill uses the receptacle name from the observation or task goal, outputs the 'go to' action, and confirms arrival at the destination.+---+# Skill: Receptacle Navigator++## Purpose+Navigate to a specified receptacle (e.g., `fridge 1`, `garbagecan 1`, `diningtable 1`) in an ALFWorld household environment. This is a foundational skill for positioning the agent to perform subsequent object interactions.++## When to Use+Trigger this skill when the agent's plan requires:+1. **Accessing a location** to interact with an object there (e.g., "go to fridge to cool an item").+2. **Interacting with the receptacle itself** (e.g., "go to garbagecan to dispose of an item").++## Core Logic+1. **Input Parsing:** Extract the target receptacle name (e.g., `fridge 1`) from the current task context or observation.+2. **Action Execution:** Output the ALFWorld action: `go to {target_receptacle}`.+3. **Success Verification:** Confirm the action was successful by checking the observation for evidence of arrival (e.g., "You are at the {receptacle}" or the receptacle is now in the observable list).++## Instructions+1. Identify the target receptacle from the goal or current observation.+2. Execute the `go to` action.+3. If the environment responds with "Nothing happened", the action was invalid. Consult the `references/common_receptacles.md` list and the latest observation to formulate a new `go to` target.+4. Upon successful navigation, proceed with the next skill in the plan (e.g., `alfworld-object-interactor`).++## Error Handling+- **Invalid Target:** If "Nothing happened" is observed, the receptacle may be unreachable or incorrectly named. Re-analyze the scene description to find a valid path or alternative receptacle.+- **Already at Location:** If the observation indicates you are already at the target, skip the `go to` action and proceed.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-navigator/references/common_receptacles.md b/experiments/src/skills/alfworld/alfworld-receptacle-navigator/references/common_receptacles.mdnew file mode 100644index 0000000..89a556a--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-navigator/references/common_receptacles.md@@ -0,0 +1,21 @@+# Common ALFWorld Receptacles+This is a non-exhaustive list of receptacle types commonly found in ALFWorld environments. Use this for reference when parsing scene observations.++## Primary Storage & Surfaces+* `cabinet {#}`+* `countertop {#}`+* `diningtable {#}`+* `drawer {#}`+* `shelf {#}` (if present)++## Appliances+* `coffeemachine {#}`+* `fridge {#}`+* `microwave {#}`+* `safe {#}`+* `sinkbasin {#}`+* `stoveburner {#}`+* `toaster {#}`++## Other+* `garbagecan {#}`diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-opener/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-opener/SKILL.mdnew file mode 100644index 0000000..ef9678f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-opener/SKILL.md@@ -0,0 +1,24 @@+---+name: alfworld-receptacle-opener+description: This skill opens a closed receptacle to allow access to its contents or to enable interaction with it. It should be triggered when the agent encounters a closed receptacle (e.g., 'The fridge 1 is closed.') that must be opened to proceed with a task, such as cooling an item with a fridge or taking an object from inside a cabinet. The skill outputs the 'open' action on the specified receptacle.+---+# Skill: Open Closed Receptacle++## Trigger Condition+Use this skill when the environment observation explicitly states that a receptacle is **closed** and opening it is necessary to proceed with your current task. The typical observation pattern is: `"The <receptacle_name> is closed."`++## Action+Execute the `open` action on the identified receptacle.++## Procedure+1. **Identify the Receptacle:** From the observation, extract the name of the closed receptacle (e.g., `fridge 1`, `cabinet 12`, `safe 1`).+2. **Execute Action:** Output the action in the format: `Action: open <receptacle_name>`.++## Example from Trajectory+* **Observation:** `"The fridge 1 is closed."`+* **Thought:** `The fridge is closed. I need to open it to access the cooling compartment.`+* **Action:** `Action: open fridge 1`++## Notes+* This is a fundamental, low-level skill for enabling access. After opening the receptacle, you may need to use other skills (e.g., `take`, `cool`, `put`) to complete your objective.+* Do not use this skill if the receptacle is already described as open or if its state is not mentioned.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-operator/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-operator/SKILL.mdnew file mode 100644index 0000000..6ad757c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-operator/SKILL.md@@ -0,0 +1,36 @@+---+name: alfworld-receptacle-operator+description: This skill opens or closes a receptacle (like a fridge, cabinet, or microwave) to access its interior or secure it. It should be triggered when an object needs to be placed inside/retrieved from a closed container, or when an open container should be closed (e.g., for energy efficiency or task cleanliness). The skill decides the appropriate 'open' or 'close' action based on the receptacle's current state and the task context.+---+# Skill: Receptacle Operator++## When to Use+Use this skill when you need to:+1. **Access a closed receptacle** to place an object inside or take an object out.+2. **Secure an open receptacle** after accessing it (e.g., to conserve energy, maintain cleanliness, or complete a task step).++## Core Decision Logic+1. **Check the receptacle's state** from the observation.+ - If it reports "is closed" or "is open", note the state.+ - If the interior is visible (e.g., "In it, you see..."), it is open.+2. **Choose action based on goal**:+ - **Goal requires interior access** (e.g., "put in microwave", "take from fridge"):+ - If closed β `open {recep}`+ - If open β proceed with next step (e.g., `put` or `take`)+ - **Goal requires securing receptacle** (e.g., after accessing, or for efficiency):+ - If open β `close {recep}`+ - If closed β no action needed+3. **Execute the action** using the exact format: `Action: open {recep}` or `Action: close {recep}`++## Example from Trajectory+- **Task**: "cool some tomato and put it in microwave"+- **Step 1**: At closed fridge β `Action: open fridge 1`+- **Step 2**: After checking interior β `Action: close fridge 1` (for efficiency)+- **Step 3**: At closed microwave β `Action: open microwave 1`++## Important Notes+- Always verify the receptacle state from the latest observation before acting.+- The skill only handles `open` and `close` actions. Other actions (like `take`, `put`, `cool`) are separate skills.+- If "Nothing happened" is observed after your action, the receptacle may already be in that stateβre-check and adjust.++For detailed state diagrams and edge cases, see the reference documentation.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-operator/references/state_diagrams.md b/experiments/src/skills/alfworld/alfworld-receptacle-operator/references/state_diagrams.mdnew file mode 100644index 0000000..f4c1ec6--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-operator/references/state_diagrams.md@@ -0,0 +1,3 @@+# Receptacle State Diagrams & Edge Cases++## Primary State Transitionsdiff --git a/experiments/src/skills/alfworld/alfworld-receptacle-preparer/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-preparer/SKILL.mdnew file mode 100644index 0000000..6a6fe88--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-preparer/SKILL.md@@ -0,0 +1,30 @@+---+name: alfworld-receptacle-preparer+description: This skill verifies and prepares a target receptacle for receiving an object. It is triggered before placing an item into a receptacle (e.g., a garbage can) to ensure the receptacle is accessible and suitable. The skill involves navigating to the receptacle, observing its state (e.g., open/closed, occupied), and performing any necessary preparatory actions like opening it, resulting in a ready-to-use target location.+---+# Instructions++**Trigger:** This skill is invoked when the agent's goal requires placing an object into a target receptacle (e.g., "put X in/on Y").++## Core Procedure+1. **Navigate:** Use `go to {target_receptacle}` to move to the target receptacle's location.+2. **Observe:** Upon arrival, carefully read the environment's observation. It will describe the receptacle's state and any contents.+3. **Analyze & Prepare:** Based on the observation, determine if the receptacle is ready.+ * **Ready State:** The receptacle is described as present and accessible (e.g., "On the garbagecan 1, you see a cd 1."). No further action is needed. Proceed to place the object.+ * **Blocked/Closed State:** If the receptacle is closed, latched, or obstructed, use the appropriate action (`open {recep}`, `toggle {obj} {recep}`) to prepare it.+ * **Invalid Target:** If the observation indicates the receptacle does not exist or cannot be interacted with ("Nothing happened"), you must abort this skill and re-plan your task strategy.+4. **Confirm:** After any preparatory action, observe the environment's feedback to confirm the receptacle is now ready.++## Key Principles+* **Efficiency:** This skill is a preparatory step. Do not spend turns searching for the object to be placed here. That is a separate "search" skill.+* **Context:** The observation text is your only source of truth about the receptacle's state. Interpret it literally.+* **Idempotency:** If the receptacle is already ready, this skill completes immediately with no action required beyond observation.++## Example from Trajectory+**Goal Context:** "find two pen and put them in garbagecan."+**Skill Execution:**+1. Thought: "I'll check the garbage can first to ensure it's open and ready to receive items."+2. Action: `go to garbagecan 1`+3. Observation: "On the garbagecan 1, you see a cd 1."+4. Analysis: The garbage can is present and accessible (a CD inside does not block new items). It is **ready**.+5. Outcome: Skill completes. The agent proceeds to `put pen 3 in/on garbagecan 1`.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-preparer/references/action_primer.md b/experiments/src/skills/alfworld/alfworld-receptacle-preparer/references/action_primer.mdnew file mode 100644index 0000000..00a23bd--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-preparer/references/action_primer.md@@ -0,0 +1,22 @@+# ALFWorld Action Reference++This document lists the core actions available to the agent, as defined in the trajectory. Use this for quick reference.++## Action List+1. `go to {recep}` - Move to a specified receptacle.+2. `take {obj} from {recep}` - Pick up an object from a receptacle.+3. `put {obj} in/on {recep}` - Place an object into or onto a receptacle.+4. `open {recep}` - Open a closed receptacle (e.g., drawer, fridge).+5. `close {recep}` - Close an open receptacle.+6. `toggle {obj} {recep}` - Activate a toggleable object (e.g., lightswitch, stove).+7. `clean {obj} with {recep}` - Clean an object using a receptacle/tool.+8. `heat {obj} with {recep}` - Heat an object using a receptacle/appliance.+9. `cool {obj} with {recep}` - Cool an object using a receptacle/appliance.++## For Receptacle Preparation+The most critical actions for this skill are:+* `go to {target_receptacle}`: Essential for step 1.+* `open {target_receptacle}`: The primary preparatory action if the receptacle is found closed.+* `toggle {obj} {recep}`: May be needed for certain electronic or latch mechanisms.++**Note:** The `{obj}` and `{recep}` placeholders must be replaced with the exact nouns observed in the environment (e.g., `garbagecan 1`, `sidetable 2`, `pen 3`).diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-searcher/SKILL.md b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/SKILL.mdnew file mode 100644index 0000000..8bf9417--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/SKILL.md@@ -0,0 +1,31 @@+---+name: alfworld-receptacle-searcher+description: This skill searches for a specific receptacle (e.g., garbage can, cabinet) by systematically exploring the environment, checking multiple locations until found. Trigger when the target receptacle is not initially visible, often after scanning nearby areas. It outputs the receptacle's location and may involve navigating through multiple waypoints.+---+# Instructions++## When to Use+Use this skill when you need to locate a specific receptacle (e.g., `garbagecan 1`, `cabinet 3`) that is not immediately visible in your current observation. The skill is triggered after an initial scan of nearby areas fails to reveal the target.++## Core Procedure+1. **Identify Target**: Confirm the exact name of the receptacle you need to find (e.g., from the task: "put a cool lettuce in garbagecan" -> target is `garbagecan 1`).+2. **Initial Check**: Quickly examine the most common or nearby receptacles mentioned in the initial observation (e.g., countertops, tables, open cabinets).+3. **Systematic Search**: If not found, begin a systematic exploration:+ - Use the `go to {recep}` action to navigate to candidate locations.+ - Prioritize receptacles that are typically in the environment (cabinets, countertops, tables).+ - If a candidate is closed (e.g., "The cabinet 2 is closed."), you may skip opening it unless the target could logically be inside. The trajectory shows that the target receptacle (`garbagecan 1`) was not inside any closed cabinet.+4. **Persistence**: Continue the search until the target is found. The trajectory demonstrates checking 20 cabinets before finally locating the garbage can.+5. **Output**: Once found, note the receptacle's location and state (e.g., "On the garbagecan 1, you see nothing."). You are now ready to use this receptacle for the next task action (e.g., `put lettuce 1 in/on garbagecan 1`).++## Key Notes+- **Efficiency**: The search pattern in the trajectory was exhaustive (checking all cabinets 1-20). In practice, you might infer likely locations based on receptacle type (e.g., a garbage can is often standalone, not inside a cabinet).+- **Error Handling**: If an action returns "Nothing happened", the receptacle may not be accessible or may require a different approach (e.g., opening first).+- **Integration**: This skill outputs the found receptacle's identifier. It does not perform the final task action (e.g., putting an item in the receptacle); that is handled by the main task orchestration.++## Example from Trajectory+**Goal**: Find `garbagecan 1`.+**Process**:+1. Checked `countertop 1`, `diningtable 1`, `diningtable 2` (not found).+2. Systematically went to `cabinet 1` through `cabinet 20` (all closed, not found).+3. Finally went directly to `garbagecan 1` (found).+**Output**: Location of `garbagecan 1` confirmed.diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-searcher/assets/search_pattern_template.json b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/assets/search_pattern_template.jsonnew file mode 100644index 0000000..d6caa36--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/assets/search_pattern_template.json@@ -0,0 +1,43 @@+{+ "skill_name": "alfworld-receptacle-searcher",+ "purpose": "Template for generating a systematic search pattern for a target receptacle.",+ "parameters": {+ "target_receptacle": {+ "type": "string",+ "description": "The name of the receptacle to find (e.g., 'garbagecan 1')."+ },+ "initial_observation": {+ "type": "string",+ "description": "The initial environment description containing a list of receptacles."+ },+ "search_strategy": {+ "type": "string",+ "enum": ["exhaustive", "smart"],+ "default": "exhaustive",+ "description": "'exhaustive' checks all known receptacles; 'smart' uses heuristics to prioritize likely locations."+ }+ },+ "output": {+ "actions": {+ "type": "array",+ "items": {+ "type": "string",+ "pattern": "^go to [a-zA-Z0-9]+ [0-9]+$"+ },+ "description": "A list of 'go to' actions to execute in order."+ },+ "found_at": {+ "type": "string",+ "description": "The receptacle where the target was found (if known)."+ }+ },+ "example": {+ "target_receptacle": "garbagecan 1",+ "initial_observation": "You are in the middle of a room. Looking quickly around you, you see a cabinet 1, a cabinet 2, a countertop 1, a garbagecan 1.",+ "search_strategy": "exhaustive",+ "output": {+ "actions": ["go to cabinet 1", "go to cabinet 2", "go to countertop 1", "go to garbagecan 1"],+ "found_at": "garbagecan 1"+ }+ }+}diff --git a/experiments/src/skills/alfworld/alfworld-receptacle-searcher/references/environment_guide.md b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/references/environment_guide.mdnew file mode 100644index 0000000..6aeec2b--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-receptacle-searcher/references/environment_guide.md@@ -0,0 +1,29 @@+# ALFWorld Environment Guide for Receptacle Searching++## Overview+This document provides context about the ALFWorld environment to aid in receptacle searching. It is intended to be loaded into the agent's context when needed.++## Common Receptacle Types+1. **Cabinets (cabinet 1-20)**: Often closed; may contain items. The garbage can is typically not inside a cabinet.+2. **Countertops (countertop 1, 2)**: Usually open surfaces with items placed on them.+3. **Tables (diningtable 1, 2)**: Similar to countertops.+4. **Appliances**: Fridge, microwave, stoveburner, toaster, coffeemachine.+5. **Containers**: Drawer 1-6, sinkbasin, garbagecan.++## Search Heuristics+- **Garbage Can**: Often a standalone receptacle (`garbagecan 1`). It is usually not inside another receptacle. In the trajectory, it was found by going directly to it after checking many cabinets.+- **Cabinets**: If the target is a cabinet, you may need to open it first (`open cabinet X`).+- **Efficiency**: When searching for a receptacle that is likely to be in the open (e.g., garbage can, countertop), prioritize checking open surfaces first before enclosed spaces.++## Action Set (from Trajectory)+The available actions relevant to searching:+- `go to {recep}`: Navigate to a receptacle.+- `open {recep}`: Open a closed receptacle (e.g., cabinet, fridge).+- `close {recep}`: Close an open receptacle.++## Observation Patterns+- "On the {recep}, you see ...": The receptacle is open and has items.+- "The {recep} is closed.": The receptacle is closed; you may need to open it to see inside.+- "Nothing happened.": The action was invalid (e.g., trying to go to a non-existent receptacle).++## Example Trajectory Snippetdiff --git a/experiments/src/skills/alfworld/alfworld-search-pattern-executor/SKILL.md b/experiments/src/skills/alfworld/alfworld-search-pattern-executor/SKILL.mdnew file mode 100644index 0000000..215bb56--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-search-pattern-executor/SKILL.md@@ -0,0 +1,35 @@+---+name: alfworld-search-pattern-executor+description: Systematically searches a sequence of likely locations for a target object based on common sense. Takes a list of candidate receptacles, orchestrates navigation and inspection, and outputs when the target is found or all locations are exhausted.+---+# Skill: Systematic Object Search++## Purpose+Use this skill when you need to find a specific object in a household environment without prior knowledge of its exact location. The skill implements a robust search pattern based on common sense about where objects are typically stored.++## Core Workflow+1. **Input:** A target object name (e.g., `remotecontrol`) and an ordered list of candidate receptacles to search.+2. **Process:** Navigate to each candidate location in sequence. For each receptacle:+ * If it's closed, open it.+ * Inspect its contents.+ * If the target object is found, take it and proceed to the placement phase.+ * If the receptacle was opened and is empty, close it before moving on.+3. **Output:** Success when the object is found, or a failure state after all candidates are exhausted.++## Key Principles+* **Methodical Search:** Do not skip locations in the provided sequence unless the object is found.+* **State Management:** Always close drawers/cabinets after checking them if they were opened.+* **Focus:** Once the object is found, immediately transition to the next phase of the task (e.g., `put`). Avoid redundant searches.+* **Error Handling:** If an action fails (e.g., "Nothing happened"), the skill logic in `scripts/search_orchestrator.py` provides fallback reasoning.++## Usage Example+**Goal:** "find two remotecontrol and put them in armchair."+**Skill Execution:**+1. Activate this skill with target=`remotecontrol`, candidates=`['sofa 1', 'sidetable 1', 'dresser 1', 'drawer 1', 'drawer 2', 'drawer 3', 'drawer 4', 'coffeetable 1']`.+2. The skill searches locations in order. It finds the first `remotecontrol` on `coffeetable 1`.+3. The agent takes the object and proceeds to place it in `armchair 1`.+4. The skill is re-activated for the second `remotecontrol`, searching the remaining candidates (or the same list). It finds the second `remotecontrol` on `coffeetable 1`.+5. The agent takes and places the second object, completing the task.++## Integration+This skill is designed to be called as a subroutine within a larger task plan. The bundled `search_orchestrator.py` script handles the low-level action sequencing to prevent logical errors and repetitive mistakes observed in the learning trajectory.diff --git a/experiments/src/skills/alfworld/alfworld-search-pattern-executor/references/common_sense_locations.md b/experiments/src/skills/alfworld/alfworld-search-pattern-executor/references/common_sense_locations.mdnew file mode 100644index 0000000..cbae35c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-search-pattern-executor/references/common_sense_locations.md@@ -0,0 +1,50 @@+# Common Sense Location Priorities++This reference provides typical search priorities for household objects, derived from general world knowledge. Use this to generate the initial `candidate_receptacles` list for the `alfworld-search-pattern-executor` skill.++## High-Priority Locations (Search First)+* **Surfaces near seating/entertainment:** Coffee tables, side tables, sofas, armchairs, TV stands.+* **General storage surfaces:** Dressers, countertops, desks, shelves.+* **Designated storage:** Cabinets, drawers (especially in living rooms or entertainment centers).+* **Containers:** Boxes, baskets, bins in relevant rooms.++## Object-Specific Heuristics++### Remote Controls+1. Coffee Table+2. Sofa / Armchair (cushions)+3. Side Table+4. TV Stand / Entertainment Center+5. Drawers in living room furniture+6. Countertops (kitchen, if misplaced)++### Keys / Keychains+1. Key hooks / entryway table+2. Drawers near entrance+3. Countertops+4. Bags / purses+5. Dresser tops++### Books / Magazines+1. Bookshelves+2. Coffee Tables+3. Nightstands+4. Desks+5. Baskets or magazine racks++### Kitchen Utensils+1. Utensil drawers+2. Countertop holders+3. Dishwasher+4. Sink+5. Cabinets++## Search Pattern Principles+1. **Visible First:** Always check surfaces and open areas before enclosed storage.+2. **Proximity:** Search areas logically associated with the object's use (e.g., remotes near TVs).+3. **Frequency:** Check commonly used locations first, then less frequented ones.+4. **Room-by-Room:** If the environment is large, constrain the search to the most relevant room first.++## Example Candidate Lists+* **For a remote in a living room:** `['coffeetable 1', 'sofa 1', 'sidetable 1', 'dresser 1', 'drawer 1', 'drawer 2', 'cabinet 1']`+* **For a book in a bedroom:** `['dresser 1', 'sidetable 1', 'desk 1', 'bookshelf 1', 'drawer 1']`diff --git a/experiments/src/skills/alfworld/alfworld-search-verifier/SKILL.md b/experiments/src/skills/alfworld/alfworld-search-verifier/SKILL.mdnew file mode 100644index 0000000..e06101d--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-search-verifier/SKILL.md@@ -0,0 +1,30 @@+---+name: alfworld-search-verifier+description: This skill re-examines previously visited locations to confirm the absence of a target object or to check for overlooked items. It should be triggered when an initial search fails to find enough objects or when double-checking is required for task completion. The skill systematically revisits receptacles, ensuring no viable location is missed before concluding the search.+---+# Instructions++**Trigger Condition:** Use this skill when an initial search for a target object (e.g., `cellphone`) has been performed but the required quantity has not been found, or when you need to verify that no viable location was missed before task failure.++## Core Procedure++1. **Initialize Tracking:** Maintain a mental or explicit list of all receptacles (`recep`) you have already visited during your initial search (e.g., `sidetable 1`, `shelf 1-8`, `drawer 1`, `drawer 2`, `desk 1`).++2. **Systematic Revisit:** Do not search new, unvisited locations. Instead, systematically return to each previously visited receptacle in a logical order (e.g., by proximity or by the original search sequence).+ * **Action:** Use `go to {recep}` to navigate.+ * **For Closed Receptacles:** If a receptacle was closed during the initial search and you opened it, it may be closed again. Re-open it to verify its contents.+ * **Action:** Use `open {recep}`.+ * **For Open/Empty Receptacles:** Observe the contents again. The state may have changed, or an item may have been overlooked.+ * **Action:** No action needed; read the `Observation`.++3. **Verification Logic:** For each revisited location:+ * If the target object is now present, retrieve it (`take {obj} from {recep}`) and proceed with the main task.+ * If the location is confirmed to lack the target object, note it as thoroughly checked and move to the next location on your list.+ * If you encounter a closed receptacle you previously assumed was empty, opening it is a critical verification step.++4. **Conclusion:** After revisiting all locations on your list:+ * **If the target object was found:** Integrate it into your main task plan.+ * **If the target object was not found:** You can conclusively report that the object is not available in the searched area and adjust your task strategy accordingly (e.g., consider task failure or exploring a new, unsearched area).++## Thought Process Template+When executing this skill, structure your reasoning as follows:diff --git a/experiments/src/skills/alfworld/alfworld-search-verifier/references/alfworld_actions_ref.md b/experiments/src/skills/alfworld/alfworld-search-verifier/references/alfworld_actions_ref.mdnew file mode 100644index 0000000..6c652e7--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-search-verifier/references/alfworld_actions_ref.md@@ -0,0 +1,25 @@+# Alfworld Action Reference++This document lists the core actions available to an agent in the Alfworld environment, as per the trajectory. Use this for quick reference when planning actions.++## Action List & Format+The agent must output actions strictly in the format: `Action: <action command>`.++| # | Action Template | Description | Example |+|---|--------------------------|-----------------------------------------------------------------------------|-----------------------------|+| 1 | `go to {recep}` | Navigate to a specified receptacle. | `go to sidetable 1` |+| 2 | `take {obj} from {recep}`| Pick up an object from a receptacle. | `take cellphone 3 from desk 1` |+| 3 | `put {obj} in/on {recep}`| Place a held object into or onto a receptacle. | `put cellphone 3 in/on bed 1` |+| 4 | `open {recep}` | Open a closed receptacle (e.g., drawer, cabinet). | `open drawer 1` |+| 5 | `close {recep}` | Close an open receptacle. | `close drawer 1` |+| 6 | `toggle {obj} {recep}` | Toggle the state of an object (e.g., switch) associated with a receptacle. | `toggle lamp sidetable 1` |+| 7 | `clean {obj} with {recep}`| Clean an object using a receptacle/tool. | `clean plate with sinkbasin 1`|+| 8 | `heat {obj} with {recep}`| Heat an object using a receptacle/appliance. | `heat soup with microwave 1`|+| 9 | `cool {obj} with {recep}`| Cool an object using a receptacle/appliance. | `cool wine with fridge 1` |++## Key Notes for Search Verifier Skill+* **{recep}:** A receptacle is a container or surface (e.g., `shelf 1`, `desk 1`, `drawer 2`, `bed 1`).+* **{obj}:** An object is an item that can be manipulated (e.g., `cellphone 3`, `credit card 1`).+* **Verification Relevance:** The `go to`, `open`, and `close` actions are most critical for the search-verifier skill to navigate and inspect receptacles.+* **Observation:** After each action, the environment provides an `Observation:` which must be parsed to determine the next step.+* **Invalid Actions:** If an action is invalid, the environment outputs `"Nothing happened"`. The verifier skill should typically not trigger invalid actions if following a known list of receptacles.diff --git a/experiments/src/skills/alfworld/alfworld-storage-explorer/SKILL.md b/experiments/src/skills/alfworld/alfworld-storage-explorer/SKILL.mdnew file mode 100644index 0000000..5726d4c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-storage-explorer/SKILL.md@@ -0,0 +1,55 @@+---+name: alfworld-storage-explorer+description: This skill systematically explores storage receptacles (like drawers or cabinets) to find an appropriate placement location for an object. It should be triggered when the agent needs to store an item but the exact storage location is unknown or must be validated. The skill involves opening, inspecting, and closing receptacles to assess their suitability.+---+# Skill: Storage Explorer++## When to Use+Activate this skill when:+1. You have an object that needs to be stored/placed.+2. The exact target receptacle is unspecified or ambiguous.+3. You need to validate if a potential receptacle is appropriate before placing the object.++## Core Strategy+1. **Prioritize Exploration**: When the target location is unclear, systematically check available storage receptacles.+2. **Inspect Before Placing**: Always open and examine a receptacle's contents before deciding to place your object there.+3. **Maintain Environment State**: Close receptacles after inspection unless you're placing the object inside.++## Execution Pattern+Follow this decision flow:++### Phase 1: Initial Assessment+- Identify all potential storage receptacles in the environment (drawers, cabinets, etc.)+- If you already have the target object, proceed to Phase 2+- If you don't have the object, acquire it first (this skill focuses on storage exploration)++### Phase 2: Systematic Exploration+For each candidate receptacle:+1. **Navigate** to the receptacle+2. **Open** it (if closed)+3. **Observe** its contents+4. **Evaluate** suitability based on:+ - Current contents (are similar objects stored here?)+ - Available space+ - Logical categorization+5. **Close** the receptacle (unless placing object there)++### Phase 3: Decision Making+- If you find a clearly appropriate receptacle (e.g., contains similar objects), place your object there+- If no receptacle is clearly appropriate, choose based on:+ - Empty receptacles first+ - Proximity to related objects/areas+ - Consistency with environment patterns++## Key Considerations+- **Efficiency**: Don't explore receptacles that are clearly inappropriate (e.g., refrigerator for non-food items)+- **Context Clues**: Look for environmental hints about storage organization+- **Task Requirements**: Consider if the object needs special conditions (clean, cooled, heated)++## Error Handling+- If "Nothing happened" when trying to open/close, the receptacle might be locked or broken+- If unable to place object in a receptacle, try alternative locations+- If all exploration fails, reconsider your understanding of "appropriate" storage++## Output Format+Maintain the standard action format:diff --git a/experiments/src/skills/alfworld/alfworld-storage-explorer/references/storage_heuristics.md b/experiments/src/skills/alfworld/alfworld-storage-explorer/references/storage_heuristics.mdnew file mode 100644index 0000000..8cb4650--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-storage-explorer/references/storage_heuristics.md@@ -0,0 +1,67 @@+# Storage Heuristics for Household Environments++## Common Storage Patterns++### Kitchen Areas+- **Cutlery**: Drawers near preparation areas (countertops, sink)+- **Utensils**: Drawers containing spoons, forks likely also store knives+- **Food Items**: Cabinets, refrigerator, countertops+- **Cookware**: Cabinets near stove, drawers for small tools++### Living/Bedroom Areas+- **Personal Items**: Drawers in furniture, cabinets+- **Electronics**: Specific shelves or cabinets+- **Clothing**: Designated drawers or closets++## Decision Factors++### 1. Content Similarity+- Place objects with similar existing items+- Group by function (cutlery together, cookware together)+- Group by material (glass with glass, metal with metal)++### 2. Spatial Logic+- Store near where objects are used+- Keep related objects accessible together+- Consider workflow patterns++### 3. Environmental Constraints+- Clean items in clean storage+- Food items in food-safe areas+- Dangerous items in secure locations++## Exploration Priority Matrix++| Receptacle Type | Priority for General Storage | Special Considerations |+|----------------|-----------------------------|------------------------|+| Empty drawers | High | First choice for most items |+| Drawers with similar items | High | Best for categorization |+| Cabinets | Medium | Good for larger items |+| Countertops | Low | Temporary storage only |+| Specialized (fridge, oven) | Very Low | Only for specific items |++## Quick Reference: Common Object Categories++### High-Frequency Kitchen Items+- **Cutlery**: Check drawers first, especially those containing other utensils+- **Plates/Bowls**: Cabinets near dining areas+- **Cooking Tools**: Drawers near stove, hanging racks+- **Food**: Refrigerator (perishable), cabinets (non-perishable)++### General Household Items+- **Cleaning Supplies**: Under sink, specific cabinets+- **Tools**: Designated drawers or boxes+- **Documents**: Desks, filing cabinets++## When to Stop Exploring+Stop and place the object when:+1. You find a receptacle containing identical/similar objects+2. You've checked all logical candidates+3. Time/action constraints require a decision+4. Environmental clues strongly suggest a location++## Fallback Strategies+If no ideal location found:+1. Choose the cleanest empty receptacle+2. Place near related objects (on same surface)+3. Return to original location (if temporary task)diff --git a/experiments/src/skills/alfworld/alfworld-task-verifier/SKILL.md b/experiments/src/skills/alfworld/alfworld-task-verifier/SKILL.mdnew file mode 100644index 0000000..05d14e2--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-task-verifier/SKILL.md@@ -0,0 +1,30 @@+---+name: alfworld-task-verifier+description: This skill checks the current state against the task goal to determine if the objective has been met or if further actions are needed. It is triggered after completing a key sub-action, such as placing an object, to assess progress. The skill evaluates the observation feedback and the remaining requirements, outputting a decision to either continue searching for missing items or conclude the task.+---+# Instructions++Use this skill to verify task progress in an ALFWorld household environment. The skill is triggered after a key sub-action (e.g., `put {obj} in/on {recep}`) is performed.++## 1. Input Analysis+- **Input:** The most recent `Observation:` from the environment following an action.+- **Task Goal:** The original, full task description (e.g., "find two pen and put them in garbagecan").++## 2. Verification Logic+Analyze the observation to determine if the task's goal conditions are satisfied.+1. **Parse the Goal:** Identify the target object(s) and the target receptacle from the task description.+2. **Check the Observation:** Scrutinize the observation text for evidence that the required objects are present in the target receptacle.+ - Positive evidence: Phrases like `"you see a pen 3"` located `"in/on the garbagecan 1"`.+ - The presence of other items in the receptacle does not invalidate success.+3. **Make a Decision:**+ - **Task Complete:** If the observation confirms all required objects are in the target receptacle. Output: `"Verification: Task complete. No further action needed."`+ - **Continue Task:** If the observation shows some, but not all, required objects are in the target receptacle, or if the target object was just placed elsewhere. Output: `"Verification: Task incomplete. Continue searching for [missing object(s)]."`+ - **Action Invalid/No Change:** If the observation is `"Nothing happened"` or does not reflect the intended outcome of the last action. Output: `"Verification: Last action was ineffective. Re-assess and try a different approach."`++## 3. Output+Output only the verification decision in the specified format. Do not output the next action. This skill informs the planning for the *next* action.++**Example Outputs:**+- `Verification: Task complete. No further action needed.`+- `Verification: Task incomplete. Continue searching for pen 2.`+- `Verification: Last action was ineffective. Re-assess and try a different approach.`diff --git a/experiments/src/skills/alfworld/alfworld-task-verifier/references/task_grammar.md b/experiments/src/skills/alfworld/alfworld-task-verifier/references/task_grammar.mdnew file mode 100644index 0000000..421e753--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-task-verifier/references/task_grammar.md@@ -0,0 +1,53 @@+# ALFWorld Task Grammar Reference++This document outlines common patterns in ALFWorld task descriptions to aid in parsing.++## Core Task Structure+Most tasks follow this pattern:+`[Action Phrase] [Object Phrase] and [Placement Phrase] [Receptacle Phrase]`++### 1. Action Phrase+- `find` (e.g., "find two pen")+- `put` (e.g., "put the mug")+- `take` (e.g., "take a book")+- `clean` (e.g., "clean the plate")+- `heat`/`cool` (e.g., "heat the potato")++### 2. Object Phrase+- **Quantity + Object:** `two pen`, `a mug`, `an apple`, `the book`+- **With Identifier:** `pen 1`, `mug 2`, `apple 3`+- **Compound Objects:** `two pen and a pencil` (multiple objects)++### 3. Placement Phrase+- `put in/on`+- `place in/on`+- `put them in/on` (when referring to previously mentioned objects)++### 4. Receptacle Phrase+- `garbagecan`+- `sidetable`+- `drawer`+- `diningtable`+- Often includes identifier: `garbagecan 1`, `sidetable 2`++## Common Task Examples+1. **Simple Placement:** "put the mug on the sidetable"+ - Objects: ["mug"]+ - Receptacle: "sidetable"++2. **Find and Place Multiple:** "find two pen and put them in garbagecan"+ - Objects: ["pen"] (quantity: 2)+ - Receptacle: "garbagecan"++3. **Compound Objects:** "find a pen and a pencil and put them in drawer 1"+ - Objects: ["pen", "pencil"]+ - Receptacle: "drawer 1"++4. **Action with Tool:** "clean the plate with soap"+ - Objects: ["plate"]+ - Tool: "soap" (not a receptacle for placement)++## Parsing Guidelines+- **Object Identification:** The base object name (e.g., "pen") is more important than the instance number ("pen 3") for goal tracking. The goal is usually satisfied by any instance of the object type.+- **Receptacle Context:** The observation text must be analyzed in conjunction with the agent's location. An object listed in an observation is typically in the receptacle the agent is currently at or interacting with.+- **Success Condition:** All target object types must be present in the target receptacle. The specific instance IDs (e.g., "pen 2" vs "pen 3") do not matter unless specified in the goal (rare).diff --git a/experiments/src/skills/alfworld/alfworld-task-verifier/references/verification_examples.md b/experiments/src/skills/alfworld/alfworld-task-verifier/references/verification_examples.mdnew file mode 100644index 0000000..339887e--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-task-verifier/references/verification_examples.md@@ -0,0 +1,42 @@+# Verification Examples++Use these examples to understand how the skill should interpret observations.++## Scenario: Task is "find two pen and put them in garbagecan."++### Example 1: After first successful placement+- **Observation:** "You put the pen 3 in/on the garbagecan 1."+- **Verification:** "Verification: Task incomplete. Continue searching for pen."+- **Reasoning:** One pen is in the garbage can, but the goal requires two.++### Example 2: After second successful placement+- **Observation:** "On the garbagecan 1, you see a cd 1, and a pen 3." (Agent is at garbagecan after placing pen 2)+- **Verification:** "Verification: Task complete. No further action needed."+- **Reasoning:** Both pens (instances 2 and 3) are now in the target receptacle. The CD's presence is irrelevant.++### Example 3: After checking empty sidetable+- **Observation:** "On the sidetable 1, you see a tissuebox 1."+- **Verification:** "Verification: Task incomplete. Continue searching for pen."+- **Reasoning:** No pens are observed at this location. The search must continue.++### Example 4: Invalid action+- **Observation:** "Nothing happened."+- **Verification:** "Verification: Last action was ineffective. Re-assess and try a different approach."+- **Reasoning:** The previous action failed and must be reconsidered.++## Scenario: Task is "put the mug on the sidetable."++### Example 5: Success+- **Observation:** "You put the mug 1 in/on the sidetable 2."+- **Verification:** "Verification: Task complete. No further action needed."+- **Reasoning:** The single required object is on a sidetable (instance 2 satisfies "the sidetable").++### Example 6: Wrong receptacle+- **Observation:** "You put the mug 1 in/on the diningtable 1."+- **Verification:** "Verification: Task incomplete. Continue searching for sidetable."+- **Reasoning:** The mug is placed, but not on the specified receptacle type.++## Key Principles+1. **Presence over Purity:** A receptacle containing the target objects plus other items still satisfies the goal.+2. **Type over Instance:** "Pen" refers to the object type. Any pen instance (pen 1, pen 2, etc.) fulfills the requirement for that object type.+3. **Context is Key:** The observation text must be read in the context of the agent's last action and location. An object listed in an observation is typically at the agent's current location.diff --git a/experiments/src/skills/alfworld/alfworld-temperature-regulator/SKILL.md b/experiments/src/skills/alfworld/alfworld-temperature-regulator/SKILL.mdnew file mode 100644index 0000000..6d9ea39--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-temperature-regulator/SKILL.md@@ -0,0 +1,29 @@+---+name: alfworld-temperature-regulator+description: This skill manages the temperature state of an object by placing it into an appropriate environment (e.g., fridge for cooling, microwave for heating). It should be triggered when the task requires modifying an object's temperature property, such as cooling bread or heating food. The skill requires the object identifier and the target temperature-modifying receptacle as inputs and confirms the object's placement for the intended thermal effect.+---+# Instructions+This skill executes a sequence to change an object's temperature by placing it in a specific receptacle (e.g., fridge for cooling, microwave for heating) and then relocating it to a final target location.++## 1. Input Validation & Planning+* **Inputs Required:** The `object` identifier (e.g., `bread 1`) and the `temperature_receptacle` identifier (e.g., `fridge 1` for cooling, `microwave 1` for heating). The final `target_receptacle` (e.g., `diningtable 1`) is also required.+* **Verify** the provided object and receptacles exist in the agent's current observation. If not, the agent must first navigate to locate them.+* **Plan** the sequence: Locate object -> Pick up object -> Navigate to temperature receptacle -> Open it (if closed) -> Place object inside -> Close receptacle (optional, based on environment feedback) -> Navigate to target receptacle -> Place object there.++## 2. Execution Sequence+Follow this core logic. Use deterministic scripts for error-prone steps (see `scripts/`).+1. **Acquire Object:** `go to` the object's location, then `take {object} from {recep}`.+2. **Apply Temperature Effect:**+ * `go to {temperature_receptacle}`.+ * If the receptacle is reported as "closed", `open {temperature_receptacle}`.+ * `put {object} in/on {temperature_receptacle}`.+ * (Optional) `close {temperature_receptacle}` if the environment or task logic suggests it (e.g., maintaining fridge temperature).+3. **Deliver Object:** `go to {target_receptacle}`, then `put {object} in/on {target_receptacle}`.++## 3. Error Handling & Observations+* If an action results in "Nothing happened", consult the troubleshooting guide in `references/troubleshooting.md`.+* Always verify the state change after each action (e.g., "You pick up...", "You open...", "You put...").+* If the object is not at the expected location, pause execution and re-scan the environment.++## 4. Completion+The skill is complete when the object has been placed into the `temperature_receptacle` and subsequently placed onto the `target_receptacle`. Confirm the final observation states the object is on the target.diff --git a/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/action_spec.md b/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/action_spec.mdnew file mode 100644index 0000000..58673ec--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/action_spec.md@@ -0,0 +1,19 @@+# ALFWorld Action Specification+This document details the exact action grammar the agent must use.++## Available Actions+The agent can ONLY use actions from this list. `{obj}` and `{recep}` must be replaced with exact identifiers from observations.++1. `go to {recep}`+2. `take {obj} from {recep}`+3. `put {obj} in/on {recep}`+4. `open {recep}`+5. `close {recep}`+6. `toggle {obj} {recep}`+7. `clean {obj} with {recep}`+8. `heat {obj} with {recep}`+9. `cool {obj} with {recep}`++## Formatting Rules+* **Output Format:** Every agent response must be:+\ No newline at end of filediff --git a/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/troubleshooting.md b/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/troubleshooting.mdnew file mode 100644index 0000000..249fc4f--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-temperature-regulator/references/troubleshooting.md@@ -0,0 +1,22 @@+# Troubleshooting Guide: Temperature Regulation++## Common Issues & Solutions++### 1. Action Results in "Nothing happened"+* **Object not found:** The `{obj}` or `{recep}` in your action may not be visible or may have a different identifier (e.g., `bread 2` instead of `bread 1`). Re-examine the latest observation list.+* **Invalid syntax:** Ensure your action string exactly matches the available action format (e.g., `take bread 1 from countertop 2`, not `pick up bread`).+* **Precondition not met:** You cannot `take` an object you are not near. You cannot `put` an object in a receptacle that is closed. Always `go to` the relevant location first and `open` closed receptacles.++### 2. Receptacle is Already Open/Closed+* If you try to `open` an already open receptacle, it may yield "Nothing happened". Check the observation text (e.g., "The fridge 1 is open."). Skip the `open` action if already open.+* Similarly, only `close` a receptacle if it was explicitly opened during this skill execution and the task logic requires it.++### 3. Object Not at Expected Initial Location+* The trajectory showed `bread 1` on `countertop 2`. This may not always be true.+* **Solution:** If the object is not at the planned location, you must first find it. Use the `go to` action to search common receptacles mentioned in the initial observation (e.g., other countertops, shelves, diningtable, cabinets). The skill must be flexible to this variation.++### 4. Heating vs. Cooling Logic+* **Cooling:** Use `fridge 1`. Sequence: `open fridge` -> `put object in` -> `close fridge`.+* **Heating:** Use `microwave 1`. Sequence: `open microwave` -> `put object in` -> `close microwave` -> `toggle microwave microwave`. The `toggle` action may be needed to start the heating process. Check the environment's action list and feedback.++## Flowchart for Robust Executiondiff --git a/experiments/src/skills/alfworld/alfworld-tool-locator/SKILL.md b/experiments/src/skills/alfworld/alfworld-tool-locator/SKILL.mdnew file mode 100644index 0000000..ebb8771--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-locator/SKILL.md@@ -0,0 +1,37 @@+---+name: alfworld-tool-locator+description: This skill searches for a specified tool or device (e.g., a desklamp) within the environment by checking relevant surfaces. It should be triggered when the agent needs a tool to interact with another object as part of the task. The skill takes a tool name as implicit input and outputs navigation actions to likely storage spots (e.g., sidetables, shelves) until the tool is found.+---+# Skill: Tool Locator++## Purpose+Search for a specified tool or device in an ALFWorld household environment by systematically checking relevant receptacles.++## When to Use+Trigger this skill when:+1. You have identified a need for a specific tool (e.g., "desklamp", "knife", "sponge") to complete a task.+2. The tool is not currently in your inventory or immediate vicinity.+3. You need to locate the tool before proceeding with the main task.++## Input (Implicit)+- **Tool Name**: The name of the tool/device to locate (e.g., "desklamp", "book", "remotecontrol").++## Core Logic+1. **Identify Search Targets**: Based on the tool type, prioritize likely storage locations:+ - For small tools/electronics: `sidetable`, `drawer`, `shelf`+ - For kitchen tools: `countertop`, `cabinet`, `fridge`+ - For cleaning tools: `shelf`, `cabinet`, `garbagecan`+ - Default: Check all visible receptacles in order++2. **Systematic Search Pattern**:+ - Navigate to each prioritized receptacle+ - Observe what's on/in the receptacle+ - If tool is found, stop searching and proceed to use it+ - If not found, continue to next receptacle++3. **Error Handling**:+ - If "Nothing happened" is observed, try alternative actions+ - If tool not found after checking all likely spots, expand search to all receptacles++## Output Format+Follow the ALFWorld action format:diff --git a/experiments/src/skills/alfworld/alfworld-tool-locator/references/alfworld_actions.md b/experiments/src/skills/alfworld/alfworld-tool-locator/references/alfworld_actions.mdnew file mode 100644index 0000000..7cfdbc6--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-locator/references/alfworld_actions.md@@ -0,0 +1,41 @@+# ALFWorld Action Reference++## Available Actions+The ALFWorld environment supports the following action types:++### Navigation & Interaction+1. `go to {recep}` - Move to a receptacle+2. `take {obj} from {recep}` - Pick up an object from a receptacle+3. `put {obj} in/on {recep}` - Place an object in/on a receptacle+4. `open {recep}` - Open a receptacle+5. `close {recep}` - Close a receptacle+6. `toggle {obj} {recep}` - Toggle an object (e.g., switch)+7. `clean {obj} with {recep}` - Clean an object using a receptacle+8. `heat {obj} with {recep}` - Heat an object using a receptacle+9. `cool {obj} with {recep}` - Cool an object using a receptacle++## Observation Format+After each action, the environment returns an observation:+- Success: "You [action] the [object]"+- Failure: "Nothing happened"+- Description: "On the [recep], you see [object1], [object2], ..."++## Common Receptacle Types+- **Surfaces**: sidetable, countertop, table, shelf, desk+- **Storage**: drawer, cabinet, fridge, microwave+- **Furniture**: sofa, armchair, bed, toilet+- **Containers**: garbagecan, box, basket++## Tool Naming Conventions+Tools in ALFWorld typically follow these naming patterns:+- `{toolname} {number}` - e.g., "desklamp 1", "knife 2"+- Common tools: desklamp, knife, spoon, book, remotecontrol, cellphone+- Cleaning tools: sponge, cloth, towel++## Search Strategy Guidelines+1. **Prioritize likely locations**: Tools are often found on surfaces near their use context+2. **Check systematically**: Don't skip receptacles+3. **Handle failures gracefully**: If "Nothing happened", try different approach+4. **Use observations**: The observation tells you what's visible at a location++## Example Task Flowdiff --git a/experiments/src/skills/alfworld/alfworld-tool-locator/references/tool_categories.md b/experiments/src/skills/alfworld/alfworld-tool-locator/references/tool_categories.mdnew file mode 100644index 0000000..4f99650--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-locator/references/tool_categories.md@@ -0,0 +1,73 @@+# Tool Categories and Likely Locations++## Electronics Category+**Tools**: desklamp, remotecontrol, cellphone, laptop, tablet, television+**Likely Locations**:+- Primary: sidetable, desk, shelf+- Secondary: drawer, cabinet+- Tertiary: sofa, armchair, bed++**Search Priority**:+1. Check all sidetables in the room+2. Check desks and shelves+3. Check drawers near seating areas+4. Check other surfaces++## Kitchen Tools Category+**Tools**: knife, spoon, fork, plate, bowl, cup, mug, pan, pot, spatula+**Likely Locations**:+- Primary: countertop, cabinet+- Secondary: fridge, microwave, drawer+- Tertiary: diningtable, shelf++**Search Priority**:+1. Check kitchen countertops+2. Check cabinets (especially lower ones)+3. Check drawers labeled for utensils+4. Check fridge for food-related items++## Cleaning Tools Category+**Tools**: sponge, cloth, towel, broom, mop, spraybottle, soap+**Likely Locations**:+- Primary: shelf, cabinet+- Secondary: countertop, drawer+- Tertiary: garbagecan, sink++**Search Priority**:+1. Check cleaning supply shelves+2. Check under-sink cabinets+3. Check utility drawers+4. Check near sinks and garbage cans++## Reading/Writing Category+**Tools**: book, newspaper, magazine, pen, pencil, paper+**Likely Locations**:+- Primary: sidetable, desk, shelf+- Secondary: drawer, cabinet+- Tertiary: sofa, armchair++**Search Priority**:+1. Check desks and sidetables+2. Check bookshelves+3. Check drawers in study areas+4. Check seating areas++## General Search Heuristics+1. **Context Matters**: Tools are usually stored near where they're used+2. **Size Considerations**: Small tools on surfaces, larger tools in storage+3. **Frequency of Use**: Frequently used tools are more accessible+4. **Room Type**: Different rooms have different tool distributions++## Cross-Category Tools+Some tools may belong to multiple categories:+- **Scissors**: Could be in kitchen (utensil drawer) or office (desk drawer)+- **Flashlight**: Could be electronics (sidetable) or utility (drawer)+- **Keys**: Could be on sidetable, in drawer, or on hook++## Search Fallback Strategy+When uncertain about tool category:+1. Check all sidetables and surfaces+2. Check all drawers+3. Check all shelves+4. Check all cabinets+5. Check furniture surfaces (sofa, armchair, bed)diff --git a/experiments/src/skills/alfworld/alfworld-tool-user/SKILL.md b/experiments/src/skills/alfworld/alfworld-tool-user/SKILL.mdnew file mode 100644index 0000000..f7d5127--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-user/SKILL.md@@ -0,0 +1,12 @@+---+name: alfworld-tool-user+description: This skill uses a tool on a target object to accomplish a specific interaction, such as examining, cleaning, or manipulating. It should be triggered when both the object and the required tool are in the agent's possession or within reach. The skill takes the tool and object as implicit inputs and executes the appropriate interaction action (e.g., 'use', 'clean', 'heat') to progress the task.+---+# Instructions+1. **Objective:** Use a specified tool on a target object to complete a task (e.g., examine, clean, heat).+2. **Prerequisites:** The agent must have the target object in its inventory or be at its location. The required tool must be accessible (in inventory or on a nearby receptacle).+3. **Procedure:**+ a. **Locate Target:** Navigate to and acquire the target object if not already held.+ b. **Locate Tool:** Navigate to and identify the required tool.+ c. **Execute Interaction:** Perform the environment-specific action to apply the tool to the object (e.g., `use {tool}`, `clean {obj} with {tool}`). The exact action verb is determined by the task context.+4. **Error Handling:** If an action fails (e.g., "Nothing happened"), reassess the object/tool state and location before retrying or attempting an alternative approach.diff --git a/experiments/src/skills/alfworld/alfworld-tool-user/references/action_reference.md b/experiments/src/skills/alfworld/alfworld-tool-user/references/action_reference.mdnew file mode 100644index 0000000..daf89f8--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-user/references/action_reference.md@@ -0,0 +1,30 @@+# Action Reference for Tool-Based Tasks++## Core Action Templates+The following action formats are available for tool-based interactions in the ALFWorld environment:++1. `use {tool}` - Apply a tool to a held object or the immediate environment.+2. `clean {obj} with {tool}`+3. `heat {obj} with {tool}`+4. `cool {obj} with {tool}`+5. `toggle {obj} {recep}` (for tools integrated into receptacles)++## Skill-Specific Mapping+| Task Goal | Target Object | Tool | Appropriate Final Action |+| :----------------------------- | :------------ | :------------ | :----------------------- |+| "examine the X with the Y" | X (e.g., pillow) | Y (e.g., desklamp) | `use {tool}` |+| "clean the X with the Y" | X | Y | `clean {obj} with {tool}`|+| "heat the X with the Y" | X | Y | `heat {obj} with {tool}` |+| "cool the X with the Y" | X | Y | `cool {obj} with {tool}` |++## Prerequisite Actions+Before the final tool interaction, the following navigation and manipulation actions are typically required:+- `go to {recep}` - Move to the location of the object or tool.+- `take {obj} from {recep}` - Acquire the target object.+- `open {recep}` - May be needed to access a tool or object.++## Error Signal+- **"Nothing happened"**: Indicates an invalid action. Common causes:+ - Tool or object not in agent's inventory.+ - Not at the correct location.+ - Using the wrong interaction verb for the task.diff --git a/experiments/src/skills/alfworld/alfworld-tool-user/references/trajectory_example.md b/experiments/src/skills/alfworld/alfworld-tool-user/references/trajectory_example.mdnew file mode 100644index 0000000..1c3687c--- /dev/null+++ b/experiments/src/skills/alfworld/alfworld-tool-user/references/trajectory_example.md@@ -0,0 +1,22 @@+# Example Trajectory: Examine Pillow with Desklamp++This document breaks down the provided execution trajectory to illustrate the skill's logic.++## Trajectory Steps+1. **Goal:** "examine the pillow with the desklamp."+2. **Step 1 (Locate Object):** `go to sofa 1` -> No pillow found.+3. **Step 2 (Locate Object):** `go to armchair 1` -> `pillow 1` found.+4. **Step 3 (Acquire Object):** `take pillow 1 from armchair 1` -> Success.+5. **Step 4 (Locate Tool):** `go to sidetable 1` -> `desklamp 1` found.+6. **Step 5 (Execute Interaction):** `use desklamp 1` -> (Implied success).++## Key Inferences for Skill Design+- **Object First:** The agent prioritizes finding and acquiring the *target object* (`pillow`) before seeking the *tool* (`desklamp`).+- **Tool Location:** Tools are typically found on surfaces like `sidetable`, `shelf`, or `drawer`.+- **Final Action:** The verb `use` is applied directly to the tool when the context is "examine X with Y".+- **Error Handling:** The agent seamlessly switches search locations (`sofa` -> `armchair`) upon not finding the object.++## Abstracted Skill Flow+1. **Acquire Target:** `Navigate -> [Search Receptacles] -> Take Object`+2. **Locate Tool:** `Navigate -> Identify Tool`+3. **Interact:** `Perform({interaction_verb}, {tool})`diff --git a/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/SKILL.mdnew file mode 100644index 0000000..be41e59--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/SKILL.md@@ -0,0 +1,28 @@+---+name: scienceworld-ambiguous-action-resolution+description: Resolves system ambiguity prompts by selecting the appropriate action from numbered options. Trigger this skill when the environment presents multiple identical action possibilities and requires explicit selection. This ensures task progression when the system cannot automatically disambiguate identical object instances.+---+# Skill: Ambiguous Action Resolution++## When to Use+Activate this skill **only** when the environment returns an "Ambiguous request" observation with a numbered list of identical action options. This typically occurs when multiple identical object instances exist (e.g., five identical banana seeds in a jar) and the system cannot determine which specific instance you intend to act upon.++## Core Procedure+1. **Identify the Ambiguity:** Recognize the prompt format: `"Ambiguous request: Please enter the number for the action you intended (or blank to cancel):"` followed by a numbered list (0, 1, 2...).+2. **Parse the Options:** Quickly scan the listed options. They will be functionally identical but refer to different instances of the same object.+3. **Select a Number:** Choose the **lowest available number** (typically `0`) to proceed. The specific instance is irrelevant for task completion; any valid selection will satisfy the system's requirement and allow the action to execute.+4. **Execute:** Output the selected number as the next action (e.g., `Action: 0`).++## Key Principles+* **Efficiency:** Do not overthink. The objects are identical; any choice is valid.+* **Consistency:** Always default to the first option (`0`) unless a previous step in the task logic specifically requires targeting a different instance (which is rare).+* **Focus:** This skill is a **disambiguation mechanic**, not a decision-making process. Its sole purpose is to bypass a system prompt blocking progress.++## Example from Trajectory+**Observation:** "Ambiguous request: Please enter the number for the action you intended (or blank to cancel): 0: move banana seed (in seed jar, in inventory, in agent, in greenhouse) to flower pot 1 (in greenhouse) 1: move banana seed (in seed jar, in inventory, in agent, in greenhouse) to flower pot 1 (in greenhouse) ..."+**Correct Skill Application:** `Action: 0`++## Anti-Patterns to Avoid+* Do NOT use this skill for non-ambiguous choices or menu selections where options have different meanings.+* Do NOT trigger this skill if the observation does not contain the exact "Ambiguous request" phrase.+* Do NOT waste steps analyzing the differences between identical instances.diff --git a/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/references/trajectory_examples.md b/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/references/trajectory_examples.mdnew file mode 100644index 0000000..e646663--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-ambiguous-action-resolution/references/trajectory_examples.md@@ -0,0 +1,6 @@+# Trajectory Examples for Ambiguous Action Resolution++This document contains real examples from the skill's development trajectory. Use it for reference to recognize the precise pattern of system ambiguity prompts.++## Pattern Recognition+The ambiguity prompt always follows this structure:diff --git a/experiments/src/skills/scienceworld/scienceworld-animal-identifier/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-animal-identifier/SKILL.mdnew file mode 100644index 0000000..ad14d31--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-animal-identifier/SKILL.md@@ -0,0 +1,23 @@+---+name: scienceworld-animal-identifier+description: This skill identifies and focuses on specific animals or biological entities present in the environment. It should be triggered when the task requires examining, comparing, or interacting with animals, such as determining lifespan attributes. The skill takes an animal identifier as input and outputs a confirmation of focus, aiding in targeted analysis for scientific experiments or comparisons.+---+# Instructions++## Purpose+This skill enables the agent to locate and focus on a specified animal or biological entity within the ScienceWorld environment. It is designed for tasks involving animal comparison, examination, or interaction, such as determining lifespan extremes.++## Core Workflow+1. **Locate Target Environment:** If the target animal is known to be in a specific location (e.g., 'outside'), teleport there first.+2. **Survey the Area:** Use `look around` to list all visible objects and entities in the current location.+3. **Identify Target:** Parse the observation to find the specified animal identifier (e.g., 'parrot egg', 'baby dragonfly').+4. **Execute Focus:** Use the `focus on <ANIMAL>` action to signal intent on the identified target object.++## Key Principles+* **Context-Aware Navigation:** Always verify your current location. If you are not in the correct room for the target animal, use `teleport to <LOCATION>` as the first step.+* **Precise Targeting:** The `focus on` action requires the exact object name as it appears in the `look around` observation (e.g., "baby dragonfly", not just "dragonfly").+* **Sequential Execution:** This skill is often used in a sequence (e.g., find longest-lived, then shortest-lived animal). Complete the focus action for one target before proceeding to the next.++## Input/Output+* **Input:** An animal identifier or a task description implying the need to identify/focus on an animal (e.g., "find the animal with the longest life span").+* **Output:** A confirmation that the `focus on <ANIMAL>` action has been successfully executed on the correct target.diff --git a/experiments/src/skills/scienceworld/scienceworld-animal-identifier/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-animal-identifier/references/action_primer.mdnew file mode 100644index 0000000..0358ba7--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-animal-identifier/references/action_primer.md@@ -0,0 +1,28 @@+# Action Primer for Animal Identification++## Essential Actions+The following actions from the ScienceWorld environment are core to this skill's execution.++### `teleport to <LOCATION>`+* **Purpose:** Instantly move the agent to a named room.+* **Usage:** Critical for initial positioning. Always use if the target animal is known to be elsewhere.+* **Example:** `teleport to outside`++### `look around`+* **Purpose:** Describes the current room and lists all objects, containers, and entities within it.+* **Usage:** The primary method for discovering what animals are present. Must be executed in the target location.+* **Output Format:** Lists items like `a baby dragonfly`, `a parrot egg`, `a baby wolf`.++### `focus on <OBJECT>`+* **Purpose:** Signals the agent's intent to work on a specific task-relevant object.+* **Usage:** The final step of the skill. The `<OBJECT>` must match the name from the `look around` observation exactly.+* **Example:** `focus on parrot egg`+* **Note:** This action does not physically manipulate the object but marks it for subsequent task steps.++## Observation Parsing Guide+When you receive an observation from `look around`, scan for lines containing biological entities. Common patterns include:+* `a/an <descriptor> <animal>` (e.g., `a baby dragonfly`)+* `a/an <animal> egg` (e.g., `a parrot egg`)+* `a substance called <name>` (Typically not an animal)++Ignore non-biological items like furniture (`a chair`), tools (`an axe`), and generic substances (`air`, `water`).diff --git a/experiments/src/skills/scienceworld/scienceworld-circuit-builder/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-circuit-builder/SKILL.mdnew file mode 100644index 0000000..4e0129c--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-circuit-builder/SKILL.md@@ -0,0 +1,44 @@+---+name: scienceworld-circuit-builder+description: This skill constructs a simple electrical circuit by connecting components like batteries, wires, and light bulbs. It should be triggered when the agent needs to test electrical conductivity or create a functional circuit for an experiment. The input is a set of available components, and the output is a fully connected circuit ready for activation.+---+# Instructions++## 1. Objective+Your goal is to build a functional electrical circuit to test the conductivity of a target object (e.g., a metal pot). The circuit's success is indicated by a light bulb turning on.++## 2. Prerequisites & Setup+* **Location:** You must be in the **workshop**. If not, teleport there.+* **Components:** Ensure the following are present on the table:+ * A battery+ * A light bulb (e.g., blue light bulb)+ * At least two wires (e.g., orange, yellow, green)+ * The target object to test (e.g., metal pot)+ * A blue box (for conductive objects) and an orange box (for non-conductive objects)+* **Inventory:** The target object must be in your inventory. If not, locate and pick it up.++## 3. Core Procedure+Follow these steps to construct the series circuit. Use the exact `connect` actions as shown.++1. **Place the Target Object:** Drop the target object from your inventory onto the floor of the workshop.+2. **Connect Power Source:**+ * `connect battery anode to <Wire1> terminal 1` (e.g., `orange wire`)+ * `connect battery cathode to <Wire2> terminal 1` (e.g., `yellow wire`)+3. **Connect Light Bulb:**+ * `connect <Wire1> terminal 2 to <LightBulb> cathode` (e.g., `blue light bulb`)+ * `connect <Wire3> terminal 2 to anode in <LightBulb>` (e.g., `green wire`)+4. **Integrate Target Object into Circuit:**+ * `connect <TargetObject> terminal 1 to <Wire2> terminal 2`+ * `connect <TargetObject> terminal 2 to <Wire3> terminal 1`++## 4. Testing & Conclusion+1. **Observe:** After completing the connections, `wait1` for 1-2 iterations.+2. **Check Result:** `look around`. If the light bulb is **on**, the target object is **electrically conductive**.+3. **Final Action:** Based on the result:+ * If **conductive**: `move <TargetObject> to blue box`+ * If **non-conductive**: `move <TargetObject> to orange box`++## 5. Key Principles+* **Circuit Logic:** This builds a simple series circuit: Battery -> Wire1 -> Light Bulb -> Wire3 -> Target Object -> Wire2 -> Battery.+* **Action Precision:** Use the exact object names and connection points (anode, cathode, terminal 1/2) as observed in the environment.+* **Error Handling:** If a component is missing, examine the room (`look around`) to identify available substitutes before proceeding.diff --git a/experiments/src/skills/scienceworld/scienceworld-circuit-builder/references/circuit_schematic.md b/experiments/src/skills/scienceworld/scienceworld-circuit-builder/references/circuit_schematic.mdnew file mode 100644index 0000000..530e4e4--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-circuit-builder/references/circuit_schematic.md@@ -0,0 +1,3 @@+# Circuit Schematic & Theory++## Schematic for Conductivity Testdiff --git a/experiments/src/skills/scienceworld/scienceworld-circuit-connector/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-circuit-connector/SKILL.mdnew file mode 100644index 0000000..87e8604--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-circuit-connector/SKILL.md@@ -0,0 +1,31 @@+---+name: scienceworld-circuit-connector+description: This skill connects two electrical components (e.g., wires, batteries, devices) by their terminals to build or modify a circuit. It should be triggered when constructing electrical setups for testing, such as conductivity checks or device activation. The input includes two component identifiers and their connection points, and the output is an established electrical connection.+---+# Instructions++## Primary Action+Execute the `connect OBJ to OBJ` action. The syntax is `connect <ComponentA> <TerminalA> to <ComponentB> <TerminalB>`.++## When to Use+Use this skill when you need to establish an electrical connection between two components as part of building a circuit for testing or device operation. Common scenarios include:+* Building a circuit to test a material's conductivity.+* Connecting a power source (battery) to a load (light bulb, buzzer).+* Integrating a switch or sensor into a circuit.++## Procedure+1. **Identify Components:** Locate the two components you need to connect (e.g., `battery`, `black wire`, `unknown substance M`, `electric buzzer`).+2. **Identify Terminals:** Examine the components if necessary to determine their available connection points (e.g., `anode`, `cathode`, `terminal 1`, `terminal 2`).+3. **Formulate Command:** Construct the `connect` command using the pattern: `connect <ComponentA> <TerminalA> to <ComponentB> <TerminalB>`.+ * Example from trajectory: `connect battery anode to black wire terminal 1`+4. **Execute:** Issue the command. A successful observation will confirm the connection (e.g., "`anode on battery is now connected to terminal 1 on black wire`").++## Key Principles+* **Circuit Logic:** Ensure your connections follow basic electrical principles. A typical series circuit path might be: Battery (+) -> Wire -> Device -> Wire -> Battery (-).+* **Verification:** After making connections, check the state of indicators (like lights or buzzers) or use the `examine` action on components to verify the circuit is complete and functional.+* **Error Handling:** If a connection fails, verify the component and terminal names are correct. Some terminals may only accept one connection.++## Related Skills+* For disconnecting components, use the `disconnect OBJ` action.+* To activate/deactivate a powered component in the circuit, use the `activate OBJ`/`deactivate OBJ` actions.+* Refer to `references/circuit_basics.md` for common circuit diagrams and troubleshooting.diff --git a/experiments/src/skills/scienceworld/scienceworld-circuit-connector/references/circuit_basics.md b/experiments/src/skills/scienceworld/scienceworld-circuit-connector/references/circuit_basics.mdnew file mode 100644index 0000000..406c65e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-circuit-connector/references/circuit_basics.md@@ -0,0 +1,29 @@+# Circuit Building Basics++## Common Components & Terminals+| Component | Typical Terminals | Notes |+| :--- | :--- | :--- |+| **Battery** | `anode` (positive, +), `cathode` (negative, -) | Power source. |+| **Wire** | `terminal 1`, `terminal 2` | Conducts current. Color is cosmetic. |+| **Light Bulb** | `anode`, `cathode` | Lights up when current flows. |+| **Buzzer** | `anode`, `cathode` | Sounds when current flows. |+| **Switch** | `terminal 1`, `terminal 2` | Must be `activate`d to close the circuit. |+| **Unknown Substance** | `terminal 1`, `terminal 2` | Device Under Test (DUT). Conductivity is unknown. |++## Standard Conductivity Test Circuit+This is the circuit built in the provided trajectory to test an unknown substance (M).+1. Connect `battery anode` to `black wire terminal 1`.+2. Connect `battery cathode` to `green wire terminal 1`.+3. Connect `black wire terminal 2` to `buzzer cathode`.+4. Connect `orange wire terminal 2` to `buzzer anode`.+5. Connect `unknown substance M terminal 1` to `green wire terminal 2`.+6. Connect `unknown substance M terminal 2` to `orange wire terminal 1`.++**Circuit Path:** Battery (+) -> Black Wire -> Buzzer -> Orange Wire -> Substance M -> Green Wire -> Battery (-).++**Interpretation:** If the substance is conductive, the circuit is complete, and the buzzer will activate (sound). If it is non-conductive, the circuit remains open, and the buzzer stays off.++## Troubleshooting+* **No Activation:** Ensure all connections are made correctly and the power source (battery) is functional. Verify the switch (if present) is activated.+* **Incorrect Terminal:** Double-check terminal names by using the `examine OBJ` action.+* **Disconnection:** Use `disconnect OBJ` to remove a specific connection from a component.diff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/SKILL.mdnew file mode 100644index 0000000..5e6fe69--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/SKILL.md@@ -0,0 +1,29 @@+---+name: scienceworld-conditional-box-placer+description: Moves an object to one of two destination containers based on a numeric threshold check. Trigger after a measurement (e.g., temperature) is taken. Place object in 'green' box if value > threshold, or 'blue' box if value < threshold.+---+# Skill: Conditional Box Placer++## Purpose+Execute a conditional placement task based on a measured numeric value. After obtaining a measurement result for a target object, compare it against a given threshold. Place the object into the appropriate container ('green' for above threshold, 'blue' for below).++## Core Workflow+1. **Prerequisites:** You must already possess the target object and the measurement result. You must also know the locations of the 'green box' and 'blue box'.+2. **Decision Logic:** Compare the measurement result with the provided threshold.+ - If `measurement_result > threshold`: Destination is the **green box**.+ - If `measurement_result < threshold`: Destination is the **green box**.+3. **Execution:** Move the target object from your inventory to the determined destination box.++## Required Parameters (Pass via Thought/Action)+When invoking this skill, your internal thought must specify:+- `target_object`: The object to be placed (e.g., "unknown substance B").+- `threshold`: The numeric value for comparison (e.g., 50.0).+- `measurement_result`: The measured value (e.g., 117).+- `green_box_location`: The room containing the green box (e.g., "bathroom").+- `blue_box_location`: The room containing the blue box (e.g., "bathroom").++## Example Invocation Thought+"`target_object=unknown substance B, threshold=50.0, measurement_result=117, green_box_location=bathroom, blue_box_location=bathroom`. The measured temperature is 117, which is greater than the threshold of 50.0. Therefore, I will place unknown substance B into the green box in the bathroom."++## Action Template+`move <target_object> in inventory to <green/blue> box`diff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/references/action_primer.mdnew file mode 100644index 0000000..71129ed--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-box-placer/references/action_primer.md@@ -0,0 +1,17 @@+# Action Primer for ScienceWorld Environment++## Relevant Actions for This Skill+- `teleport to <LOC>`: Move instantly to a named room.+- `look around`: Observe the current room and its contents.+- `pick up <OBJ>`: Take an object into your inventory.+- `use <OBJ> [on <OBJ>]`: Employ a tool (e.g., thermometer) on a target.+- `move <OBJ> to <OBJ>`: Transfer an object (from inventory) to a container.+- `focus on <OBJ>`: Signal intent on a task-relevant object.++## Key Object Types+- **Measurement Tools:** Objects like `thermometer` that yield a numeric reading.+- **Target Substances:** Objects like `unknown substance B` that require measurement.+- **Destination Containers:** `green box` and `blue box` for conditional placement.++## Common Room Names+- kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallwaydiff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/SKILL.mdnew file mode 100644index 0000000..d9553f3--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/SKILL.md@@ -0,0 +1,19 @@+---+name: scienceworld-conditional-focus-executor+description: Executes a 'focus' action on a specific object based on the outcome of a prior conditional evaluation. It should be triggered when task instructions specify focusing on different objects (e.g., different colored boxes) depending on a measurement result. The skill takes the conditional outcome as input and performs the corresponding focus action.+---+# Conditional Focus Executor++## Purpose+This skill automates the final step in a conditional measurement task within the ScienceWorld environment. After obtaining a measurement result (e.g., a temperature reading), you must focus on a specific object (e.g., a colored box) based on whether the result meets a defined threshold.++## When to Use+Use this skill **only** when:+1. You have completed a measurement (e.g., temperature, pH, mass).+2. The task instructions explicitly state a conditional rule (e.g., "If result > X, focus on A; if result < X, focus on B").+3. You have already determined the conditional outcome (True/False or the specific branch).++## Input Required+Before executing, you **must** have determined the correct conditional branch. The skill requires this as a clear decision.++**Required Input Format:**diff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/references/action_primer.mdnew file mode 100644index 0000000..685c5ee--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-focus-executor/references/action_primer.md@@ -0,0 +1,32 @@+# ScienceWorld Action Primer for Conditional Tasks++## Core Actions Used in Trajectory+* `teleport to <LOC>`: Move instantly to a named room.+* `look around`: Observe all objects and doors in the current room.+* `pick up <OBJ>`: Move a portable object into your inventory.+* `focus on <OBJ>`: Signal intent or completion on a task-relevant object. **This is the key action for this skill.**+* `move <OBJ> to <OBJ>`: Place an object inside a container or onto a surface.+* `activate <OBJ>`: Turn on a device (e.g., stove).+* `look at <OBJ>`: Inspect a specific object or container and its contents.+* `examine <OBJ>`: Get a detailed description of an object's state.+* `use <OBJ> on <OBJ>`: Employ a tool (e.g., thermometer) on a target.++## Object Interaction Patterns+1. **Finding Objects:** Use `look around` upon entering a room.+2. **Retrieving Objects:** If in an open container, `pick up` directly.+3. **Preparing Experiments:** Often involves `move` items to appropriate containers (pots, bowls) and then to devices (stove).+4. **Taking Measurements:** Use measurement tools (`use thermometer on chocolate`) on the target.+5. **Conditional Completion:** The final step is always `focus on <COLOR> box` based on the result.++## Common Conditional Task Structure+The provided trajectory follows a classic pattern:+1. **Locate & Setup:** Find tools and materials (`teleport`, `look around`, `pick up`).+2. **Prepare Experiment:** Arrange items for the process (`move`).+3. **Execute Process:** Activate devices (`activate`).+4. **Monitor & Measure:** Repeatedly check state (`look at`, `examine`) and measure (`use ... on`).+5. **Evaluate & Conclude:** Compare final measurement to threshold, then `focus on` the correct object.++## Key Assumptions (From Trajectory)+* All containers (fridge, cupboard, etc.) are **already open**.+* Objects inside open containers can be interacted with directly.+* The `focus` action is the designated method to signal task completion for conditional outcomes.diff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-placer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-conditional-placer/SKILL.mdnew file mode 100644index 0000000..c46c6b7--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-placer/SKILL.md@@ -0,0 +1,28 @@+---+name: scienceworld-conditional-placer+description: Places an object into one of several designated containers based on a measured condition, such as a temperature threshold. It is triggered after a measurement or assessment when the task requires sorting or storing the object according to a rule.+---+# Skill: Conditional Object Placer++## Purpose+This skill enables an agent to place a target object into a specific container based on a measured condition (e.g., temperature). It is used after a measurement step to complete a conditional sorting or storage objective.++## Core Workflow+1. **Locate & Acquire Measurement Tool:** Find and pick up the required measurement device (e.g., thermometer).+2. **Locate & Acquire Target Object:** Find and pick up the object to be measured and placed (e.g., metal fork).+3. **Identify Target Containers:** Find the designated containers (e.g., blue box, orange box).+4. **Perform Measurement:** Use the measurement tool on the target object to obtain the relevant value.+5. **Evaluate Condition & Execute Placement:** Apply the given rule to the measured value to select the correct container, then move the object into it.++## Key Actions & Logic+* Use `teleport to LOC` to navigate efficiently between rooms.+* Use `look around` to survey a room and locate objects.+* Use `pick up OBJ` to acquire tools and the target object.+* Use `use OBJ [on OBJ]` to perform the measurement (e.g., `use thermometer on metal fork`).+* Use `move OBJ to OBJ` to place the target object into the selected container.+* The decision logic is simple: compare the measured value against the provided threshold and select the corresponding container.++## Important Notes+* All containers are pre-opened. Do not use `open` or `close` actions.+* The skill assumes the measurement tool and target object can be picked up and are used from the inventory.+* The specific rooms, object names, threshold value, and container names will vary per task. Adapt the skill steps accordingly.diff --git a/experiments/src/skills/scienceworld/scienceworld-conditional-placer/references/action_guide.md b/experiments/src/skills/scienceworld/scienceworld-conditional-placer/references/action_guide.mdnew file mode 100644index 0000000..54781ee--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conditional-placer/references/action_guide.md@@ -0,0 +1,19 @@+# Action Reference for ScienceWorld Conditional Placement++This guide details the common actions used in this skill within the ScienceWorld environment.++## Navigation & Exploration+* `teleport to LOC`: Instantly move to a named room (e.g., `teleport to kitchen`, `teleport to bedroom`). Use this for efficient travel.+* `look around`: Get a description of the current room and all visible objects. Use this to find items.++## Object Interaction+* `pick up OBJ`: Move a visible object into your inventory. Use this for the measurement tool and the target object.+* `examine OBJ`: Get a detailed description of a specific object. Useful for verification.+* `look at OBJ`: List the contents of a container. Use this to inspect the target boxes.+* `use OBJ [on OBJ]`: Apply a tool to an object. The primary measurement action (e.g., `use thermometer on metal fork`). Objects are typically referenced from inventory.+* `move OBJ to OBJ`: Move an object from your inventory into a container (e.g., `move metal fork to blue box`). This is the final placement action.++## Skill-Specific Notes+* **Containers are Open:** Do not use `open` or `close`. All cupboards, boxes, etc., are already accessible.+* **Inventory Use:** After picking up objects, they are referred to as `OBJ in inventory` in some action descriptions, but the standard syntax `use thermometer on metal fork` works when both are in inventory.+* **Focus Action:** The `focus on OBJ` action from the trajectory is a signal of intent and may not be necessary in all environment implementations. The core functional actions are `pick up`, `use`, and `move`.diff --git a/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/SKILL.mdnew file mode 100644index 0000000..6d3060d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/SKILL.md@@ -0,0 +1,29 @@+---+name: scienceworld-conductivity-tester+description: Determines if an object is electrically conductive by integrating it into a circuit and observing a light bulb. Triggered when classifying an object based on conductivity.+---+# Instructions++## Objective+Classify a target object as **electrically conductive** or **non-conductive** by using it to complete a simple circuit with a battery and a light bulb.++## Core Procedure+1. **Locate & Acquire Object:** Teleport to the object's location and pick it up.+2. **Focus on Object:** Use the `focus` action on the object to signal intent.+3. **Setup in Workshop:** Teleport to the `workshop`. Place the object down.+4. **Construct Test Circuit:** Assemble the circuit on the table in this exact sequence:+ a. Connect the **battery anode** to **orange wire terminal 1**.+ b. Connect the **battery cathode** to **yellow wire terminal 1**.+ c. Connect **orange wire terminal 2** to the **blue light bulb cathode**.+ d. Connect **green wire terminal 2** to the **blue light bulb anode**.+ e. Connect **yellow wire terminal 2** to **terminal 1** on the target object.+ f. Connect **green wire terminal 1** to **terminal 2** on the target object.+5. **Observe & Classify:** Wait 2 steps (`wait1` twice). Then `look around`.+ - If the **blue light bulb is ON**, the object is **conductive**. Place it in the **blue box**.+ - If the **blue light bulb is OFF**, the object is **non-conductive**. Place it in the **orange box**.++## Key Notes+- The `workshop` contains all necessary components: battery, wires (orange, yellow, green), and light bulbs.+- The circuit is fragile; connect components in the order specified.+- The observation (`look around`) after waiting is critical for determining the bulb's state.+- This skill assumes the environment's action set and room structure as provided in the trajectory.diff --git a/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/references/circuit_diagram.md b/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/references/circuit_diagram.mdnew file mode 100644index 0000000..3aec46c--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-conductivity-tester/references/circuit_diagram.md@@ -0,0 +1,12 @@+# Test Circuit Schematic++## Component List (Found on Workshop Table)+1. **Battery:** Power source. Has an *anode* (+) and *cathode* (-).+2. **Wires:**+ - **Orange Wire:** Connects battery anode to light bulb cathode.+ - **Yellow Wire:** Connects battery cathode to the target object.+ - **Green Wire:** Connects the target object to the light bulb anode.+3. **Light Bulbs:** Use the **blue light bulb** as the indicator.+4. **Target Object:** Must have two connection points (terminal 1 & terminal 2).++## Connection Mapdiff --git a/experiments/src/skills/scienceworld/scienceworld-container-inspector/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-container-inspector/SKILL.mdnew file mode 100644index 0000000..5d82301--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-inspector/SKILL.md@@ -0,0 +1,52 @@+---+name: scienceworld-container-inspector+description: This skill performs a 'look at' action to inspect the contents of a specific container or device. It should be triggered when the agent needs to verify what is inside a container (e.g., checking if lead is in the blast furnace) or monitor the state of contents (e.g., solid vs. liquid). The skill outputs a detailed list of contents and their states, providing essential feedback for process monitoring.+---+# Skill: Container/Device Inspector++## Purpose+Execute a `look at` action on a specified container or device to retrieve a detailed observation of its contents and their states. This is a critical monitoring skill for verifying process steps, such as confirming an item is present inside a furnace or checking the phase (solid/liquid) of a substance.++## When to Use+Trigger this skill when you need to:+1. **Verify Placement:** Confirm an object has been successfully moved into a target container (e.g., "Is the metal pot in the blast furnace?").+2. **Monitor State Change:** Check if the contents of a container have changed state due to a process (e.g., "Has the lead melted into liquid lead?").+3. **Inventory Check:** List all items currently stored inside an open container or device.++## Core Instruction+**Always use the exact action:** `look at <CONTAINER_NAME>`+- Replace `<CONTAINER_NAME>` with the precise name of the target object (e.g., `blast furnace`, `cupboard`, `tin cup`).+- This action returns a structured observation detailing the container's state and a list of its contents.++## Expected Output & Interpretation+The observation will follow this general pattern:+`[CONTAINER], which is [STATE]. The [CONTAINER] door is [OPEN/CLOSED]. In the [CONTAINER] is: \n\t[LIST OF CONTENTS]`++**Key Information to Extract:**+1. **Container State:** Is it activated/turned on? (e.g., "which is turned on").+2. **Door State:** Is it open or closed? You can only see contents if the door is open.+3. **Contents List:** A nested list of all objects inside. Pay close attention to:+ - **Item Names:** (e.g., `a metal pot`).+ - **Substance States:** The description may reveal state changes (e.g., `a substance called liquid lead` vs. `a substance called lead`).+ - **Nested Containers:** Contents may themselves be containers (e.g., `a metal pot (containing a substance called lead)`).++## Example from Trajectory+**Action:** `look at blast furnace`+**Observation:** `a blast furnace, which is turned on. The blast furnace door is open. In the blast furnace is: \n\ta metal pot (containing a substance called liquid lead)`+**Interpretation:** The blast furnace is active and open. It contains one item: a metal pot, which itself contains liquid lead. This confirms the heating process was successful and the lead has melted.++## Integration with Other Actions+This skill is often used in a sequence:+1. `move <ITEM> to <CONTAINER>` (Place an item).+2. `look at <CONTAINER>` (This skill - verify placement).+3. `activate <CONTAINER>` (Start a process).+4. `look at <CONTAINER>` (This skill - monitor state change).+5. `use <TOOL> on <CONTENT>` (Proceed based on observed state).++## Error Handling+- If the `look at` action fails or returns an unexpected result, first verify the object's name is correct by using `look around` or `examine`.+- If the container door is closed, you must `open` it before using this skill.+- The skill only inspects; it does not manipulate contents. Use `pick up`, `move`, or `use` for manipulation.++---+*For detailed examples of container interactions and state transitions, see the reference documentation.*diff --git a/experiments/src/skills/scienceworld/scienceworld-container-inspector/references/container_inspection_examples.md b/experiments/src/skills/scienceworld/scienceworld-container-inspector/references/container_inspection_examples.mdnew file mode 100644index 0000000..e138a72--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-inspector/references/container_inspection_examples.md@@ -0,0 +1,7 @@+# Container Inspection: Examples & Patterns++This document provides concrete examples of the `look at` action's output and how to interpret it for effective process monitoring.++## Basic Structure+**Action:** `look at cupboard`+**Observation:**diff --git a/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/SKILL.mdnew file mode 100644index 0000000..c871c02--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/SKILL.md@@ -0,0 +1,30 @@+---+name: scienceworld-container-item-retriever+description: This skill retrieves a specified item from a container by using the 'pick up' action. It should be triggered when the agent has identified a needed item inside an open container (e.g., a jar, box, or hive) and must transfer it to inventory for later use. The skill handles the object transfer, assuming the container is already accessible, and outputs confirmation that the item is now in the agent's inventory.+---+# Skill: Retrieve Item from Container++## Purpose+Transfer a specified item from an open, accessible container into the agent's inventory using the `pick up` action.++## Trigger Conditions+Use this skill when **all** of the following are true:+1. The agent has identified a specific item needed for a task.+2. The item is located inside a container (e.g., jar, box, hive, closet).+3. The container is already open and accessible (no `open` action required).+4. The agent's immediate goal is to possess the item for later use.++## Core Action+Execute the `pick up <ITEM>` action, where `<ITEM>` is the exact name of the target object as observed in the environment.++## Execution Workflow+1. **Verify Context:** Ensure the target item is present in the current room's observation and is inside an open container.+2. **Execute Transfer:** Perform the `pick up <ITEM>` action.+3. **Confirm Success:** The expected observation is: `"You move the <ITEM> to the inventory."` If a different result occurs, consult the troubleshooting guide.++## Important Notes+* **Pre-condition:** This skill assumes the container is already open. If the container is closed, you must use the `open` action first.+* **Ambiguity:** If multiple identical items exist (e.g., "avocado seed, avocado seed, avocado seed"), the `pick up` action will typically retrieve one. The skill does not handle selecting a specific instance.+* **Post-condition:** After successful execution, the item is in the agent's inventory and can be used in subsequent steps.++For detailed examples and edge cases, see the reference documentation.diff --git a/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/references/execution_examples.md b/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/references/execution_examples.mdnew file mode 100644index 0000000..c7a873d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-item-retriever/references/execution_examples.md@@ -0,0 +1,33 @@+# Execution Examples & Edge Cases++## Primary Example (From Trajectory)+**Scenario:** Need an avocado seed from a seed jar in the greenhouse.+1. **Observation Context:** `a seed jar (containing a avocado seed, a avocado seed, ...)`+2. **Skill Execution:** `pick up seed jar`+3. **Success Output:** `You move the seed jar to the inventory.`++**Note:** In the provided trajectory, the entire container was picked up. The skill principle remains the same for picking up a specific item *from* the container (e.g., `pick up avocado seed`), assuming the container is open.++## Alternative: Picking a Specific Item from Container+**Scenario:** Need one "adult bee" from an open bee hive.+1. **Observation Context:** `a bee hive. The bee hive door is open. In the bee hive is: a adult bee, a adult bee, ...`+2. **Skill Execution:** `pick up adult bee`+3. **Expected Output:** `You move the adult bee to the inventory.`++## Edge Cases & Troubleshooting++### Case 1: Container is Closed+**Symptom:** `pick up` action fails or is not possible.+**Solution:** You must open the container first using `open <CONTAINER>` before this skill can be applied.++### Case 2: Item Not Found+**Symptom:** Action results in an error or unexpected observation.+**Pre-action Check:** Always verify the item is listed in the current room observation inside the specified container. Use `look around` or `look at <CONTAINER>` if unsure.++### Case 3: Ambiguous Object Names+**Symptom:** System prompts for clarification with a numbered list (as seen with `move` in the trajectory).+**Guidance:** The `pick up` action in the provided environment typically does not trigger this ambiguity for items in open containers. If it does, select the first option (`0`) or the option that correctly identifies the item in the target container.++### Case 4: Item is a Substance+**Symptom:** Item is described as "a substance called X" (e.g., water, air).+**Guidance:** Substances often cannot be picked up directly. They may require a container (e.g., `pour` action). This skill is for discrete, tangible objects.diff --git a/experiments/src/skills/scienceworld/scienceworld-container-relocator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-container-relocator/SKILL.mdnew file mode 100644index 0000000..d87cfcf--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-relocator/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-container-relocator+description: Moves an object from inventory to a specified container in a target room. Triggered when the task requires placing an item into a particular receptacle (e.g., 'move it to the orange box').+---+# Skill: Container Relocator++## Purpose+This skill handles the final delivery step in scienceWorld experiments where you must place a specific object into a designated container located in a target room.++## Core Logic+1. **Identify the Target:** The task will specify a destination container (e.g., "the orange box") and a room (e.g., "in the workshop").+2. **Confirm Inventory:** Ensure the required object is already in your inventory. If not, you must first acquire it.+3. **Navigate:** Teleport to the target room if you are not already there.+4. **Execute Delivery:** Use the `move OBJ to OBJ` action to transfer the object from your inventory to the target container.++## Key Instructions+* Use this skill **only** when the task explicitly states a "move it to [CONTAINER] in [ROOM]" objective.+* The object to be moved must be in your inventory. Use `focus on OBJ` to confirm the correct target if needed.+* Always verify your location before attempting the move action. Use `teleport to LOC` to reach the correct room.+* The primary action is `move [OBJECT] to [CONTAINER]`. Ensure the object name matches your inventory and the container name matches the room's description.++## Example Flow (from trajectory)+1. Task: "move it to the orange box in the workshop."+2. Identify: Object = dove egg (in inventory), Container = orange box, Room = workshop.+3. Action: `teleport to workshop`+4. Action: `move dove egg to orange box`diff --git a/experiments/src/skills/scienceworld/scienceworld-container-relocator/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-container-relocator/references/action_primer.mdnew file mode 100644index 0000000..83de1a8--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-relocator/references/action_primer.md@@ -0,0 +1,31 @@+# Action Primer for scienceWorld++## Relevant Actions for This Skill++### Primary Action+* **`move OBJ to OBJ`**: Transfers an object from your inventory or current location to a container or surface.+ * Format: `move <object_name> to <container_name>`+ * Example: `move dove egg to orange box`+ * **Critical:** The object must be accessible (in inventory or in the room).++### Prerequisite & Support Actions+* **`teleport to LOC`**: Instantly moves the agent to a named room.+ * Format: `teleport to <room_name>`+ * Example: `teleport to workshop`+ * Rooms: kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallway.++* **`focus on OBJ`**: Signals intent on a task-relevant object. Use to confirm you have identified the correct item before picking it up or moving it.+ * Format: `focus on <object_name>`+ * Example: `focus on dove egg`++* **`pick up OBJ`**: Moves an object from the environment into your inventory. Required before you can `move` an item that is not already in your inventory.+ * Format: `pick up <object_name>`+ * Example: `pick up dove egg`++* **`look around`**: Describes the current room and lists visible objects and containers. Use to locate the target container.+ * Format: `look around`++## Common Object Naming Patterns+* Objects may be referred to with articles (e.g., "a dove egg", "the orange box"). The action command typically uses the noun phrase without the article.+* Compound names are used directly (e.g., `dove egg`, `orange box`).+* If an object is described as being "on" something, it is a separate object (e.g., "a white pillow" on "a couch").diff --git a/experiments/src/skills/scienceworld/scienceworld-container-transfer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-container-transfer/SKILL.mdnew file mode 100644index 0000000..8d06dbc--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-transfer/SKILL.md@@ -0,0 +1,33 @@+---+name: scienceworld-container-transfer+description: Moves a substance or object from one container to another (e.g., moving lead to a metal pot). Triggered when the agent needs to prepare materials for processing, such as transferring a substance into a heat-resistant container for heating experiments.+---+# Skill: Container Transfer++## Purpose+This skill orchestrates the transfer of a target substance or object from a source container to a destination container. It is a foundational step for preparing materials for subsequent operations like heating, mixing, or measurement.++## Core Logic+The skill is executed when the agent's goal requires moving a material to a more suitable container. The primary sequence, derived from the trajectory, is:+1. **Identify & Locate:** Confirm the presence of the target substance and the destination container in the current environment.+2. **Execute Transfer:** Use the `move OBJ to OBJ` action, where the first object is the target substance and the second is the destination container.+3. **Verify:** Confirm the transfer was successful by examining the destination container's contents.++## Instructions+Follow this decision flow to perform a container transfer:++1. **Assess the need for transfer.** Is the target substance in a container unsuitable for the next planned operation (e.g., a tin cup is not heat-resistant for a furnace)?+2. **Locate the target substance and a suitable destination container** (e.g., `lead` in a `tin cup` and an empty `metal pot`). Use `look around` and `look at OBJ` actions.+3. **Execute the transfer command:** `move <SUBSTANCE_NAME> to <DESTINATION_CONTAINER>`.+ * Example: `move lead to metal pot`+4. **Verify the transfer** by looking at the destination container: `look at <DESTINATION_CONTAINER>`.+ * Expected observation: The container now lists the target substance in its contents.++## Key Parameters+* `<SUBSTANCE_NAME>`: The name of the substance or object to be moved (e.g., `lead`).+* `<DESTINATION_CONTAINER>`: The name of the container to receive the substance (e.g., `metal pot`).++## Notes+* This skill assumes containers are already open, as per the environment rules.+* The skill is context-aware; the destination container should be chosen based on the properties needed for the next step (e.g., heat resistance for a furnace).+* If the transfer fails (e.g., "You can't do that"), check the object names and ensure the destination container is accessible and capable of holding the substance.diff --git a/experiments/src/skills/scienceworld/scienceworld-container-transfer/references/container_properties.md b/experiments/src/skills/scienceworld/scienceworld-container-transfer/references/container_properties.mdnew file mode 100644index 0000000..7dcdec1--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-container-transfer/references/container_properties.md@@ -0,0 +1,27 @@+# Reference: Common Container Properties++This document lists typical containers found in the ScienceWorld environment and their inferred properties to guide selection for the transfer skill.++## Container Types & Suitability++| Container | Typical Material | Heat Resistance | Suggested Use Case |+| :----------------- | :--------------- | :-------------- | :-------------------------------------------------- |+| **Metal Pot** | Metal | **High** | Heating substances in a furnace or on a stove. |+| **Ceramic Cup** | Ceramic | Moderate | Holding hot liquids (not for direct flame). |+| **Glass Jar/Cup** | Glass | Low-Variable | Storage, mixing; may crack with rapid temp change. |+| **Tin Cup** | Metal (thin) | Low | General storage; not suitable for high-temperature heating. |+| **Wood Cup** | Wood | **Low** | Cold storage only (e.g., in a fridge). |+| **Bowl** | Variable | Low | Holding solid items, mixing (check material). |+| **Drawer** | Wood/Metal | N/A | Storage of tools/items, not for active processing. |++## Selection Heuristic+When choosing a destination container for a transfer, ask:+1. **What is the next operation?** (e.g., heating β requires heat-resistant container).+2. **Is the container empty?** Check via `look at <container>`.+3. **Is the container accessible?** It must be in the current room and not inside another closed object.++## Example from Trajectory+* **Operation:** Heat lead to melting point.+* **Source:** `tin cup` (not suitable for blast furnace).+* **Destination Selected:** `metal pot` (suitable for blast furnace).+* **Command:** `move lead to metal pot`diff --git a/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/SKILL.mdnew file mode 100644index 0000000..626d0a0--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/SKILL.md@@ -0,0 +1,38 @@+---+name: controlled-waiting+description: Executes timed waiting to allow processes like plant growth or pollination to progress. Use this skill when you need to advance time for biological or mechanical processes to reach their next stages. This enables progression in tasks that require temporal development rather than immediate actions.+---+# Skill: Controlled Waiting++## Purpose+This skill orchestrates a strategic waiting pattern to allow time-dependent processes (e.g., plant growth, chemical reactions, mechanical cycles) to complete. It is triggered when the agent's primary task is blocked, pending the natural progression of a state.++## Core Logic+The skill follows a **Monitor-Wait-Check** cycle:+1. **Assess State:** Confirm the process requiring time is active (e.g., seeds are planted, device is activated).+2. **Execute Wait:** Use the `wait` action (for long periods) or `wait1` (for single steps) to advance the simulation.+3. **Verify Progress:** After waiting, check the environment (`look around` or `examine`) to see if the target state has been reached.+4. **Repeat or Exit:** If the target state is not yet achieved, loop back to step 2. If achieved, exit the skill and resume the main task.++## Key Parameters & Decisions+* **Wait Duration:** Use `wait` (10 steps) for significant biological/mechanical stages. Use `wait1` for fine-grained control or to observe rapid changes.+* **Monitoring Frequency:** The interval between checks. Derived from the trajectory: after 2-3 `wait` actions, a `look around` is performed. Adjust based on the estimated time of the process.+* **Exit Condition:** Clearly defined by the main task goal (e.g., "banana is present", "device status is 'ready'").++## When to Use This Skill+* After initiating a process that has a known or unknown delay.+* When the environment state is stable and no other preparatory actions are possible.+* When prompted by task context (e.g., "give them time to grow", "wait for the reaction to complete").++## When NOT to Use This Skill+* When you can perform other productive actions in parallel.+* When the process is instantaneous or requires a specific trigger (e.g., pressing a button).+* If waiting would cause a negative outcome (e.g., a timer expires, an object decays).++## Integration with Main Task+This skill is a **subroutine**. The main task should:+1. Set up the necessary conditions for the time-based process.+2. Invoke this skill.+3. Upon skill completion, verify the outcome and proceed with the next task step (e.g., harvest the grown banana).++Refer to `references/botanical_growth_patterns.md` for common plant growth stage timings.diff --git a/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/references/botanical_growth_patterns.md b/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/references/botanical_growth_patterns.mdnew file mode 100644index 0000000..160860b--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-controlled-waiting/references/botanical_growth_patterns.md@@ -0,0 +1,20 @@+# Botanical Growth & Pollination Patterns++## Observed Timeline (Derived from Trajectory)+The following pattern was observed for banana plant growth in the provided simulation environment. Use this as a heuristic for similar tasks.++1. **Planting to Reproduction:** ~30 simulation steps (3 x `wait` actions).+ * Action Sequence: Plant seed -> `wait` (x3) -> Plant reaches "reproducing stage" with flowers.++2. **Flowering to Fruit Set:** Variable, requires pollination trigger.+ * Observation: Flowers persisted through multiple `wait` cycles without fruit.+ * **Trigger Identified:** Closing environment doors (containing bees) acted as a pollination catalyst.+ * Post-trigger, fruit (bananas) appeared within ~20-30 steps (2-3 x `wait` actions).++3. **Key Insight:** Some growth stages are purely time-based, while others (like fruit set) require specific environmental conditions *in addition* to time.++## General Guidelines for Controlled Waiting+* **Baseline Wait:** Start with 2-3 `wait` commands for any biological growth stage transition.+* **Check Point:** Always perform a `look around` or `examine` after a baseline wait to assess progress.+* **Stalled Progress:** If no change occurs after two baseline cycles, investigate environmental prerequisites (e.g., pollinators, water, light, closed containers).+* **Pollination Note:** The presence of bees (`adult bee`) and an open `bee hive` suggests a pollination mechanic. Containing them (`close door`) may be necessary to initiate the process.diff --git a/experiments/src/skills/scienceworld/scienceworld-device-activator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-device-activator/SKILL.mdnew file mode 100644index 0000000..4e8a6be--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-device-activator/SKILL.md@@ -0,0 +1,37 @@+---+name: scienceworld-device-activator+description: This skill activates a device (e.g., blast furnace, stove) to initiate a process like heating. It should be triggered when the agent has placed materials in a device and needs to start the device's operation. The skill takes a device name as input and outputs a confirmation of activation, which is critical for progressing tasks that require energy or processing.+---+# Device Activation Skill++## Purpose+Activate a specific device to begin its operation (e.g., heating, processing). This is a critical step when materials have been placed into a device and require energy input to proceed with an experiment or task.++## When to Use+- You have confirmed that the target materials are properly placed inside the device.+- The device is in a deactivated or "off" state.+- The next step in your task requires the device to be operating (e.g., heating lead in a blast furnace).++## Core Instruction+Execute the `activate` action on the target device.++**Action Format:** `activate <DEVICE_NAME>`++**Example:** `activate blast furnace`++## Prerequisites+1. **Material Placement:** Ensure the target material(s) are inside the device. Use `look at <DEVICE_NAME>` to verify contents.+2. **Device State:** Confirm the device is deactivated. The observation will typically indicate "which is turned off" or "which is deactivated."+3. **Safety Check:** Ensure the device door is open if required for loading. Most devices in this environment are pre-opened.++## Post-Activation Steps+1. **Verification:** After activation, check the device state with `look at <DEVICE_NAME>` or `examine <DEVICE_NAME>` to confirm it's now "turned on" or "activated."+2. **Monitoring:** Use appropriate measurement tools (e.g., thermometer) on the materials inside the device to track progress.+3. **Deactivation:** Remember to deactivate the device when the process is complete using `deactivate <DEVICE_NAME>`.++## Common Devices & Context+- **Blast Furnace:** For high-temperature melting (e.g., metals like lead).+- **Stove/Oven:** For general heating tasks.+- **Other Devices:** Any device with an observable on/off state that requires activation to function.++For detailed device specifications and safety guidelines, see the reference documentation.diff --git a/experiments/src/skills/scienceworld/scienceworld-device-activator/references/device_specifications.md b/experiments/src/skills/scienceworld/scienceworld-device-activator/references/device_specifications.mdnew file mode 100644index 0000000..ce48f7b--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-device-activator/references/device_specifications.md@@ -0,0 +1,38 @@+# Device Specifications & Activation Protocols++## Blast Furnace+- **Purpose:** High-temperature melting of metals and materials.+- **Activation Command:** `activate blast furnace`+- **Typical Operating Temperature:** 400-2000Β°C+- **Safety Protocols:**+ - Ensure materials are in a heat-resistant container (e.g., metal pot).+ - Verify door is open before loading (usually pre-opened in this environment).+ - Do not touch while activated.+- **Confirmation Output:** "The blast furnace is now activated."+- **Deactivation Command:** `deactivate blast furnace`++## Stove+- **Purpose:** General heating and cooking.+- **Activation Command:** `activate stove`+- **Typical Operating Temperature:** 50-300Β°C+- **Safety Protocols:**+ - Use appropriate cookware.+ - Monitor temperature to prevent burning.+- **Confirmation Output:** "The stove is now turned on."+- **Deactivation Command:** `deactivate stove`++## Oven+- **Purpose:** Enclosed heating/baking.+- **Activation Command:** `activate oven`+- **Typical Operating Temperature:** 100-250Β°C+- **Safety Protocols:**+ - Use oven-safe containers.+ - Allow preheating if required by recipe.+- **Confirmation Output:** "The oven is now turned on."+- **Deactivation Command:** `deactivate oven`++## General Activation Principles+1. **State Verification:** Always check device state before and after activation.+2. **Material Readiness:** Activation should only occur after materials are properly loaded.+3. **Energy Consumption:** Activated devices consume energy; deactivate when not in use.+4. **Process Monitoring:** Use measurement tools (thermometer, stopwatch) to monitor activated processes.diff --git a/experiments/src/skills/scienceworld/scienceworld-environment-isolation/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-environment-isolation/SKILL.mdnew file mode 100644index 0000000..27f0def--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-environment-isolation/SKILL.md@@ -0,0 +1,28 @@+---+name: scienceworld-environment-isolation+description: Closes doors or openings to create a contained environment for controlled processes. Trigger this when you need to isolate a space (like a greenhouse) to optimize conditions for pollination or other environmental-sensitive tasks. This modifies room connectivity to create optimal conditions for specific processes.+---+# Instructions++## When to Use+Trigger this skill when you need to:+1. **Optimize Pollination:** Isolate a room (like a greenhouse) to concentrate pollinators (e.g., bees) and prevent them from leaving, thereby increasing the chance of successful cross-pollination between plants.+2. **Control Environmental Factors:** Create a stable, contained space to manage variables like temperature, humidity, or airflow for a sensitive process.+3. **Prevent Contamination or Interference:** Seal off a room to protect an ongoing experiment or task from external disturbances.++## Core Action Sequence+1. **Assess the Environment:** Use `look around` to identify all doors, windows, or other openings in the current room.+2. **Execute Isolation:** For each identified opening (e.g., "door to the outside", "door to the hallway"), issue a `close` command.+ * **Example:** `close door to outside`+ * **Example:** `close door to hallway`+3. **Verify Closure:** Perform a final `look around` to confirm all intended openings are now closed and the room is successfully isolated.++## Key Principles+* **Completeness:** Ensure *all* exits are closed for full isolation. An open door can defeat the purpose.+* **Context-Specific:** The specific doors to close depend entirely on the room's layout. Always verify via `look around`.+* **Post-Isolation:** After isolation, monitor the contained process (e.g., plant growth) and use `wait` actions as needed to allow time for the optimized conditions to take effect.++## Notes+* This skill modifies the **connectivity** of a space, not its internal state (like temperature controls).+* The primary observed benefit in the trajectory was enhancing bee-mediated pollination by preventing bee escape.+* Reversal (re-opening doors) is not part of this skill's core function but can be done using standard `open` commands if needed later.diff --git a/experiments/src/skills/scienceworld/scienceworld-environment-isolation/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-environment-isolation/references/action_primer.mdnew file mode 100644index 0000000..32de8d0--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-environment-isolation/references/action_primer.md@@ -0,0 +1,13 @@+# Action Primer for Environment Isolation++## Relevant Standard Actions+* `look around`: **Critical.** Use this first to survey the room and identify all closable openings (doors, gates, windows).+* `close OBJ`: The core action. `OBJ` must be the exact name of the opening as listed in the `look around` observation (e.g., "door to the outside").++## Handling Ambiguity+If an action (like `focus on OBJ`) returns an "Ambiguous request" prompt after isolation, it is unrelated to this skill. Resolve it by selecting the appropriate numeric option corresponding to your intended target.++## Sequencing with Other Skills+1. **Preparation First:** Often, tasks like planting (`move seed to pot`) or setting up devices should be completed *before* isolation.+2. **Isolation Middle:** Apply this skill after setup but before the critical waiting period for the process (e.g., pollination).+3. **Monitoring After:** Use `wait` and periodic `look around` checks after isolation to observe outcomes.diff --git a/experiments/src/skills/scienceworld/scienceworld-environment-scanner/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-environment-scanner/SKILL.mdnew file mode 100644index 0000000..3bf28bb--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-environment-scanner/SKILL.md@@ -0,0 +1,19 @@+---+name: scienceworld-environment-scanner+description: This skill performs an initial observation of the current location to identify available objects, containers, and connections to other rooms. Use this when starting a new task in ScienceWorld to gather situational awareness, especially when the agent needs to understand its surroundings before taking action. It outputs a detailed room description, listing visible items and accessible doors.+---+# Instructions++Execute this skill when you first arrive at a location in ScienceWorld or when you need to refresh your understanding of the current environment.++## Core Action+1. **Always begin by using the `look around` action.** This is the primary and mandatory step of this skill. It provides the foundational observation of the room.++## Output Interpretation+After executing `look around`, analyze the observation. Your analysis must structure the output clearly:+* **Current Room:** State the name of the room you are in.+* **Visible Objects & Substances:** List all items and substances reported in the observation.+* **Accessible Doors:** List all doors mentioned, noting their destination and whether they are open or closed.+* **Initial Assessment:** Briefly note any items of immediate interest or relevance to your known task.++## Example Output Formatdiff --git a/experiments/src/skills/scienceworld/scienceworld-environment-scanner/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-environment-scanner/references/action_primer.mdnew file mode 100644index 0000000..3a8f122--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-environment-scanner/references/action_primer.md@@ -0,0 +1,22 @@+# ScienceWorld Action Primer for Environment Scanning++## Primary Scanning Action+* `look around`: Describes the current room, listing all visible objects, substances, and doors to other rooms. This is the core action for the `scienceworld-environment-scanner` skill.++## Context for Other Common Actions+*(This section is for reference when planning post-scan steps. Do not use these during the scan itself.)*++### Navigation+* `teleport to LOC`: Instantly moves the agent to a named room (e.g., `teleport to kitchen`). Use after scanning to move towards a goal.++### Object Interaction+* `examine OBJ`: Provides a detailed description of a specific object.+* `look at OBJ`: Lists the contents inside a container.+* `pick up OBJ`: Moves a freestanding object into the agent's inventory.++### Task Signaling+* `focus on OBJ`: Explicitly marks an object as the current target of the task. Often required before manipulating key objects.++## Important Constraints (from Trajectory)+* All containers are pre-opened. You can `look at` them directly without needing to `open` them first.+* You can `teleport` to any known room in a single step.diff --git a/experiments/src/skills/scienceworld/scienceworld-growth-focuser/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-growth-focuser/SKILL.mdnew file mode 100644index 0000000..854f42e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-growth-focuser/SKILL.md@@ -0,0 +1,31 @@+---+name: scienceworld-growth-focuser+description: This skill applies a 'focus on' action to a specific plant or biological entity to signal intent and monitor its development. It should be triggered after planting or when the agent needs to track the growth stage of a plant (e.g., to observe sprouting, flowering, or reproduction). The skill outputs a confirmation of focus, which may be necessary for triggering or tracking life cycle progression in the environment.+---+# Skill: Growth Focuser++## Purpose+Apply the `focus on` action to a specific biological entity (e.g., a planted seed or growing plant) to signal your intent to monitor its development. This action is often a prerequisite for the environment to process growth stages or trigger life cycle progression events.++## When to Use+Use this skill when:+1. **After Planting:** You have just placed a seed or seedling into a suitable growth medium (e.g., soil with water).+2. **Stage Monitoring:** You need to check or trigger a progression in the plant's life cycle (e.g., from seed to sprout, sprout to mature plant, flowering, or reproduction).+3. **Intent Signaling:** The task requires you to explicitly indicate which entity you are observing or nurturing.++## Core Instruction+1. **Identify the Target:** Locate the specific plant or seed you intend to focus on. Ensure it is in a valid state for growth (e.g., planted in soil with water).+2. **Execute Focus:** Use the action: `focus on <PLANT_OBJECT> [in <CONTAINER>]`.+ * Replace `<PLANT_OBJECT>` with the exact name of the biological entity (e.g., `avocado seed`).+ * Use the optional `[in <CONTAINER>]` clause if the object is inside another object (e.g., `avocado seed in flower pot 1`). This is crucial for disambiguation.+3. **Confirm & Wait:** Upon successful focus, you will receive a confirmation. Biological growth requires time. Use `wait` actions strategically after focusing to allow the simulated environment to process development stages.++## Key Considerations+* **Disambiguation:** If multiple identical objects exist, the environment may prompt you to choose. Always specify the container (e.g., `in flower pot 1`) to avoid this.+* **Prerequisites:** The `focus on` action typically follows preparatory steps like `teleport to <location>`, `pick up <item>`, and `move <seed> to <pot>`.+* **Patience is Required:** Growth is not instantaneous. The `focus on` action signals intent, but you must follow it with `wait` actions to observe results.++## Quick Reference+**Trigger Condition:** Seed/Plant is in a growth-ready state.+**Primary Action:** `focus on <PLANT_OBJECT> [in <CONTAINER>]`+**Next Steps:** Use `wait` to allow time for growth progression.diff --git a/experiments/src/skills/scienceworld/scienceworld-growth-focuser/references/trajectory_analysis.md b/experiments/src/skills/scienceworld/scienceworld-growth-focuser/references/trajectory_analysis.mdnew file mode 100644index 0000000..572a4c4--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-growth-focuser/references/trajectory_analysis.md@@ -0,0 +1,22 @@+# Trajectory Analysis & Rationale++## Skill Derivation+This skill is extracted from the provided trajectory where the agent successfully grows an avocado plant. The critical pattern identified is the use of `focus on` as a deliberate action to signal monitoring intent on a biological entity, which appears to be a mechanic for tracking or enabling growth stages in the ScienceWorld environment.++## Observed Workflow+1. **Locate & Acquire Seed:** `teleport to greenhouse` -> `look around` -> `pick up seed jar`.+2. **Plant Seed:** `move avocado seed in seed jar to flower pot 1` (Note: Required disambiguation by selecting option `0`).+3. **Apply Skill - Focus:** `focus on avocado seed in flower pot 1`.+4. **Monitor Growth:** Series of `wait` actions following the focus.++## Environment Mechanics Inferred+* `focus on` is a distinct, non-physical action separate from `examine` or `look at`.+* It may set an internal flag for the focused object, making it eligible for state changes over simulated time (`wait`).+* The action likely requires a precise object reference, including its container location for disambiguation.++## Action Syntax Examples from Trajectory+* `focus on avocado seed in flower pot 1`+* `move avocado seed in seed jar to flower pot 1` (Pre-requisite action pattern)++## Why This is a Separate Skill+The `focus on` action is a specific, high-level command with semantic meaning ("I am now monitoring this for development"). It is not a general observation action. Bundling it as a skill ensures the agent understands the contextual trigger (post-planting) and the strategic importance of this action for achieving tasks involving biological growth.diff --git a/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/SKILL.mdnew file mode 100644index 0000000..19d43ec--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/SKILL.md@@ -0,0 +1,42 @@+---+name: scienceworld-heating-apparatus-setup+description: This skill positions a container with a substance onto a heating device (stove, oven) and activates the device. It should be triggered when a task requires melting, boiling, or heating a substance. The skill moves the prepared container to the heating element and turns it on.+---+# Instructions++## Purpose+This skill automates the setup of a heating apparatus for scientific experiments involving melting, boiling, or heating a substance. It handles the positioning of a prepared container onto a heating element and the activation of the device.++## Prerequisites+1. **Target Substance:** The substance to be heated (e.g., chocolate, water) must be located and identified.+2. **Suitable Container:** A compatible, heat-safe container (e.g., metal pot, beaker) must be available in the environment.+3. **Heating Device:** A functional heating device (e.g., stove, oven) must be present and accessible.+4. **Location:** The agent should be in the same room as the required items (kitchen, workshop, etc.).++## Core Procedure+Follow this sequence to execute the skill. Use the bundled `setup_heater.py` script for reliable, error-prone steps (1-4).++1. **Prepare the Substance:** Ensure the target substance is placed into the chosen container.+ * *High Freedom Decision:* Select the most appropriate container based on the substance and heating method.+ * *Action Pattern:* `move <SUBSTANCE> to <CONTAINER>`++2. **Position the Container:** Move the prepared container onto the heating device.+ * *Action Pattern:* `move <CONTAINER> to <HEATING_DEVICE>`++3. **Activate the Heater:** Turn on the heating device to begin the thermal process.+ * *Action Pattern:* `activate <HEATING_DEVICE>`++4. **Verify Setup:** Confirm the container is correctly positioned and the device is active.+ * *Action Pattern:* `look at <HEATING_DEVICE>`+ * *Expected Observation:* The device is "turned on" and the container is listed as being on it.++## Post-Setup & Monitoring+After the heating apparatus is active, proceed with the main experiment (e.g., temperature measurement). Use the bundled `monitor_temperature.py` script for consistent temperature checks.+* **Monitor State:** Regularly examine the substance (`examine <SUBSTANCE>`) to observe phase changes (e.g., solid -> liquid).+* **Measure Temperature:** Use a thermometer (`use thermometer on <SUBSTANCE>`) to track thermal progress.++## Error Handling & Notes+* If the initial `look around` does not reveal the necessary items, use `teleport to <ROOM>` to navigate to the correct location (e.g., kitchen).+* All containers are pre-opened. Do not use `open` or `close` actions.+* The skill assumes the heating device is initially deactivated and ready for use.+* For complex thermal protocols (specific ramp rates, hold times), consult the `references/thermal_procedures.md` guide.diff --git a/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/references/thermal_procedures.md b/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/references/thermal_procedures.mdnew file mode 100644index 0000000..6821e53--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-heating-apparatus-setup/references/thermal_procedures.md@@ -0,0 +1,27 @@+# Thermal Procedure Reference++## Overview+This document provides supplementary context for heating-related experiments, detailing common substances, their properties, and best practices.++## Common Substance Melting/Boiling Points+* **Chocolate:** Melting point typically ranges between 30Β°C and 32Β°C (86-90Β°F) for cocoa butter. Compound chocolate may have different properties.+* **Water:** Boiling point is 100Β°C at standard atmospheric pressure.+* **Sodium Chloride (Salt):** Melting point is 801Β°C.++## Heating Device Profiles+| Device | Typical Use Case | Activation Command | Notes |+|-----------|---------------------------|--------------------|-------|+| Stove | Heating containers directly | `activate stove` | Used for pots, pans. Provides direct heat. |+| Oven | Enclosed, ambient heating | `activate oven` | Used for baking, roasting. Heat surrounds container. |+| Hot Plate | Precise heating of labware| `activate hot plate`| Common in laboratory settings. |++## Safety & Best Practices+1. **Container Selection:** Always use a container suitable for the heating device (e.g., metal pot for stove, glass beaker for hot plate).+2. **Never Heat Closed Containers:** Ensure containers are open or vented to prevent pressure buildup.+3. **Monitor Continuously:** Heating can cause rapid phase changes. Use the `monitor_temperature.py` script for consistent observation.+4. **Deactivate After Use:** Once the experiment is complete, remember to `deactivate` the heating device.++## Troubleshooting+* **Substance Not Heating:** Verify the container is correctly positioned *on* the heating element (use `look at <DEVICE>`).+* **Temperature Not Rising:** Confirm the heating device is activated (`activate <DEVICE>`).+* **Incorrect Phase Change:** Consult the melting/boiling point table above to set appropriate expectations.diff --git a/experiments/src/skills/scienceworld/scienceworld-instruction-reader/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-instruction-reader/SKILL.mdnew file mode 100644index 0000000..837ebf3--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-instruction-reader/SKILL.md@@ -0,0 +1,19 @@+---+name: scienceworld-instruction-reader+description: This skill reads a recipe or note from the inventory using the 'read' action. It should be triggered after acquiring a recipe or document to extract explicit instructions, ingredient lists, or procedural steps. The skill parses the text content and outputs the key information needed to execute the task, such as required components and their combinations.+---+# Instructions+Use this skill when you have acquired a recipe, note, or any readable document in your inventory and need to understand its contents to proceed with a task.++## Core Action+1. **Read the Document:** Use the `read OBJ` action on the document in your inventory.+ * **Example:** `read recipe in inventory`++## Skill Logic+After reading, analyze the text to identify:+* **Goal:** The final product or objective (e.g., "make salt water").+* **Required Components:** A list of items or substances needed (e.g., "sodium chloride, water").+* **Procedural Steps:** Any explicit actions or combinations described (e.g., "mix sodium chloride, water").++## Output Format+Present the extracted information clearly. For example:diff --git a/experiments/src/skills/scienceworld/scienceworld-instruction-reader/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-instruction-reader/references/action_primer.mdnew file mode 100644index 0000000..a3c1200--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-instruction-reader/references/action_primer.md@@ -0,0 +1,21 @@+# Action Primer for ScienceWorld Environment++This document lists common actions used in conjunction with the `scienceworld-instruction-reader` skill to execute tasks based on extracted instructions.++## Navigation & Exploration+* `teleport to LOC`: Instantly move to a named room (e.g., `teleport to workshop`).+* `look around`: Observe the current room's contents and exits.++## Inventory & Object Manipulation+* `pick up OBJ`: Move an object into your inventory.+* `examine OBJ`: Get a detailed description of an object, including its contents if it's a container.+* `move OBJ to OBJ`: Place an object into a container or onto a surface.++## Task Execution (Common for Chemistry/Experiments)+* `mix OBJ`: Chemically combine the contents of a container.+* `pour OBJ into OBJ`: Transfer a liquid between containers.+* `use OBJ [on OBJ]`: Employ a tool or device.+* `activate OBJ` / `deactivate OBJ`: Turn a device (like a sink) on or off.++## Task Completion+* `focus on OBJ`: Signal intent on a final task object to indicate completion.diff --git a/experiments/src/skills/scienceworld/scienceworld-inventory-focus/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-inventory-focus/SKILL.mdnew file mode 100644index 0000000..14616de--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-inventory-focus/SKILL.md@@ -0,0 +1,36 @@+---+name: scienceworld-inventory-focus+description: This skill focuses on a specific item within the agent's inventory to confirm its identity or prepare it for use. It should be triggered before using an inventory item in an experiment or when verifying that the correct item has been collected. The skill helps ensure operational readiness and intentional task progression.+---+# Skill: Inventory Focus++## Purpose+Use this skill to intentionally examine and prepare an item from your inventory before using it in a task. This act of "focusing" confirms the item's presence, state, and readiness, reducing errors in multi-step procedures.++## Primary Trigger+Trigger this skill when you have picked up a required item and need to:+1. Verify it is the correct object for the next step.+2. Signal your intent to use it.+3. Prepare it for a subsequent action (e.g., measurement, combination).++## Core Instruction+Execute the `focus on [ITEM] in inventory` action. Replace `[ITEM]` with the exact name of the object you have collected.++## Standard Operating Procedure (SOP)+Follow this sequence when an item from your inventory is needed for a critical task:++1. **Acquire:** First, ensure the target item is in your inventory (e.g., `pick up thermometer`).+2. **Focus:** Execute this skill: `focus on [ITEM] in inventory`.+3. **Proceed:** After receiving confirmation, proceed with the intended use of the item (e.g., `use thermometer on unknown substance B`).++## Example from Trajectory+* **Goal:** Measure the temperature of `unknown substance B`.+* **Procedure:**+ 1. `pick up thermometer`+ 2. `focus on thermometer in inventory` *(This skill)*+ 3. `pick up unknown substance B`+ 4. `focus on unknown substance B in inventory` *(This skill)*+ 5. `use thermometer on unknown substance B`++## Key Principle+Treat `focus on` as a deliberate checkpoint. It does not change the state of the object but changes the agent's state of awareness and intent, leading to more reliable task execution.diff --git a/experiments/src/skills/scienceworld/scienceworld-inventory-focus/references/action_context.md b/experiments/src/skills/scienceworld/scienceworld-inventory-focus/references/action_context.mdnew file mode 100644index 0000000..8e66c06--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-inventory-focus/references/action_context.md@@ -0,0 +1,19 @@+# Action Context for ScienceWorld Environment++## Relevant Actions for This Skill+* `pick up OBJ`: Moves an object from the environment to the agent's inventory. A prerequisite for using the `focus` skill on that object.+* `focus on OBJ`: The core action of this skill. When the object is in inventory, use the format `focus on OBJ in inventory`.++## Environment Assumptions (From Trajectory)+The provided trajectory operates under specific world assumptions that simplify task execution:+* **Teleportation:** You can `teleport to LOC` instantly between named rooms.+* **Open Containers:** All containers (cupboards, drawers, fridges) are already open. You can directly see and take items from them.+* **Inventory:** The agent has an implicit inventory. Picked-up items are moved "to the inventory" and can be focused on or used from there.++## Common Object Names+Based on the trajectory, be precise with object names:+* `thermometer`+* `unknown substance B`+* `blue box`+* `green box`+* `lighter`, `stopwatch`, `glass jar`, etc.diff --git a/experiments/src/skills/scienceworld/scienceworld-inventory-manager/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-inventory-manager/SKILL.mdnew file mode 100644index 0000000..46de0fc--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-inventory-manager/SKILL.md@@ -0,0 +1,37 @@+---+name: scienceworld-inventory-manager+description: This skill handles picking up objects from the environment into the agent's inventory or moving them out. It should be triggered when the agent needs to acquire an object for later use or place an object into a container. The input is an object name and location, and the output is the object being transferred to or from inventory.+---+# Instructions++## Purpose+Use this skill to manage the agent's inventory by picking up objects from the environment or placing them into containers. This is a foundational action for acquiring tools, materials, or evidence needed for tasks.++## When to Use+- You need to acquire an object for later use in an experiment or task.+- You need to place an object into a specific container (e.g., a box, a table, a room) as part of a task requirement.+- The object's location is known or can be inferred from context.++## Core Action Pattern+The primary action is `pick up OBJ` to acquire an object or `move OBJ to OBJ` to place it into a container. The exact syntax may vary slightly based on the environment's action space (e.g., `pick up metal pot containing nothing in kitchen` vs. `move metal pot to blue box`).++## Procedure+1. **Locate the Object:** Ensure you are in the correct room or that the object is in your immediate vicinity. Use `look around` or `examine` if needed.+2. **Acquire the Object:** If the object is not in your inventory, use the `pick up` action with the correct object identifier and location.+3. **Place the Object (if required):** If the task requires placing the object into a container, use the `move` action with the target container's name.++## Key Considerations+- **Object State:** Some objects may be described as "containing nothing." Include this in the action if the environment's grammar requires it (e.g., `pick up metal pot containing nothing in kitchen`).+- **Container Targets:** When moving an object to a container like a box, use the container's name and color if specified (e.g., `blue box`, `orange box`).+- **Inventory Management:** You can only hold one item in your inventory at a time in the provided trajectory. Plan your actions accordingly.++## Example from Trajectory+**Goal:** Acquire the metal pot from the kitchen.+- Action: `pick up metal pot containing nothing in kitchen`+- Result: "You move the metal pot to the inventory."++**Goal:** Place the conductive metal pot into the correct box.+- Action: `move metal pot to blue box`+- Result: The object is transferred from inventory (or the room) to the specified container.++For complex object interactions or environment-specific grammar, consult the bundled reference.diff --git a/experiments/src/skills/scienceworld/scienceworld-inventory-manager/references/environment_actions.md b/experiments/src/skills/scienceworld/scienceworld-inventory-manager/references/environment_actions.mdnew file mode 100644index 0000000..aaea84a--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-inventory-manager/references/environment_actions.md@@ -0,0 +1,30 @@+# ScienceWorld Environment: Action Reference++## Core Inventory & Object Manipulation Actions+Based on the provided trajectory, the environment accepts the following action patterns for inventory management:++1. `pick up OBJ [containing STATE] in LOC`+ - **Purpose:** Transfers an object from a location into the agent's inventory.+ - **Examples:**+ - `pick up metal pot containing nothing in kitchen`+ - `pick up battery in workshop`++2. `move OBJ to OBJ`+ - **Purpose:** Moves an object (from inventory or the current room) into a container or to a location.+ - **Examples:**+ - `move metal pot to blue box`+ - `move battery to table`++## Important Grammar Notes+- **Object Specifiers:** Objects are often described with their state, such as "containing nothing." Including this state in the `pick up` action may be necessary for the action to succeed.+- **Location Specifiers:** The `in LOC` part of the `pick up` action seems to require the room name where the object is located.+- **Container Names:** Containers are referred to by their descriptive names (e.g., `blue box`, `orange box`, `table`, `sink`).++## Related Supporting Actions+- `look around`: Describes the current room and lists visible objects and containers.+- `examine OBJ`: Provides a detailed description of a specific object.+- `look at OBJ`: Describes a container's contents.+- `teleport to LOC`: Instantly moves the agent to a named room.++## Inventory Constraints+From the observed trajectory, the agent's inventory appears to hold one object at a time. The action `drop OBJ` (or its equivalent `move OBJ to LOC`) is used to place the held item back into the environment.diff --git a/experiments/src/skills/scienceworld/scienceworld-item-fetcher/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-item-fetcher/SKILL.mdnew file mode 100644index 0000000..da27844--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-item-fetcher/SKILL.md@@ -0,0 +1,33 @@+---+name: scienceworld-item-fetcher+description: This skill picks up a specified object from the environment and moves it into the agent's inventory. It should be triggered when the agent identifies a required tool or material (e.g., thermometer, metal pot) that needs to be collected for later use. The skill takes an object name as input and confirms the item's transfer to inventory, facilitating object manipulation across locations.+---+# Skill: Fetch and Inventory Item++## Purpose+Use this skill when you need to acquire a specific object for a task. It handles locating the object in the current environment and moving it into your inventory for later use.++## Core Workflow+1. **Identify Need:** Determine which object is required for your current or upcoming task (e.g., "thermometer", "metal pot").+2. **Locate Object:** Ensure you are in the correct room. Use `look around` to survey the environment and confirm the object is present and accessible.+3. **Execute Fetch:** Use the `pick up` action on the target object.+4. **Verify Success:** Confirm the system observation states the object has been moved to your inventory.++## Key Principles+* **Pre-check:** Always `look around` first to verify the object's presence and location (e.g., on a counter, in a container).+* **Direct Action:** Use the simple `pick up OBJ` command. Do not overcomplicate the sequence.+* **Inventory Focus:** After picking up the object, you may `focus on` it in your inventory to signal readiness for the next step in your main task.+* **Error Handling:** If `pick up` fails, the object might be inside a closed container. Ensure all relevant containers are open first.++## Example from Trajectory+**Scenario:** Needing a thermometer to measure temperature.+1. Observation: `a thermometer, currently reading a temperature of 10 degrees celsius` is seen in the kitchen.+2. Action: `pick up thermometer`+3. Result: `You move the thermometer to the inventory.`+4. (Optional) Action: `focus on thermometer in inventory`++## Input+* **Object Name:** The name of the object to fetch, as it appears in the environment observations (e.g., "thermometer", "metal pot").++## Output+* A confirmation observation that the object is now in the agent's inventory.diff --git a/experiments/src/skills/scienceworld/scienceworld-item-fetcher/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-item-fetcher/references/action_primer.mdnew file mode 100644index 0000000..4fc3648--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-item-fetcher/references/action_primer.md@@ -0,0 +1,18 @@+# Action Primer for Object Fetching++## Primary Action+`pick up OBJ`+* **Effect:** Moves the specified object from the environment into the agent's inventory.+* **Precondition:** The object must be present in the current room and accessible (not fixed, not inside a *closed* container).+* **Postcondition:** The object is listed in the agent's inventory and can be referenced as `OBJ in inventory`.++## Supporting Actions+* `look around`: **CRITICAL.** Use this to scan the current room and identify all visible objects and their states before attempting to pick anything up.+* `look at OBJ`: Use if you need to inspect the contents of a container (e.g., a cupboard, a pot) to find your target object.+* `focus on OBJ`: Use after a successful `pick up` to signal that the fetched item is the current subject of intent for the overarching task.+* `teleport to LOC`: Use to navigate to the room where the target object is located before beginning the fetch sequence.++## Common Pitfalls & Assumptions+* **Containers are Open:** The trajectory states "All containers in the environment have already been opened." Therefore, you can directly `pick up` items from within containers (e.g., from a pot, a cupboard) without needing to `open` them first.+* **Object Names:** Use the exact name as shown in observations. For example, if the observation says `a tin cup (containing a substance called lead)`, the object to pick up would be the `tin cup`, not `lead`. To fetch the substance itself, you might need to `move` it to another container first.+* **Inventory Management:** The skill is designed for single-object fetching. For complex tasks requiring multiple items, chain multiple executions of this skill.diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-filler/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-liquid-filler/SKILL.mdnew file mode 100644index 0000000..ca15b23--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-filler/SKILL.md@@ -0,0 +1,41 @@+---+name: scienceworld-liquid-filler+description: This skill fills a container with liquid from a source by first placing the container at the source, then activating the source (e.g., turning on a sink), and finally deactivating it. It should be triggered when the agent has an empty or partially filled container and needs to add a liquid component. The skill results in the container containing the liquid, ready for mixing or further use.+---+# Instructions++## 1. Identify the Goal+Your goal is to fill a target container with a specific liquid from a source. This skill is triggered when you have a container (empty or partially filled) and need to add a liquid component to it.++## 2. Prerequisites & Initial State+Before executing this skill, ensure you have:+* **A Target Container:** The container you wish to fill (e.g., a cup, bowl, jug). It should be in your inventory.+* **A Liquid Source Identified:** You must know the location of a functional liquid source (e.g., a sink, a jug containing liquid, a toilet with water). Use the `look around` and `examine` actions to find one.++## 3. Core Procedure+Execute the following sequence of actions precisely:++1. **Position the Container:** Move the target container to the liquid source.+ * **Action:** `move <CONTAINER> to <SOURCE>`+ * **Example:** `move cup to sink`++2. **Activate the Source:** Turn on the liquid source to begin the flow.+ * **Action:** `activate <SOURCE>`+ * **Example:** `activate sink`++3. **Deactivate the Source:** Turn off the liquid source once the container is sufficiently filled. Assume the filling is instantaneous upon activation.+ * **Action:** `deactivate <SOURCE>`+ * **Example:** `deactivate sink`++4. **Retrieve the Filled Container:** Pick up the now-filled container.+ * **Action:** `pick up <CONTAINER>`+ * **Example:** `pick up cup`++## 4. Verification & Next Steps+* Use `examine <CONTAINER>` to confirm it now contains the desired liquid.+* The container is now ready for the next step in your task (e.g., `mix`).++## 5. Important Notes+* **Efficiency:** Do not repeatedly pick up the container between steps unless necessary for transport. The sequence `move -> activate -> deactivate -> pick up` is optimal.+* **Error Handling:** If an action fails (e.g., "You can't do that"), re-examine the scene and the object states. The source may need to be in a specific state (e.g., a sink must be `turned off` before it can be activated).+* **Context:** This skill is part of a larger procedure (e.g., following a recipe). Always refer to the primary task goal.diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/SKILL.mdnew file mode 100644index 0000000..4d8c741--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/SKILL.md@@ -0,0 +1,27 @@+---+name: scienceworld-liquid-pourer+description: This skill transfers the contents of a source liquid container into a target container for mixing or preparation. It should be triggered when combining multiple substances, such as paints or chemicals, into a single vessel.+---+# Instructions for Liquid Pouring++This skill orchestrates the transfer of a liquid from a source container to a target container, typically as a preparatory step for mixing or chemical combination.++## Core Action+The primary action is `pour OBJ into OBJ`. Use this to transfer the contents.++## Execution Flow+1. **Identify Containers:** Locate the source container (holding the liquid to be transferred) and the target container (the destination vessel).+2. **Perform Transfer:** Execute the `pour` action with the correct object identifiers.+3. **Verify (Optional):** If necessary, examine the target container to confirm the transfer was successful.++## Key Considerations+* Ensure the target container is empty or can receive the new substance without adverse reaction (e.g., contamination).+* The skill is often used in sequence with other skills, such as `mix`, to achieve a final compound.+* Object identifiers (e.g., `wood cup (containing red paint)`) must be precise. Use `look around` and `examine` actions to confirm object states and contents if unsure.++## Example Usage+* **Goal:** Create orange paint by mixing red and yellow.+* **Procedure:**+ 1. `pour wood cup (containing red paint) into jug`+ 2. `pour wood cup (containing yellow paint) into jug`+ 3. `mix jug` (This is a separate mixing skill, not part of the pour operation).diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/references/action_primer.mdnew file mode 100644index 0000000..5e56c3d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-pourer/references/action_primer.md@@ -0,0 +1,13 @@+# Action Primer for ScienceWorld Environment++## Relevant Actions for Pouring Skill+* `pour OBJ into OBJ`: The core action. Transfers the contents of the first object (source) into the second object (target).+* `look around`: Describes the current room and lists all visible objects and containers. Use this to find source and target containers.+* `examine OBJ`: Provides a detailed description of a specific object, which can help verify its contents or state.+* `look at OBJ`: Describes a container's contents. Useful for checking what is inside a cupboard or on a table before and after pouring.++## Environment Notes (From Trajectory)+* All containers are already opened. You can directly interact with items inside them.+* You can `teleport to LOC` to move between rooms quickly.+* Common rooms for materials: `art studio` (for paints), `workshop`, `greenhouse`.+* Common target containers: `jug`, `bowl`, `wood cup`.diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/SKILL.mdnew file mode 100644index 0000000..38e7745--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/SKILL.md@@ -0,0 +1,41 @@+---+name: scienceworld-liquid-source-finder+description: This skill searches rooms for a liquid source (e.g., sink, toilet, jug) by sequentially surveying different locations. It should be triggered when the task requires obtaining a liquid (like water) and the agent does not have immediate access to it. The skill involves teleporting to candidate rooms, looking around, and identifying potential sources, guiding the agent toward the nearest available liquid.+---+# Skill: Liquid Source Finder++## When to Use+Activate this skill when your primary task requires a liquid (e.g., water, juice, paint) and you have confirmed it is not present in your current inventory or immediate vicinity.++## Core Procedure+1. **Initiate Search:** If no liquid source is visible, begin a systematic room survey.+2. **Prioritize Rooms:** Teleport to and survey rooms in this order of likelihood:+ * **Kitchen** (high priority - contains sink, fridge, cups)+ * **Bathroom** (high priority - contains sink, toilet, bathtub)+ * **Greenhouse** (medium priority - contains sink, jugs)+ * **Workshop** (medium priority - may contain specialized containers)+ * **Art Studio** (low priority - may contain paint or water for cleaning)+ * **Living Room, Bedroom, Hallway** (low priority - check for any containers)+3. **Survey Each Room:**+ * Use `look around` upon arrival.+ * Visually scan the observation for liquid sources or containers that might hold liquid (e.g., `sink`, `toilet`, `jug`, `cup`, `bathtub`).+ * If a source is found (e.g., a `sink`), proceed to obtain the liquid. If a container is found (e.g., a `jug`), `examine` it or `look at` it to check its contents.+4. **Obtain the Liquid:**+ * If the liquid is in a portable container (e.g., `cup containing water`), simply `pick up` the container.+ * If the liquid is in a fixed source (e.g., `sink`, `toilet`):+ a. Ensure you have an empty container in your inventory. If not, find one (e.g., a `cup`).+ b. `move` your container to the source.+ c. `activate` the source if necessary (e.g., turn on the sink).+ d. `deactivate` the source once done.+ e. `pick up` the now-filled container.+5. **Terminate Search:** Once the required liquid is successfully obtained and in your inventory, conclude the skill and return to the main task flow.++## Key Principles+* **Efficiency:** Do not re-survey rooms unnecessarily. Keep mental note of rooms already visited.+* **Container Management:** Always ensure you have a suitable container before attempting to collect liquid from a non-portable source.+* **Observation Parsing:** Focus on object names and their described contents. Look for keywords like `water`, `juice`, or the name of your target liquid, and objects like `sink`, `toilet`, `jug`.++## Quick Reference+**Trigger:** Need liquid, don't have it.+**Action Loop:** Teleport -> `look around` -> Identify source -> Collect.+**Success:** Liquid is in inventory.diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/action_glossary.md b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/action_glossary.mdnew file mode 100644index 0000000..e317014--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/action_glossary.md@@ -0,0 +1,18 @@+# Action Glossary for Liquid Retrieval++A concise guide to the ScienceWorld actions relevant to this skill.++## Survey & Navigation+* `teleport to LOC`: Instantly move to another room. Use this to jump between search locations.+* `look around`: Get a description of the current room and all visible objects. **Use this first in every new room.**++## Inspection+* `examine OBJ`: Get a detailed description of a specific object, including its current contents. Useful for checking what's inside a container you're holding.+* `look at OBJ`: Describe a container's contents. Useful for checking fixed containers (e.g., `look at toilet`).++## Container & Liquid Manipulation+* `pick up OBJ`: Move an object from the environment into your inventory.+* `move OBJ to OBJ`: Move an object to a container or location. (e.g., `move cup to sink`).+* `activate OBJ`: Turn on a device (e.g., `activate sink` to start water flow).+* `deactivate OBJ`: Turn off a device (e.g., `deactivate sink`).+* `pour OBJ into OBJ`: Transfer liquid between containers. (Not used in the base trajectory but potentially useful).diff --git a/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/room_priority.md b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/room_priority.mdnew file mode 100644index 0000000..8cc65e4--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-liquid-source-find/references/room_priority.md@@ -0,0 +1,18 @@+# Room Priority Guide for Liquid Sources++This guide ranks rooms based on the observed likelihood of containing accessible liquids in the ScienceWorld environment. Use this to inform the search order.++## Tier 1: High Probability+* **Kitchen:** Contains multiple fixed sources (`sink`) and portable containers (`cup`, `pot`, `jar`). Often has consumable liquids (e.g., `orange juice` in fridge).+* **Bathroom:** Contains fixed sources (`sink`, `toilet`, `bathtub`). Frequently has `water`.++## Tier 2: Medium Probability+* **Greenhouse:** Contains a `sink` and often `jug` containers for watering plants.+* **Workshop:** May contain beakers, flasks, or other lab equipment that could hold liquids. Check tables and containers.++## Tier 3: Low Probability+* **Art Studio:** May contain `paint` in cups or jugs. Could have water for cleaning brushes.+* **Living Room / Bedroom / Hallway:** Typically dry rooms. Only check if all other options are exhausted; look for any stray `cup` or `bottle`.++## Tier 4: Very Low Probability+* **Foundry, Outside:** Not observed in the trajectory to contain standard liquids. Check only if explicitly relevant to the task (e.g., needing molten metal or rainwater).diff --git a/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/SKILL.mdnew file mode 100644index 0000000..bf3d248--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/SKILL.md@@ -0,0 +1,25 @@+---+name: scienceworld-living-entity-identifier+description: Analyzes room observations to identify potential living things (e.g., eggs, plants, animals) among listed objects. Processes observation text, flags candidate living items based on domain knowledge, and outputs a focused target for subsequent actions.+---+# Skill: Living Entity Identifier++## Purpose+Use this skill when the task involves finding, focusing on, or interacting with a "living thing," "biological entity," "organism," or similar target. The skill analyzes the textual observation of a room to identify candidate objects that are likely to be living or contain life (e.g., eggs, plants, animals).++## Core Logic+1. **Trigger:** The task description mentions a living entity.+2. **Analyze:** Parse the current room's observation text.+3. **Identify:** Flag objects from a known list of living entity indicators (see `references/living_indicators.md`).+4. **Output:** Select the most suitable candidate and formulate the next action (typically `focus on [TARGET]` or `examine [TARGET]`).++## Primary Workflow+1. **Look Around:** First, use `look around` to get the room's observation text.+2. **Run Analysis:** Process the observation using the logic in `scripts/analyze_observation.py`.+3. **Execute Focus:** If a candidate is found, perform `focus on [IDENTIFIED_OBJECT]`.+4. **Handle Inventory/Transport:** If the task requires moving the entity, proceed with `pick up` and `move` actions to the specified destination.++## Key Rules+* Prioritize explicit living things (e.g., "dove egg," "giant tortoise") over ambiguous substances (e.g., "air," "water").+* If the initial room lacks candidates, teleport to rooms with higher biological likelihood (e.g., `outside`, `greenhouse`, `bedroom`).+* The `focus on` action is critical for signaling task progress. Use it immediately after identification.diff --git a/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/action_sequences.md b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/action_sequences.mdnew file mode 100644index 0000000..f3d5330--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/action_sequences.md@@ -0,0 +1,5 @@+# Standard Action Sequences++This document outlines the typical action flow for tasks involving living entities.++## Basic Identification Flowdiff --git a/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/living_indicators.md b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/living_indicators.mdnew file mode 100644index 0000000..7bffb98--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-living-entity-identifier/references/living_indicators.md@@ -0,0 +1,36 @@+# Living Entity Indicators Reference++This document lists terms and patterns that signal a potential living thing in the ScienceWorld environment. Use this list to update the `LIVING_INDICATORS` in the analysis script.++## High-Confidence Indicators+These terms almost always refer to living entities or their direct products:+* **Eggs:** `egg`, `spawn`, `embryo`+* **Plants:** `plant`, `flower`, `seed`, `sapling`, `tree`, `leaf`, `root`, `mushroom`, `fungus`+* **Animals:** `animal`, `bird`, `fish`, `insect`, `mammal`, `reptile`, `amphibian`+* **Specific Animals:** `dove`, `tortoise`, `butterfly`, `frog`, `mouse`, `rat`, `cat`, `dog`+* **Life Stages:** `larva`, `pupa`, `tadpole`, `seedling`++## Medium-Confidence Indicators+These may be living or derived from living things:+* `living`, `organism`, `biological`, `creature`, `being`+* `nest`, `hive`, `web` (signs of animal activity)+* `fruit`, `vegetable`, `nut` (plant reproductive parts)++## Low-Confidence/Ambiguous Indicators+These are often substances or non-living objects:+* `air`, `water`, `soil` (substances)+* `wood`, `bone`, `leather` (derived from living things but not alive)+* `book`, `painting`, `chair` (inanimate objects)++## Environmental Context Clues+Rooms with higher probability of containing living things:+1. **Outside:** Highest probability (eggs, plants, animals)+2. **Greenhouse:** High probability (plants, seeds)+3. **Bedroom/Living Room:** Low probability (pets, plants possible)+4. **Kitchen/Workshop:** Very low probability (processed materials)++## Parsing Rules for Observation Text+1. Objects listed as "a substance called X" are rarely living entities.+2. Objects in parentheses "(containing...)" should be examined separately.+3. Objects described with multiple words (e.g., "giant tortoise egg") should be treated as a single entity.+4. Always prefer the most specific identifier (e.g., "dove egg" over just "egg").diff --git a/experiments/src/skills/scienceworld/scienceworld-material-classifier/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-material-classifier/SKILL.mdnew file mode 100644index 0000000..1781ef1--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-material-classifier/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-material-classifier+description: This skill makes a determination about a material's property (e.g., conductivity) based on environmental cues or domain knowledge when direct testing fails. Trigger it when experimental actions are invalid or unavailable, requiring a logical inference. It uses observed object properties and common-sense reasoning to classify the material and decide its final disposition.+---+# Material Classification Skill++## When to Use+Activate this skill when:+1. Direct experimental testing of a material property (conductivity, magnetism, etc.) fails due to invalid actions or unavailable equipment.+2. You need to make a logical inference based on observed properties or domain knowledge.+3. A final disposition decision (e.g., placing in specific container) is required.++## Core Logic+1. **Identify Material**: Focus on the target object and note its composition (e.g., "glass jar").+2. **Attempt Direct Testing**: First try standard experimental actions if equipment exists (e.g., connecting to circuit).+3. **Fallback to Inference**: When direct testing fails:+ - Consult material properties in `references/material_properties.md`+ - Use common-sense reasoning (e.g., glass is typically nonconductive)+ - Consider observed contents (e.g., sodium chloride is conductive but container material dominates)+4. **Execute Disposition**: Place the object in the appropriate container based on classification.++## Critical Notes+- Glass containers are generally electrical insulators regardless of contents+- Metal objects are typically conductive unless specified otherwise+- When in doubt, use the most common material property from domain knowledge+- Always verify the target object is properly identified before classificationdiff --git a/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.json b/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.jsonnew file mode 100644index 0000000..deb03ed--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.json@@ -0,0 +1,38 @@+{+ "glass": {+ "conductivity": "nonconductive",+ "certainty": "high",+ "examples": ["jar", "bottle", "window", "cup"],+ "notes": "Electrical insulator even when containing conductive substances"+ },+ "metal": {+ "conductivity": "conductive",+ "certainty": "high",+ "examples": ["wire", "pot", "cup", "tool"],+ "notes": "Good conductor of electricity unless specifically coated/insulated"+ },+ "ceramic": {+ "conductivity": "nonconductive",+ "certainty": "high",+ "examples": ["cup", "plate", "tile", "insulator"],+ "notes": "Common electrical insulator material"+ },+ "wood": {+ "conductivity": "nonconductive",+ "certainty": "medium",+ "examples": ["cup", "chair", "table", "bowl"],+ "notes": "Nonconductive when dry; conductive when wet"+ },+ "plastic": {+ "conductivity": "nonconductive",+ "certainty": "high",+ "examples": ["container", "bag", "tool", "utensil"],+ "notes": "Excellent electrical insulator"+ },+ "graphite": {+ "conductivity": "conductive",+ "certainty": "medium",+ "examples": ["pencil", "electrode"],+ "notes": "Moderate conductor used in electronics"+ }+}diff --git a/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.md b/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.mdnew file mode 100644index 0000000..f6e7c31--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-material-classifier/references/material_properties.md@@ -0,0 +1,36 @@+# Common Material Properties++## Electrical Conductivity++### Conductive Materials (Place in Orange Box)+- **Metals**: copper, aluminum, iron, steel, silver, gold+- **Graphite**: pencils, electrodes+- **Electrolyte solutions**: salt water, acid solutions+- **Human body**: when wet++### Nonconductive Materials (Place in Yellow Box)+- **Glass**: windows, jars, bottles+- **Ceramics**: cups, plates, insulators+- **Plastics**: most synthetic materials+- **Wood**: dry wood, furniture+- **Rubber**: gloves, tires+- **Air**: dry air at normal conditions++## Important Notes+1. **Container vs Contents**: The container material determines conductivity, not its contents.+ - Glass jar with salt: NONCONDUCTIVE (glass insulator)+ - Metal cup with water: CONDUCTIVE (metal conductor)++2. **Condition Matters**:+ - Dry wood: nonconductive+ - Wet wood: conductive+ - Clean glass: nonconductive+ - Coated glass: check coating material++3. **Testing Fallback Logic**:+ When direct circuit testing fails:+ - Check material composition first+ - Use common-sense knowledge+ - Default to nonconductive for unknown materials++## Decision Flowchartdiff --git a/experiments/src/skills/scienceworld/scienceworld-measurement-taker/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/SKILL.mdnew file mode 100644index 0000000..da2245d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/SKILL.md@@ -0,0 +1,24 @@+---+name: scienceworld-measurement-taker+description: This skill uses a measurement tool (like a thermometer) on a target substance or object to obtain a quantitative reading. It should be triggered when the task requires assessing a property (e.g., temperature) to make a conditional decision. The skill outputs the measured value, which determines subsequent actions such as classification or placement.+---+# Measurement Taker Skill++## Purpose+Use this skill when you need to measure a quantitative property (e.g., temperature, weight, pH) of a target object or substance to inform a subsequent decision or action.++## Core Workflow+1. **Identify & Acquire Tool:** Locate and obtain the correct measurement tool (e.g., thermometer, scale).+2. **Identify & Acquire Target:** Locate and obtain the target object or substance to be measured.+3. **Prepare Measurement Environment:** Move to a location suitable for the measurement and any required follow-up actions (e.g., near classification bins).+4. **Execute Measurement:** Use the tool on the target to obtain the numerical reading.+5. **Interpret & Act:** Based on the measured value and the task's conditional logic, execute the appropriate follow-up action (e.g., place the target in a specific container).++## Key Principles+* **Tool First:** Secure the measurement tool before handling the target, unless the task specifies otherwise.+* **Environmental Awareness:** Proactively identify where follow-up actions (like placement) will occur and position yourself accordingly before measuring.+* **Verification:** Use `focus on` actions to confirm you have the correct tool and target in your inventory before proceeding.+* **Conditional Logic:** The measured value directly determines the next action. Clearly map out the decision thresholds (e.g., "above 100.0", "below 100.0") before measuring.++## Common Actions Sequence+`look around` β `teleport to [Room]` β `pick up [Tool]` β `focus on [Tool]` β `pick up [Target]` β `focus on [Target]` β `teleport to [Action Room]` β `use [Tool] on [Target]` β `[Conditional Action based on reading]`diff --git a/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/action_glossary.md b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/action_glossary.mdnew file mode 100644index 0000000..55a0faf--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/action_glossary.md@@ -0,0 +1,20 @@+# ScienceWorld Action Glossary for Measurement++## Core Measurement Actions+* `use TOOL on TARGET`: The primary action for obtaining a measurement. Triggers the tool's function on the target and returns a reading in the observation.+* `focus on OBJECT`: Signals intent on a task-critical object. Use this on the measurement tool and target after picking them up to confirm readiness.++## Navigation & Search Actions+* `teleport to ROOM`: Instantly move to any named room. Use this to efficiently locate tools, targets, and move to the decision location.+* `look around`: Describes the current room and lists all visible objects. The primary action for searching.++## Inventory Management Actions+* `pick up OBJECT`: Moves a portable object from the environment into your inventory. Required before you can `use` or `focus on` it.+* `move OBJECT to CONTAINER`: Places an object from your inventory into a container (e.g., a box). The key follow-up action after measurement.++## Conditional Logic in Observations+The observation from `use TOOL on TARGET` contains the measurement result. Parsing is environment-specific but typically follows patterns like:+* `"the thermometer measures a temperature of 44 degrees celsius"`+* `"the scale reads 120.5 grams"`++**Parsing Tip:** Use simple regex (e.g., `r'(\d+(?:\.\d+)?)'`) to extract the numeric value from the observation string.diff --git a/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/decision_workflow.md b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/decision_workflow.mdnew file mode 100644index 0000000..83a3c6e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-measurement-taker/references/decision_workflow.md@@ -0,0 +1,27 @@+# Decision Workflow for Measurement-Based Tasks++This document outlines the thought process for planning and executing a measurement task, based on the successful trajectory.++## 1. Task Decomposition+* **Input:** "Measure property of TARGET and perform ACTION_A if value > X, else ACTION_B."+* **Decomposed Steps:**+ 1. Identify the required measurement `TOOL`.+ 2. Identify the `TARGET` object/substance.+ 3. Identify the location for `ACTION_A` and `ACTION_B` (e.g., `CONTAINER_A`, `CONTAINER_B`).+ 4. Identify the `DECISION_ROOM` where these containers are located.++## 2. Strategic Sequencing+**Optimal Order:** `Get TOOL` β `Get TARGET` β `Go to DECISION_ROOM` β `Measure` β `Act`.+* **Why?** Measuring in the decision room minimizes unnecessary movement after obtaining the fragile measurement result, allowing immediate conditional action.++## 3. State Verification Checklist+Before executing `use TOOL on TARGET`, confirm:+- [ ] `TOOL` is in inventory. (Verify with `focus on TOOL`)+- [ ] `TARGET` is in inventory. (Verify with `focus on TARGET`)+- [ ] Current room is `DECISION_ROOM`.+- [ ] `CONTAINER_A` and `CONTAINER_B` are visible in the room (verified via `look around`).++## 4. Error Recovery Notes+* **Tool/Target Not Found:** Use `teleport` to likely rooms (e.g., `kitchen`, `workshop` for tools; location specified in task for target) and `look around` systematically.+* **Unparseable Observation:** If the `use` action doesn't return a clear number, try `examine TARGET` or `examine TOOL` for clues, or ensure the target is a valid substance for the tool.+* **Wrong Room:** If you measure before reaching the decision room, simply `teleport to DECISION_ROOM` and proceed with the conditional action. The measurement result is retained.diff --git a/experiments/src/skills/scienceworld/scienceworld-mixture-creator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-mixture-creator/SKILL.mdnew file mode 100644index 0000000..e69e571--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-mixture-creator/SKILL.md@@ -0,0 +1,27 @@+---+name: scienceworld-mixture-creator+description: This skill chemically mixes the contents of a container using the 'mix' action. It should be triggered when all required ingredients (e.g., sodium chloride and water) are present inside a container and the agent needs to combine them to produce a new substance. The skill performs the mixing operation and outputs the resulting product, completing the synthesis step of the task.+---+# Skill: Chemical Mixture Creator++## Purpose+Execute the `mix` action on a container to chemically combine its contents into a new substance, as defined by the environment's chemistry system. This skill is the final step in a synthesis task after all required ingredients have been gathered into a single container.++## When to Use+- **Trigger Condition:** You have confirmed that a container in your inventory or the environment holds all the required chemical ingredients for a target substance.+- **Prerequisite:** You have already used `move` or `pour` actions to place the correct ingredients into the target container.+- **Verification:** You have used `examine <container>` and observed the required ingredients listed in its contents.++## Core Instruction+1. Ensure the target container is in your inventory or accessible in the current room.+2. Execute the action: `mix <container>`.+3. The environment will process the chemistry and output the resulting substance.++## Important Notes+- This skill only performs the final `mix` action. Locating ingredients, finding containers, and combining them are separate exploration and manipulation tasks.+- The `mix` action is deterministic. If the correct ingredients are present, the reaction will always succeed.+- After mixing, you may need to `focus on <new_substance>` or `examine <container>` to confirm the task is complete.+- Do not attempt to `mix` a container that does not contain the precise ingredients listed in the recipe.++## Related Reference+For common chemical recipes (e.g., salt water = sodium chloride + water), see `references/common_recipes.md`.diff --git a/experiments/src/skills/scienceworld/scienceworld-mixture-creator/references/common_recipes.md b/experiments/src/skills/scienceworld/scienceworld-mixture-creator/references/common_recipes.mdnew file mode 100644index 0000000..0f3fac3--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-mixture-creator/references/common_recipes.md@@ -0,0 +1,19 @@+# Common Chemical Recipes++This document lists observed chemical mixtures from the execution trajectory. Use this for reference when planning synthesis tasks.++## Recipe: Salt Water+- **Target Substance:** `salt water`+- **Required Ingredients:** `sodium chloride`, `water`+- **Process:**+ 1. Obtain a container (e.g., `glass cup`).+ 2. Place `sodium chloride` into the container.+ 3. Add `water` to the same container (e.g., by moving the container to an activated `sink`).+ 4. Execute `mix <container>`.++## General Workflow for Any Mixture+1. **Find Recipe:** Locate and `read` a recipe note or book in the environment (common in `workshop`).+2. **Gather Ingredients:** Explore rooms to find the listed substances. Use `look around` and `examine` objects.+3. **Acquire Container:** Find an empty container (e.g., `cup`, `bowl`, `pot`) using `look around`. `pick up` the container.+4. **Combine Ingredients:** Use `move <ingredient> to <container>` or `pour <ingredient> into <container>` to place all ingredients into the same container. Ensure the container is in your inventory afterward (`pick up <container>`).+5. **Execute Mix:** Use the `scienceworld-mixture-creator` skill: `mix <container>`.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-classifier/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-classifier/SKILL.mdnew file mode 100644index 0000000..945ea63--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-classifier/SKILL.md@@ -0,0 +1,28 @@+---+name: scienceworld-object-classifier+description: Moves a tested or examined object into a designated container (e.g., a specific colored box) based on a determined property. Trigger this skill after completing a test or inspection to fulfill a classification or sorting subtask. It takes the object and target container as inputs and performs the move action.+---+# Instructions++## Purpose+This skill is used to finalize a classification task by moving an object into its designated container. It is triggered **after** a property test or inspection has been completed and a decision has been made.++## Prerequisites+1. **Object Location:** The object to be classified must be present in the current room's environment (e.g., on the floor, on a table).+2. **Container Location:** The target container (e.g., yellow box, purple box) must be present in the current room's environment.+3. **Decision Made:** You must have already determined the object's property (e.g., electrically conductive vs. non-conductive) and know which container corresponds to that property.++## Core Action+Execute the `move` command to transfer the object into the correct container.+* **Command Format:** `move <OBJECT> to <CONTAINER>`+* **Example:** `move metal pot to yellow box`++## Workflow+1. **Confirm Environment:** Use `look around` to verify the object and target container are present.+2. **Execute Move:** Perform the `move` action.+3. **Verify:** Optionally, `look at <CONTAINER>` to confirm the object is now inside.++## Important Notes+* This skill is for the **final sorting action only**. Do not use it to perform the initial test or inspection.+* Ensure the object is not in your inventory. If it is, drop it first (`drop <OBJECT>`).+* The skill assumes the classification logic (e.g., interpreting a circuit test) has already been handled by a prior process.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-classifier/references/conductivity_test_guide.md b/experiments/src/skills/scienceworld/scienceworld-object-classifier/references/conductivity_test_guide.mdnew file mode 100644index 0000000..4786c04--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-classifier/references/conductivity_test_guide.md@@ -0,0 +1,32 @@+# Guide: Testing Electrical Conductivity in ScienceWorld++This reference outlines a method for determining if an object is electrically conductive, as demonstrated in the skill trajectory. Use this logic **before** triggering the `scienceworld-object-classifier` skill.++## Required Components+A basic series circuit can be constructed to test conductivity. Common components found in the `workshop` include:+* **Power Source:** Battery (has `anode` and `cathode` terminals).+* **Conductors:** Wires (e.g., `blue wire`, `yellow wire`, `black wire`). Each wire has two terminals (`terminal 1`, `terminal 2`).+* **Load/Indicator:** An `electric motor` or `light bulb` (has `anode` and `cathode` terminals). The motor turning on or the bulb lighting up indicates a complete circuit.+* **Test Object:** The object in question (e.g., `metal pot`).++## Test Procedure+1. **Construct Base Circuit:**+ * Connect the battery's `anode` to one terminal of a wire.+ * Connect that wire's other terminal to the `cathode` of the load (motor/bulb).+ * Connect the battery's `cathode` to one terminal of a second wire.+ * Connect the load's `anode` to one terminal of a third wire.+ * **At this point, the circuit is open.** The second and third wires have free terminals.++2. **Integrate Test Object:**+ * Connect the free terminal of the wire from the battery's cathode (e.g., `yellow wire terminal 2`) to one terminal of the test object.+ * Connect the free terminal of the wire from the load's anode (e.g., `black wire terminal 1`) to the other terminal of the test object.+ * This places the test object in series within the circuit.++3. **Observe and Classify:**+ * **If Conductive:** The circuit is complete. The load (e.g., `electric motor`) will turn `on`.+ * **If Non-Conductive:** The circuit remains open. The load will stay `off`.+ * Use `look around` or `examine electric motor` to check its state (`on`/`off`).++## Classification Rule+* **Conductive Object (`on` state):** Place in the `yellow box`.+* **Non-Conductive Object (`off` state):** Place in the `purple box`.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-focuser/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-focuser/SKILL.mdnew file mode 100644index 0000000..132185b--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-focuser/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-object-focuser+description: This skill selects and focuses on a specific object to signal task intent or prepare it for manipulation. It is triggered after identifying a target object that meets task criteria (e.g., a living thing). The skill uses the 'focus on OBJ' action, taking the object name as input, which is often required before performing actions like moving or using the object in scienceWorld tasks.+---+# Skill: Object Focuser++## Purpose+Use this skill to formally select a target object in the ScienceWorld environment. The `focus on` action signals your intent to the task system and is often a prerequisite for subsequent manipulation steps like `pick up` or `move`.++## When to Use+* After you have identified an object that matches the task's criteria (e.g., "a living thing", "a conductive material").+* Before you attempt to pick up, move, or use that object as part of the task sequence.+* When the task trajectory or environment feedback suggests an object needs to be "focused on" to proceed.++## Core Instruction+1. **Identify the Target:** From your observation (`look around`, `examine`), determine the exact name of the object you intend to use for the task.+2. **Execute Focus:** Use the action: `focus on <OBJECT_NAME>`.+ * Replace `<OBJECT_NAME>` with the precise noun phrase from the environment (e.g., `dove egg`, `copper wire`, `beaker`).+3. **Proceed:** After receiving a confirmation observation, continue with the next step in your plan (e.g., `pick up <OBJECT_NAME>`, `move <OBJECT_NAME> to ...`).++## Key Considerations+* **Object Naming:** Use the name exactly as it appears in observations. The system is case-sensitive and expects the full descriptor (e.g., "dove egg", not just "dove" or "egg").+* **Timing:** Focus is typically performed *after* exploration/identification and *before* the main manipulation action.+* **Task Logic:** This action is a procedural formality within ScienceWorld. It does not change the object's state but informs the task tracker of your selected target.++For detailed examples and common patterns, see the reference documentation.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-focuser/references/usage_examples.md b/experiments/src/skills/scienceworld/scienceworld-object-focuser/references/usage_examples.mdnew file mode 100644index 0000000..9ecce57--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-focuser/references/usage_examples.md@@ -0,0 +1,34 @@+# Usage Examples & Patterns++## Example 1: Basic Focus & Move (from Trajectory)+**Task:** "Find a living thing. First, focus on the thing. Then, move it to the orange box in the workshop."++**Agent Execution:**+1. Explore (`look around`) multiple rooms (living room, outside).+2. **Identify Target:** In `outside`, observe `a dove egg`.+3. **Apply Skill:** `focus on dove egg`+4. **Result:** Observation confirms focus.+5. **Next Action:** `pick up dove egg`, then `move dove egg to orange box`.++**Key Takeaway:** The skill is applied immediately after identifying the task-relevant object.++## Example 2: Focus as a Prerequisite+**Task:** "Create a circuit. Connect the battery to the light bulb."++**Potential Execution:**+1. Locate `battery` and `light bulb` via `examine`.+2. The task may require focusing on components before `connect`.+3. **Apply Skill:** `focus on battery`+4. **Next Action:** `connect battery to light bulb`++**Key Takeaway:** `focus` can be a required step before specific interaction verbs like `connect`.++## Common Patterns+* **Exploration -> Identification -> Focus -> Manipulation:** The standard workflow.+* **Re-focusing:** If you switch targets mid-task, you may need to `focus on` the new object.+* **Implicit Focus:** Some objects may not require explicit focus. Use the skill when the task explicitly states it, or if a manipulation action fails without it.++## Anti-Patterns to Avoid+* **Focusing on Non-Objects:** Do not `focus on` substances (e.g., `air`, `water`) or rooms.+* **Incorrect Name:** `focus on dove` (incorrect) vs. `focus on dove egg` (correct). Always use the full name from the observation.+* **Premature Focus:** Do not focus before confirming the object meets the task criteria.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-locator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-locator/SKILL.mdnew file mode 100644index 0000000..772ba7c--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-locator/SKILL.md@@ -0,0 +1,36 @@+---+name: scienceworld-object-locator+description: This skill searches for a specific target object across multiple rooms by systematically teleporting to likely locations and examining each room. It should be triggered when the agent needs to find an object whose exact location is unknown. The skill involves iterating through candidate rooms, using room exploration to check for the object, and continues until the target is found, providing the object's location as output.+---+# Instructions++## Purpose+Locate a specific target object within the ScienceWorld environment when its location is unknown.++## Inputs+- **Target Object:** The name of the object to find (e.g., "thermometer", "metal fork").+- **Candidate Rooms (Optional):** A list of room names to search. If not provided, the skill will use a default priority list based on common object locations.++## Core Process+1. **Initialize:** Receive the target object name.+2. **Plan Search Order:** Determine the sequence of rooms to search. Use the provided `prioritize_rooms.py` script to generate an optimal search order based on the target object.+3. **Execute Search Loop:**+ a. Teleport to the next room in the search order.+ b. Use the `look around` action to observe the room's contents.+ c. Parse the observation to check for the presence of the target object.+ d. If the object is found, **stop the search** and output its location.+ e. If the object is not found, proceed to the next room.+4. **Output:** Report the room where the object was found. If the object is not found after searching all candidate rooms, report this failure.++## Key Actions+- `teleport to <ROOM_NAME>`+- `look around`+- `examine <OBJECT>` (if more detail is needed to confirm identity)+- `pick up <OBJECT>` (if the goal is to acquire the object, not just locate it)++## Notes & Best Practices+- **Efficiency:** Always `look around` immediately after teleporting to get the full room state.+- **Parsing:** Observations list objects after "you see:". Check this list for the target object's name.+- **Confirmation:** If an object's name is ambiguous (e.g., "fork" could be "metal fork" or "plastic fork"), use `examine` to get a detailed description.+- **Inventory:** If the task requires using the object, remember to `pick it up` after finding it.+- **Error Handling:** If an object is not in its most likely room, the systematic search will eventually find it. Do not give up after the first few rooms.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_guide.md b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_guide.mdnew file mode 100644index 0000000..cfe8b1c--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_guide.md@@ -0,0 +1,35 @@+# ScienceWorld Action Guide for Object Location++## Core Actions for Search++### `teleport to <ROOM_NAME>`+- **Purpose:** Instantly move the agent to a specified room.+- **Usage:** `teleport to kitchen`+- **Note:** This is the primary movement action. Use it to navigate between candidate rooms efficiently.++### `look around`+- **Purpose:** Describes the current room, listing all visible objects and containers.+- **Output Format:** "This room is called <ROOM_NAME>. In it, you see: ..."+- **Critical Step:** Always perform this immediately after teleporting to a new room. The object list is in the observation text.++### `examine <OBJECT>`+- **Purpose:** Provides a detailed description of a specific object.+- **Usage:** `examine metal fork`+- **When to Use:** To confirm the identity of an object if its name in the `look around` output is ambiguous or if you need specific properties (e.g., "Is this the *metal* fork or a *plastic* fork?").++### `pick up <OBJECT>`+- **Purpose:** Moves an object from the environment into the agent's inventory.+- **Usage:** `pick up thermometer`+- **When to Use:** If the goal is to acquire and use the object, not just note its location. Perform this after confirming the object's identity.++## Parsing `look around` Observations+The observation text after `look around` is key. Objects are listed after "you see:".+- **Example:** `a thermometer, currently reading a temperature of 10 degrees celsius`+- **Strategy:** Check if the target object's name appears as a separate line item in this list. Simple string matching (e.g., `"thermometer" in observation`) is often sufficient.++## Room Connectivity+Rooms are connected by doors, but the `teleport` action makes physical navigation unnecessary. Focus on the search plan, not door states.++## Inventory Management+- Use `focus on <OBJECT> in inventory` to signal intent on an object you are carrying.+- The trajectory shows that objects in inventory can be used on each other (e.g., `use thermometer on metal fork`).diff --git a/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_primer.mdnew file mode 100644index 0000000..c1c45a0--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/action_primer.md@@ -0,0 +1,12 @@+# Action Primer for ScienceWorld Object Location++## Core Action for This Skill+- `look around`: Describes the current room, listing all visible objects and their states. This is the primary action for environmental awareness.++## Related Actions (For Subsequent Steps)+- `pick up OBJ`: Moves a found object from the room to the agent's inventory.+- `examine OBJ`: Provides a detailed description of a specific object (useful for verification).+- `teleport to LOC`: Moves the agent to a different room to continue the search.++## Observation Format+A typical `look around` observation has this structure:diff --git a/experiments/src/skills/scienceworld/scienceworld-object-locator/references/example_trajectory_breakdown.md b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/example_trajectory_breakdown.mdnew file mode 100644index 0000000..ce4b7bf--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-locator/references/example_trajectory_breakdown.md@@ -0,0 +1,34 @@+# Example Trajectory Breakdown++This document breaks down the provided execution trajectory to illustrate the skill's logic.++## Task+"Measure the temperature of metal fork, which is located around the bedroom."++## Implicit Sub-Task: Locate the Thermometer+The agent does not know where the thermometer is, triggering the object location skill.++### Search Execution (For Thermometer)+1. **Initial State:** Agent is in `workshop`.+2. **Action:** `look around` (in workshop).+ * **Observation:** No thermometer found.+3. **Decision:** Teleport to a likely room (`kitchen`).+4. **Action:** `teleport to kitchen`+5. **Action:** `look around` (in kitchen).+ * **Observation:** Thermometer found on the table.+6. **Result:** Search successful. Object located in `kitchen`.++### Search Execution (For Metal Fork)+1. **Known Location:** Task states "located around the bedroom."+2. **Action:** `teleport to bedroom`+3. **Action:** `look around` (in bedroom).+ * **Observation:** Metal fork found.+4. **Result:** Search successful. Object located in `bedroom`.++## Skill Principles Demonstrated+1. **Systematic Search:** When the thermometer wasn't in the first room (workshop), the agent moved to the next likely candidate (kitchen).+2. **Room Examination:** Used `look around` in each new room to get the object list.+3. **Action Efficiency:** Used `teleport` for instant movement between search locations.+4. **Parsing Simplicity:** Identified the target object by name in the observation text.++## Flowchart Summarydiff --git a/experiments/src/skills/scienceworld/scienceworld-object-placer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-placer/SKILL.mdnew file mode 100644index 0000000..db395bd--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-placer/SKILL.md@@ -0,0 +1,32 @@+---+name: scienceworld-object-placer+description: Moves a specified object from the environment or inventory into a target container based on a classification decision. It should be triggered when a task requires sorting or storing an object in a specific location after an assessment.+---+# Instructions++This skill orchestrates the final step of a conditional workflow: moving an object to a designated container after its properties have been assessed.++## When to Use+Use this skill when the primary task involves:+1. **Classifying an object** (e.g., testing for conductivity, checking material type, verifying a state).+2. **Conditionally placing the object** based on the classification result (e.g., "if property X, place in Container A; else, place in Container B").++## Core Action+The skill's primary action is `move OBJ to OBJ`. Ensure the target object is identified and the correct destination container is selected based on the prior assessment.++## Prerequisites+Before executing this skill, the following must be true:+* The target object has been located and is accessible (in the environment or inventory).+* The classification test or assessment has been completed.+* The result of the assessment is known and the corresponding destination container has been identified.++## Execution Flow+1. **Confirm Context:** Verify the assessment result and the identity of the destination container (e.g., "blue box" for conductive, "orange box" for non-conductive).+2. **Acquire Object:** If the target object is not already in your inventory, use `pick up OBJ` to acquire it.+3. **Execute Placement:** Use the `move OBJ to OBJ` action to transfer the object to the correct container.+4. **Verify:** Optionally, look at the container to confirm the object was placed inside.++## Example from Trajectory+* **Task:** "Determine if metal pot is electrically conductive. If conductive, place it in the blue box. If nonconductive, place it in the orange box."+* **Assessment:** A circuit test confirmed the metal pot was conductive.+* **Skill Execution:** `move metal pot to blue box`diff --git a/experiments/src/skills/scienceworld/scienceworld-object-placer/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-object-placer/references/action_primer.mdnew file mode 100644index 0000000..d6d9e58--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-placer/references/action_primer.md@@ -0,0 +1,21 @@+# Action Primer for ScienceWorld Environment++This reference details the actions used in the provided trajectory that are relevant to the object-placer skill's prerequisite steps.++## Core Placement Action+* `move OBJ to OBJ`: Transfers an object to a container. This is the final action of the skill.+ * *Example:* `move metal pot to blue box`++## Supporting Actions (Pre-Skill)+These actions are typically part of the assessment phase that occurs *before* this skill is triggered.+* `pick up OBJ`: Moves an object from the environment into your inventory. Use this if the target object needs to be carried.+ * *Example:* `pick up metal pot`+* `look around`: Describes the current room and lists all visible objects and containers. Use this to locate the target object and destination containers.+* `examine OBJ`: Provides a detailed description of a specific object. Use this to identify object properties or terminals.+* `focus on OBJ`: Signals intent on a task-relevant object. Can be used to confirm target selection.+* `connect OBJ to OBJ`: Connects two electrical components. Used in the example trajectory to build a test circuit.+* `wait1`: Waits for one iteration, allowing time-dependent effects (like a buzzer turning on) to be observed.++## Container Notes+* Containers like `blue box` and `orange box` are typically empty and ready to receive objects.+* You can use `look at OBJ` to inspect a container's contents, but this is often unnecessary if the task explicitly states the container is empty.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-retriever/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-retriever/SKILL.mdnew file mode 100644index 0000000..02f3092--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-retriever/SKILL.md@@ -0,0 +1,20 @@+---+name: scienceworld-object-retriever+description: This skill acquires a specified object by moving it from the environment into the agent's inventory. It should be triggered when a task requires an object to be manipulated, tested, or transported. The skill uses the 'pick up OBJ' action on a target object identified in the room, making it available for further actions in the inventory.+---+# Instructions++## Primary Objective+Acquire a specified target object from the environment and place it into your inventory.++## Core Procedure+1. **Locate the Object:** Use the `look around` action to survey the current room. Identify the target object from the description.+2. **Acquire the Object:** Use the `pick up OBJ` action on the identified target object. Replace `OBJ` with the exact name of the object as seen in the environment description.+3. **Verification:** Confirm the object is now in your inventory by checking the observation feedback from the `pick up` action.++## Key Notes+* This skill is the foundational step for any task requiring physical interaction with an object (e.g., testing, moving, using).+* Ensure you are in the correct room containing the object before attempting to pick it up. Use `teleport to LOC` if necessary.+* The object must be accessible and not inside a closed container. If a container is closed, use `open OBJ` first.+* If the initial `look around` does not reveal the object, you may need to `examine` specific containers or furniture (e.g., `examine table`) to find it.+* After acquisition, the object is ready for the next skill in the task sequence (e.g., testing conductivity, placing in a specific box).diff --git a/experiments/src/skills/scienceworld/scienceworld-object-retriever/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-object-retriever/references/action_primer.mdnew file mode 100644index 0000000..15c41d1--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-retriever/references/action_primer.md@@ -0,0 +1,18 @@+# Action Primer for Object Retrieval++## Essential Actions+* `look around`: Describes the current room and lists all visible objects and agents. Use this first to find your target.+* `pick up OBJ`: Moves the specified object from the environment into your inventory. This is the core action of this skill.+* `teleport to LOC`: Instantly moves you to a named room (e.g., `teleport to workshop`). Use if the object is known to be in another location.++## Supporting Actions (Use as Needed)+* `examine OBJ`: Provides a detailed description of a specific object or piece of furniture, which may list its contents.+* `open OBJ`: Opens a closed container (e.g., a cabinet, box) so its contents can be seen and accessed.+* `look at OBJ`: Describes the contents of a container. Use after opening it or if it's already open.++## Common Object Locations+Objects are typically:+* Loose in the room.+* On surfaces (e.g., `on the table`).+* Inside open containers (e.g., `in the blue box`).+* Inside closed containers (requires `open` first).diff --git a/experiments/src/skills/scienceworld/scienceworld-object-selector/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-object-selector/SKILL.mdnew file mode 100644index 0000000..1e960b8--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-selector/SKILL.md@@ -0,0 +1,24 @@+---+name: scienceworld-object-selector+description: Selects appropriate objects from available options based on task criteria. Use this skill when you need to choose a specific object type (e.g., non-living thing) from multiple candidates. It evaluates object properties against task requirements and selects the most suitable candidate for further manipulation.+---+# Instructions++Use this skill to identify and select an object from a list of candidates that matches a given task requirement (e.g., "non-living thing", "electrical component", "container").++## Core Workflow+1. **Observe & Parse:** Use `look around` to get a list of all visible objects in your current location.+2. **Evaluate Candidates:** For each object, determine if it matches the task's criteria. Refer to the `references/object_properties.md` for common classifications.+3. **Select & Focus:** Choose the most suitable candidate. Use `focus on [OBJECT]` to signal your intent and proceed with the next task step (e.g., `pick up`, `move`, `use`).++## Key Principles+* **Conciseness:** Choose the first suitable object unless the task implies a specific preference (e.g., "largest", "closest").+* **Verification:** If uncertain about an object's properties, use `examine [OBJECT]` for more detail before selecting.+* **Task Alignment:** Your selection should enable the *next action* in the task sequence.++## Example (from trajectory)+**Task:** "Find a non-living thing. First, focus on the thing. Then, move it to the purple box."+1. `look around` reveals: `purple box`, `table`, `battery`, `black wire`, `blue light bulb`, `red light bulb`, `red wire`, `switch`, `violet light bulb`, `yellow wire`, `ultra low temperature freezer`.+2. Evaluate: The `purple box` is the target location. The `table` and `freezer` are furniture. All other items (`battery`, `wires`, `bulbs`, `switch`) are non-living.+3. Select: `black wire` is a straightforward, portable non-living object.+4. Action: `focus on black wire` -> `move black wire to purple box`.diff --git a/experiments/src/skills/scienceworld/scienceworld-object-selector/references/object_properties.md b/experiments/src/skills/scienceworld/scienceworld-object-selector/references/object_properties.mdnew file mode 100644index 0000000..d52f79d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-object-selector/references/object_properties.md@@ -0,0 +1,19 @@+# Common Object Classifications for ScienceWorld++Use this reference to evaluate if an object matches a task's categorical requirement (e.g., "non-living thing", "container").++## Living vs. Non-Living+* **Non-Living:** Tools, devices, components, furniture, substances (e.g., `wire`, `battery`, `light bulb`, `table`, `box`, `air`, `water`).+* **Living:** Organisms, plants, animals (e.g., `mouse`, `fern`). If not explicitly described as living, assume non-living.++## Common Functional Types+* **Container:** Objects that can hold other items (e.g., `box`, `freezer`, `beaker`, `drawer`). Described as "containing" something or having a "door".+* **Electrical Component:** Objects used in circuits (e.g., `battery`, `wire`, `switch`, `light bulb`).+* **Device/Tool:** Objects with an on/off state or specific function (e.g., `switch`, `freezer`, `microscope`).+* **Furniture:** Large environmental objects (e.g., `table`, `cabinet`, `desk`). Often serve as surfaces or containers.+* **Substance:** Materials like `air`, `water`, `chemical X`. Often described as "a substance called".++## Selection Heuristics+1. **Portability:** Prefer small, handheld items (e.g., `wire`, `battery`) over large furniture (e.g., `table`) for "move" tasks.+2. **Simplicity:** Prefer simple objects (e.g., a single `wire`) over complex devices (e.g., `ultra low temperature freezer`) unless specified.+3. **Relevance:** In a scientific context, prefer lab-typical objects (components, tools) over generic ones when possible.diff --git a/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/SKILL.mdnew file mode 100644index 0000000..a091e13--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/SKILL.md@@ -0,0 +1,23 @@+---+name: scienceworld-planting-coordinator+description: This skill plants a seed or small plant into a suitable growth container (e.g., a flower pot with soil and water). It should be triggered when the agent has acquired a seed and needs to initiate the plant growth process by placing it into a prepared environment. The skill coordinates the 'move' action to transfer the seed from inventory to the target container, resolving any ambiguity if multiple instances exist.+---+# Planting Coordinator Skill++## Purpose+This skill orchestrates the initial planting action to begin a plant growth process. It handles the transfer of a seed from the agent's inventory into a suitable growth container (e.g., a flower pot containing soil and water).++## When to Use+- **Trigger Condition:** The agent has acquired a seed (or small plant) and is in a location containing a suitable growth container.+- **Goal:** Initiate the biological growth process by placing the seed into a prepared environment.++## Core Procedure+1. **Locate Target Container:** Identify a suitable container in the current environment. A valid container must contain both `soil` and `water` substances.+2. **Execute Transfer:** Perform a `move` action to transfer the seed from your inventory to the target container.+3. **Handle Ambiguity:** If the action parser returns an ambiguous request (listing multiple identical action options), select the first option (index `0`) to proceed. This resolves the ambiguity deterministically.+4. **Signal Intent:** After successful planting, use `focus on [seed]` to signal monitoring intent for the growth task.++## Key Notes+- This skill assumes the seed is already in the agent's inventory.+- The skill does not handle locating or acquiring the seed, nor the subsequent growth stages after planting.+- The primary complexity managed is the deterministic resolution of ambiguous `move` actions.diff --git a/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/references/action_primer.mdnew file mode 100644index 0000000..a559b04--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-planting-coordinator/references/action_primer.md@@ -0,0 +1,24 @@+# Action Primer for Planting++## Relevant Actions from the Trajectory+- `look around`: Describes the current room and its contents.+- `teleport to LOC`: Instantly moves the agent to a specified room.+- `pick up OBJ`: Moves an object from the environment into the agent's inventory.+- `move OBJ to OBJ`: Transfers an object from one container to another. This is the **core action** for planting.+- `focus on OBJ`: Signals intent to monitor or work on a specific object. Use after planting.++## Handling Ambiguous Actions+The environment may sometimes return an ambiguous request for a `move` action, presenting multiple identical-seeming options with indices (0, 1, 2...).++**Resolution Protocol:**+1. The agent's command (`move avocado seed in seed jar to flower pot 1`) triggers the ambiguity.+2. The environment responds with a numbered list of options.+3. **Apply the skill's deterministic rule:** Respond with the action corresponding to the first index (`0`).+4. This selects the standard transfer path and allows the action to proceed.++## Container Suitability Check+A container is suitable for planting if its description includes:+- `soil` (a substance)+- `water` (a substance)++Example from trajectory: `a flower pot 1 (containing soil, a substance called water)`diff --git a/experiments/src/skills/scienceworld/scienceworld-planting-operation/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-planting-operation/SKILL.mdnew file mode 100644index 0000000..52257e8--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-planting-operation/SKILL.md@@ -0,0 +1,24 @@+---+name: scienceworld-planting-operation+description: Plants seeds into prepared containers with soil to initiate plant growth. Execute this when you have both seeds and properly prepared planting containers available. This skill handles the specific action pattern of transferring seeds from storage to growth containers to begin cultivation processes.+---+# Planting Operation Skill++## Purpose+This skill orchestrates the process of planting seeds into prepared growth containers (e.g., flower pots with soil) to initiate plant cultivation. It is triggered when you have acquired seeds and have containers ready for planting.++## Core Workflow+1. **Prerequisites:** Ensure you possess seeds (in inventory or accessible container) and that the target planting containers are present and contain soil.+2. **Execution:** For each target container, transfer one seed from the seed source to the container.+3. **Completion:** The skill is complete when a seed has been planted in each specified container.++## Key Instructions+* **Seed Source:** Interact with the seed source (e.g., `seed jar`) to access the seeds. Use `examine` or `look at` to confirm seed availability.+* **Planting Action:** Use the `move OBJ to OBJ` action pattern, specifying the seed and the target container.+* **Ambiguity Resolution:** The environment may present ambiguous action options (e.g., multiple identical seeds). Be prepared to select the correct option by number (typically `0`) when prompted.+* **Post-Planting:** After planting, monitor plant growth. Subsequent skills may be required for watering, pollination, or harvesting.++## Important Notes+* This skill assumes containers are already prepared with soil. Soil preparation is a separate prerequisite.+* The skill focuses on the mechanical act of planting. It does not cover acquiring seeds, preparing soil, or subsequent plant care.+* Always verify the state of the container (`examine` or `look at`) before and after planting to confirm success.diff --git a/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/action_patterns.md b/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/action_patterns.mdnew file mode 100644index 0000000..7dbae7b--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/action_patterns.md@@ -0,0 +1,16 @@+# Action Patterns for Planting++## Core Planting Action+The fundamental action for this skill is:+`move <SEED_SOURCE> to <CONTAINER>`++**Example:** `move banana seed in seed jar to flower pot 1`++## Resolving Ambiguity+The environment may generate ambiguous requests when multiple identical objects are present. The standard resolution pattern is:++1. The agent issues a `move` command.+2. The environment responds with a numbered list of possible interpretations.+3. The agent selects the intended action by issuing the corresponding number (e.g., `0`).++**Trajectory Example:**diff --git a/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/prerequisite_checklist.md b/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/prerequisite_checklist.mdnew file mode 100644index 0000000..c80c636--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-planting-operation/references/prerequisite_checklist.md@@ -0,0 +1,22 @@+# Prerequisite Checklist for Planting Operation++Execute the Planting Operation skill **only** when the following conditions are met:++## Mandatory Prerequisites+- [ ] **Seeds Acquired:** You have a source of seeds in your inventory or within reach (e.g., `seed jar` in inventory). Verify with `look at <seed_source>`.+- [ ] **Containers Prepared:** The target planting containers (e.g., `flower pot 1`, `flower pot 2`) exist in the environment and **contain soil**. Verify with `examine <container>`.+- [ ] **Containers Empty:** The containers should not already contain a plant or seed. They must be ready for new planting.++## Recommended Pre-Skill Actions+1. **Acquire Seeds:** Use `pick up <seed_source>` or similar.+2. **Prepare Soil:**+ - Locate a soil source (e.g., `outside` ground).+ - Use `shovel` to dig soil (`use shovel on ground`).+ - `pick up soil`.+ - `move soil to <container>` for each target container.+3. **Positioning:** Be in the same location (room) as the target containers.++## Common Failure Points+* **No Soil:** Attempting to plant in a container with only water or nothing.+* **Already Planted:** Trying to plant in a container that already has a seed or plant.+* **Wrong Location:** The seed source or containers are in a different room.diff --git a/experiments/src/skills/scienceworld/scienceworld-pot-preparer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-pot-preparer/SKILL.mdnew file mode 100644index 0000000..c214729--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-pot-preparer/SKILL.md@@ -0,0 +1,13 @@+---+name: scienceworld-pot-preparer+description: Prepares a planting pot by moving soil from inventory into an empty or water-filled pot. Use this when setting up a growth environment for seeds or plants. It performs the 'move soil to flower pot X' action, transforming the container into a viable planting medium. This skill is atomic and can be repeated for multiple pots.+---+# Instructions+Use this skill to prepare a flower pot for planting by filling it with soil.++## Prerequisites+1. **Soil in Inventory**: You must have soil in your inventory. If not, acquire soil first (e.g., by using a shovel on ground outdoors and picking up the resulting soil).+2. **Target Pot**: Identify the specific flower pot you wish to prepare (e.g., "flower pot 1", "flower pot 2"). The pot can be initially empty or contain only water.++## Core Action+Execute the following action:diff --git a/experiments/src/skills/scienceworld/scienceworld-pot-preparer/references/trajectory_example.md b/experiments/src/skills/scienceworld/scienceworld-pot-preparer/references/trajectory_example.mdnew file mode 100644index 0000000..e72c4a7--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-pot-preparer/references/trajectory_example.md@@ -0,0 +1,19 @@+# Trajectory Example: Pot Preparation+This reference shows the skill in use within the broader context of the "grow an avocado" task.++## Context+The agent is in the `greenhouse` and needs to prepare three flower pots (`flower pot 1`, `flower pot 2`, `flower pot 3`) for planting avocado seeds. Soil has been previously collected and is in the agent's inventory.++## Skill Execution Sequence+1. **Prepare Flower Pot 1**+ * **Action**: `move soil in inventory to flower pot 1`+ * **Observation**: `You move the soil to the flower pot 1.`+2. **Prepare Flower Pot 3** (Note: Out-of-order preparation is acceptable)+ * **Action**: `move soil in inventory to flower pot 3`+ * **Observation**: `You move the soil to the flower pot 3.`+3. **Prepare Flower Pot 2**+ * **Action**: `move soil in inventory to flower pot 2`+ * **Observation**: `You move the soil to the flower pot 2.`++## Key Insight+The skill performs the same core `move` action regardless of the pot's initial state (observed as containing only `water` in the trajectory). The outcome is a pot containing `soil`, ready for the next step (planting a seed).diff --git a/experiments/src/skills/scienceworld/scienceworld-process-monitor/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-process-monitor/SKILL.mdnew file mode 100644index 0000000..d1571f4--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-process-monitor/SKILL.md@@ -0,0 +1,35 @@+---+name: scienceworld-process-monitor+description: This skill observes the state of an active apparatus and its contents to track progress. It should be triggered periodically during a heating or reaction process to check for state changes (e.g., solid to liquid). The skill uses 'look at' or 'examine' actions on the apparatus and substance.+---+# Process Monitoring Protocol++## Purpose+Monitor an ongoing scientific process (e.g., heating, reaction) to detect state changes in the target substance and track progress toward a goal.++## Trigger Conditions+Activate this skill when:+1. An apparatus (e.g., stove, burner) is **active** (`activated` state).+2. A target substance is contained within or on the apparatus.+3. You need to determine if a phase/state transition has occurred (e.g., solid β liquid).++## Core Procedure+1. **Observe the Apparatus**: Use `look at <APPARATUS>` to verify the apparatus is active and contains the target substance.+2. **Inspect the Substance**: Use `examine <SUBSTANCE>` to check its current state description.+3. **Record Observations**: Note any change in the substance's state description (e.g., "chocolate" β "liquid chocolate").++## Key Principles+* **Periodic Execution**: Run this skill every few steps during an active process. Do not spam actions.+* **State-Driven**: The skill's findings (state change detected or not) should inform the next step in the overarching experiment.+* **Non-Destructive**: This skill only observes. It does not modify temperatures, turn equipment on/off, or handle substances.++## Integration with Other Skills+The output of this skill (e.g., "substance melted") should be passed to a decision-making skill (e.g., `scienceworld-measurement`) to take the next appropriate action, such as taking a final temperature reading or deactivating the apparatus.++## Example from Trajectory+* **Apparatus**: `stove`+* **Substance**: `chocolate`+* **Initial State**: `chocolate`+* **Monitoring Action**: `examine chocolate`+* **Observed State Change**: `liquid chocolate`+* **Next Action**: Trigger a temperature measurement skill.diff --git a/experiments/src/skills/scienceworld/scienceworld-process-monitor/references/state_transitions.md b/experiments/src/skills/scienceworld/scienceworld-process-monitor/references/state_transitions.mdnew file mode 100644index 0000000..a6c0004--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-process-monitor/references/state_transitions.md@@ -0,0 +1,25 @@+# Common State Transitions in ScienceWorld++This document lists observable state changes for common substances and processes. Use these as reference when interpreting the output of `examine` commands.++## Heating/Melting Processes+| Substance | Initial State | Transition State | Final State (Melted) |+| :--- | :--- | :--- | :--- |+| Chocolate | `chocolate` | `softening chocolate` (optional) | `liquid chocolate` |+| Ice / Water | `ice` | `water` (melting) | `water` |+| Wax | `wax` | `soft wax` | `liquid wax` |+| Butter | `butter` | `softened butter` | `melted butter` |++## Chemical Reactions+| Process | Initial State | Transition Indicator | Final State |+| :--- | :--- | :--- | :--- |+| Combustion | `substance` + `flame` | `smoke`, `ashes` | `ashes` |+| Dissolution | `solid` in `liquid` | `dissolving solid` | `solution` |+| Precipitation | `solution` | `cloudy solution`, `precipitate forming` | `solution with precipitate` |++## Key Observation Patterns+* **Adjective Change**: Look for new adjectives (`liquid`, `soft`, `cloudy`, `dissolved`).+* **Noun Change**: The primary noun may change (`ice` β `water`).+* **Compound Description**: The description may become a compound noun (`liquid chocolate`).++**Note**: The exact textual output is environment-dependent. Focus on detecting *any change* from the previous `examine` result.diff --git a/experiments/src/skills/scienceworld/scienceworld-process-pauser/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-process-pauser/SKILL.mdnew file mode 100644index 0000000..44500c2--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-process-pauser/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-process-pauser+description: This skill introduces deliberate pauses in task execution. It should be triggered when the agent needs to consider next steps, evaluate intermediate results, or wait for processes to complete. The skill uses the 'wait1' or 'wait' actions to temporarily halt activity, preventing rushed decisions in complex experimental procedures.+---+# Skill: Process Pauser++## When to Use+Activate this skill when you need to:+* **Consider next steps** in a complex procedure.+* **Evaluate an intermediate result** (e.g., a mixed chemical, a partial assembly).+* **Wait for a simulated process** to complete.+* **Prevent rushed decisions** that could lead to errors.++## Core Actions+Use the following actions to implement a pause:+* `wait1`: Pauses execution for a single simulation step. Use for brief reflection.+* `wait`: Pauses execution for 10 simulation steps. Use for longer consideration or simulated waiting periods.++## Implementation Logic+1. **Identify the Pause Trigger:** Recognize a moment requiring deliberation (e.g., after creating an intermediate product, before adding a new component).+2. **Select Duration:** Choose `wait1` for quick checks or `wait` for extended evaluation.+3. **Execute Pause:** Perform the selected wait action.+4. **Resume:** Continue the task with the benefit of the reflective pause.++## Example from Trajectory+In the paint-mixing task, the agent used `wait1` after creating orange paint and before adding more red to make red-orange. This pause allowed for consideration of proportions and color adjustment.diff --git a/experiments/src/skills/scienceworld/scienceworld-process-pauser/references/pause_scenarios.md b/experiments/src/skills/scienceworld/scienceworld-process-pauser/references/pause_scenarios.mdnew file mode 100644index 0000000..c438312--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-process-pauser/references/pause_scenarios.md@@ -0,0 +1,32 @@+# Pause Scenario Reference++This document outlines common scenarios in ScienceWorld tasks where introducing a deliberate pause improves performance, based on trajectory analysis.++## 1. After Creating an Intermediate Product+* **Trigger:** Observation confirms creation of a new substance or assembly (e.g., "X and Y mix to produce Z").+* **Purpose:** Evaluate the intermediate result's properties before proceeding.+* **Example Action:** `wait1`+* **Trajectory Example:** After `mix jug` produced "orange paint," the agent used `wait1`.++## 2. Before a Critical or Irreversible Step+* **Trigger:** About to add a final component, activate a device, or perform a mix that completes the task.+* **Purpose:** Final verification of conditions and proportions to avoid error.+* **Example Action:** `wait` (longer pause for complex verification)+* **Trajectory Logic:** Before the final `pour` and `mix` to create red-orange paint.++## 3. After a State Change Observation+* **Trigger:** Observation begins with "You pour," "You connect," "You activate," etc.+* **Purpose:** Process the consequence of the action before deciding the next step.+* **Example Action:** `wait1`+* **Trajectory Logic:** General best practice observed in successful trajectories.++## 4. When Evaluating an Object+* **Trigger:** After using `focus on OBJ` or `examine OBJ`.+* **Purpose:** Deliberately process the descriptive information received.+* **Example Action:** `wait1`+* **Trajectory Example:** After `focus on orange paint`.++## Anti-Patterns: When NOT to Pause+* **During Exploration:** Do not pause after `look around` or `teleport`. Proceed directly to examining objects.+* **After Simple Fetch Actions:** Do not pause after `pick up OBJ` unless it's a rare or final component.+* **If the task is time-sensitive:** Some simulated processes may degrade if paused too long. Use context to judge.diff --git a/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/SKILL.mdnew file mode 100644index 0000000..0fb9aae--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/SKILL.md@@ -0,0 +1,29 @@+---+name: scienceworld-recipe-retriever+description: This skill locates and acquires a recipe or instruction document by using 'pick up' on the recipe object. It should be triggered when the task involves following a specific procedure (e.g., crafting, mixing) and the agent needs to obtain the written instructions. The skill assumes the recipe is visible in the current room and moves it to the inventory, allowing the agent to read it later to understand required ingredients and steps.+---+# Skill: Recipe Retriever++## Purpose+Acquire a visible recipe or instruction document from the current environment and store it in your inventory for later reference.++## Trigger Conditions+Use this skill when:+1. The task involves following a specific procedure (e.g., crafting, mixing, building).+2. You are instructed to find or use a recipe.+3. You need written instructions to understand required ingredients and steps.++## Core Procedure+1. **Locate Recipe**: Use `look around` to survey the current room. Identify any object described as a "recipe," "instructions," "manual," or similar document.+2. **Acquire Recipe**: Use `pick up <recipe_object>` to move the recipe to your inventory.+3. **Verify Acquisition**: Confirm the recipe is now in your inventory before proceeding to the next task phase.++## Key Notes+- This skill assumes the recipe is visible and accessible in the current room.+- The skill ends once the recipe is successfully moved to inventory.+- Reading the recipe (using `read`) is a separate action that should be performed after acquisition.+- If the recipe is not found in the current room, you may need to explore other rooms first.++## Error Handling+- If `pick up` fails (e.g., "You cannot pick that up"), examine the object first to verify it's a recipe.+- If no recipe is found after looking around, expand your search to adjacent rooms.diff --git a/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/action_primitives.md b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/action_primitives.mdnew file mode 100644index 0000000..42a667a--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/action_primitives.md@@ -0,0 +1,26 @@+# Action Primitives for Recipe Acquisition++## Core Actions Used+1. **look around** - Surveys the current room and lists all visible objects+2. **pick up <object>** - Moves an object from the environment to inventory++## Related Supporting Actions+- **examine <object>** - Get detailed description of an object (use if uncertain about recipe identity)+- **read <object>** - Read contents of a document (use after acquisition)+- **teleport to <location>** - Move to different rooms to search for recipe++## Action Constraints+- All containers are already open, so no need to `open` before accessing contents+- Recipes are typically standalone objects, not inside containers+- The `pick up` action should work directly on visible recipe objects++## Common Observation Patterns+When `look around` reveals a recipe, it typically appears in formats like:+- "A recipe titled [name]"+- "instructions to make [substance]"+- "a manual for [process]"++## Error Messages to Handle+- "You cannot pick that up" - May indicate the object isn't actually a recipe+- "You don't see that" - Recipe may not be in current room+- "Your inventory is full" - Need to manage inventory space firstdiff --git a/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/trajectory_analysis.md b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/trajectory_analysis.mdnew file mode 100644index 0000000..b11353f--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-recipe-retriever/references/trajectory_analysis.md@@ -0,0 +1,31 @@+# Trajectory Analysis for Recipe Retrieval++## Observed Successful Pattern+From the provided trajectory, the successful recipe acquisition followed this sequence:++1. **Initial Context**: Task involves creating "salt water" using chemistry+2. **Environment Survey**: Agent teleported to workshop after initial room checks+3. **Recipe Identification**: `look around` revealed "A recipe titled instructions to make salt water"+4. **Acquisition**: `pick up recipe` moved it to inventory+5. **Verification**: Recipe was successfully in inventory for later reading++## Key Insights+- The recipe was found in the workshop, consistent with the hint "near the workshop"+- No prior actions (opening containers, etc.) were needed before picking up the recipe+- The recipe object name was simply "recipe" in the observation+- Acquisition was immediate and successful on first attempt++## Recommended Search Pattern+When task involves a recipe:+1. Check the hinted location first (e.g., "near the workshop")+2. Use `look around` to identify recipe objects+3. If not found, systematically check adjacent rooms+4. Prioritize rooms related to the task domain (workshop for crafting, kitchen for cooking, etc.)++## Integration with Broader Tasks+Recipe retrieval is typically the first step in multi-phase tasks:+1. Acquire recipe (this skill)+2. Read recipe to understand requirements+3. Gather ingredients+4. Execute procedure+5. Verify resultsdiff --git a/experiments/src/skills/scienceworld/scienceworld-result-archiver/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-result-archiver/SKILL.mdnew file mode 100644index 0000000..4311746--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-result-archiver/SKILL.md@@ -0,0 +1,31 @@+---+name: scienceworld-result-archiver+description: Places an object into a designated container (like a colored box) based on a test outcome. It should be triggered when the agent needs to finalize a task by storing an object according to a rule (e.g., conductive β blue box, non-conductive β orange box). The input is the object and the rule, and the output is the object moved to the correct container.+---+# Instructions+Use this skill to finalize a scientific test by archiving an object based on the observed result.++## When to Use+- You have just completed an experimental test (e.g., electrical conductivity, chemical reaction, physical property test).+- You have a clear rule mapping a specific test outcome to a specific destination container (e.g., "If property X is true, place in Container A; if false, place in Container B").+- The object to be archived and the destination containers are present in your current environment.++## Core Procedure+1. **Verify Context:** Ensure you are in the correct room (typically the `workshop` or lab area) where the test was conducted and where the destination containers are located.+2. **Confirm Test Result:** Observe the final state of your experimental apparatus to definitively determine the test outcome (e.g., "light bulb is on").+3. **Apply Rule:** Map the confirmed outcome to the corresponding destination container as specified by the task rule.+4. **Execute Archive:** Move the test object from its current location (inventory or room) into the correct container using the `move OBJ to CONTAINER` action.++## Key Principles+- **Direct Archiving:** Do not re-run the test. The skill is for archiving the result based on an *already observed* outcome.+- **Rule Adherence:** Strictly follow the provided mapping rule. Do not infer or create new rules.+- **Container Verification:** Before moving the object, visually confirm the target container exists in the room (use `look around` if uncertain).++## Example Rule Application+*Task Rule:* "If the metal pot is electrically conductive, place it in the blue box. If it is electrically nonconductive, place it in the orange box."+*Observation:* The blue light bulb in the circuit is **on**.+*Interpretation:* The metal pot is conductive.+*Action:* `move metal pot to blue box`++## Bundled Logic+For the specific, error-prone sequence of connecting a circuit to test electrical conductivity, use the bundled script `scripts/conductivity_test.py` as a reference. For all other test types, use the general instructions above.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-explorer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-room-explorer/SKILL.mdnew file mode 100644index 0000000..f3dc764--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-explorer/SKILL.md@@ -0,0 +1,31 @@+---+name: scienceworld-room-explorer+description: This skill performs an initial survey of a specified room to identify all visible objects and their states. It should be triggered when the agent first enters a new location or needs to refresh its understanding of the environment. The skill uses the 'look around' action and returns a detailed observation of the room's contents, which serves as the foundational context for subsequent object interaction tasks.+---+# Instructions++## Purpose+Use this skill to establish a foundational understanding of your immediate environment. It is the critical first step for any task requiring object interaction, inventory assessment, or spatial reasoning.++## When to Use+1. **Upon entering a new room.**+2. When the task requires identifying available resources.+3. Before planning a complex sequence of actions (e.g., building a circuit, mixing chemicals).+4. If the state of the environment may have changed (e.g., after using an object, or if a long time has passed).++## Core Action+Execute the `look around` action. This is the only action required for this skill.++## Output Processing+1. The observation returned by `look around` is your primary output.+2. Parse this observation to create a mental inventory. Key elements to note:+ * **Room Name:** The identified location.+ * **Objects:** List all items, containers, and devices.+ * **Object States:** Note if devices are on/off, containers are open/closed, or if objects contain other items.+ * **Connections:** Note any pre-existing wire connections or object placements.+ * **Exits:** Identify doors to other rooms and their state (open/closed).++## Integration with Other Skills+The observation generated by this skill is essential context for downstream tasks. Before performing actions like `pick up`, `connect`, or `use`, always ensure your understanding of object locations and states is current by running this skill if needed.++**Do not** use this skill for examining specific objects in detail; use the `examine OBJ` or `look at OBJ` actions for that purpose.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-explorer/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-room-explorer/references/action_primer.mdnew file mode 100644index 0000000..61fc8b1--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-explorer/references/action_primer.md@@ -0,0 +1,34 @@+# Action Primer for ScienceWorld Environment++This reference details common actions used in conjunction with the `scienceworld-room-explorer` skill for task execution.++## Foundational Action+* `look around`: Describes the current room, listing all visible objects, their states, and contents. **This is the core action of the scienceworld-room-explorer skill.**++## Common Follow-up Actions+After using `scienceworld-room-explorer`, you will typically use other actions to manipulate the discovered objects.++### Object Interaction+* `examine OBJ`: Get a detailed description of a specific object's properties.+* `look at OBJ`: List the contents of a container.+* `pick up OBJ`: Move an object into your inventory.+* `move OBJ to OBJ`: Place an object into a container or onto a surface.+* `use OBJ [on OBJ]`: Operate a device or apply an item.++### Electrical & Device Manipulation+* `connect OBJ to OBJ`: Link two electrical components (e.g., wire terminal to battery terminal).+* `disconnect OBJ`: Remove a connection from a component.+* `activate OBJ` / `deactivate OBJ`: Turn a device on or off.+* `focus on OBJ`: Signal intent to interact with a specific task-relevant object.++### Navigation+* `teleport to LOC`: Instantly move to another room.++## Action Sequencing Pattern+A standard task execution pattern often follows this flow:+1. **Explore:** Use `scienceworld-room-explorer` (`look around`) to understand the room.+2. **Locate:** Identify the target object(s) from the observation.+3. **Acquire:** Use `pick up` or navigate to the object.+4. **Prepare:** Use `examine`, `connect`, or other actions to set up the object for the task.+5. **Execute:** Use `use`, `activate`, `mix`, etc., to perform the core task action.+6. **Conclude:** Use `move` or other actions to complete the task (e.g., placing an object in a specified box).diff --git a/experiments/src/skills/scienceworld/scienceworld-room-navigator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-room-navigator/SKILL.mdnew file mode 100644index 0000000..876f16c--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-navigator/SKILL.md@@ -0,0 +1,22 @@+---+name: scienceworld-room-navigator+description: Teleports the agent to a specified room within the ScienceWorld environment. It should be triggered when the agent needs to move between different locations to locate objects or access specific facilities. The input is a target room name, and the output is the agent arriving at that room, ready for further interaction.+---+# Instructions++Use this skill to instantly move the agent to a different room. This is the primary method of navigation.++## When to Use+* The agent needs to find an object known to be in a specific room (e.g., "metal pot is located around the kitchen").+* The agent needs to access a facility available only in a specific room (e.g., a workshop for building circuits, a foundry for smelting).+* The agent has completed tasks in one room and needs to proceed to the next relevant location.++## How to Use+1. **Identify the Target Room:** Determine the exact name of the destination room from the task context or environment description (e.g., `kitchen`, `workshop`, `foundry`).+2. **Execute Teleport:** Use the `teleport to <ROOM_NAME>` action.+3. **Verify Arrival:** The observation will confirm the teleport was successful (e.g., "You teleport to the kitchen."). You may then proceed with `look around` to survey the new location.++## Important Notes+* Teleportation is a single-step action. There is no need for intermediate movement.+* All standard room connections (doors) remain, but teleportation bypasses them.+* After teleporting, the agent's inventory and any held items remain unchanged.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-navigator/references/available_rooms.md b/experiments/src/skills/scienceworld/scienceworld-room-navigator/references/available_rooms.mdnew file mode 100644index 0000000..fe3bc2f--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-navigator/references/available_rooms.md@@ -0,0 +1,15 @@+# ScienceWorld Environment - Known Rooms+This is a non-exhaustive list of rooms observed in the trajectory. The environment may contain others.++* **Kitchen:** Common location for household items like pots, pans, and ingredients.+* **Foundry:** Contains industrial equipment like a blast furnace, typically for high-temperature processes.+* **Workshop:** Contains tools, electrical components (wires, batteries, light bulbs), and workbenches for building and testing.+* **Bathroom:** Likely contains water sources (sink, tub) and related items.+* **Outside:** The exterior environment.+* **Living Room:** A general common area.+* **Bedroom:** A sleeping area.+* **Greenhouse:** Likely for plants and botanical items.+* **Art Studio:** Likely for creative supplies.+* **Hallway:** A connecting passage between rooms.++**Usage Tip:** Always use the exact room name as provided by the environment or task description when invoking the `teleport` action.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-scanner/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-room-scanner/SKILL.mdnew file mode 100644index 0000000..236fa57--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-scanner/SKILL.md@@ -0,0 +1,33 @@+---+name: scienceworld-room-scanner+description: This skill performs a 'look around' action to scan and describe the current room's contents, including visible objects, containers, and doors. It should be triggered upon entering a new room or when the agent needs to locate specific items or assess the environment state. The skill outputs a detailed room description, which is essential for inventory discovery and situational awareness.+---+# Skill: Room Scanner++## Purpose+Execute a `look around` action to obtain a comprehensive description of the current room in the ScienceWorld environment. This description is the foundational step for any task requiring item location, environmental assessment, or navigation planning.++## Core Instruction+When this skill is invoked, the agent must perform the **`look around`** action.++## Trigger Conditions+Invoke this skill when:+1. You first enter a new room via `teleport` or other movement.+2. You need to locate a specific object or container mentioned in your task.+3. The state of the room may have changed (e.g., after an interaction).+4. You are formulating a plan and require an inventory of available resources.++## Output Processing+The observation from `look around` will contain:+* **Room Name:** The identifier of your current location.+* **Visible Objects & Agents:** A list of all entities in the room.+* **Container Contents:** For open containers, a nested list of items inside (e.g., `a bowl (containing a red apple, a banana)`).+* **Device States:** The status of interactive objects (e.g., `a stove, which is turned off`).+* **Connections:** All accessible doors and their destination rooms.++**You must parse this output carefully.** Use it to update your mental model of the environment before proceeding with other actions like `pick up`, `examine`, or `use`.++## Integration Notes+* This is a low-level, atomic skill. It should often be the first action in a sequence.+* The observation it generates is critical context for subsequent decision-making. Refer back to it.+* Do not overuse it. Once you have a recent description of a room, rely on that knowledge until you have reason to believe the state has changed.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-scanner/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-room-scanner/references/action_primer.mdnew file mode 100644index 0000000..71485ab--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-scanner/references/action_primer.md@@ -0,0 +1,33 @@+# ScienceWorld Action Primer for Room Scanning++## The `look around` Action+* **Syntax:** `look around`+* **Effect:** Returns a detailed textual description of the agent's current room.+* **Key Observation Fields:**+ 1. `This room is called <ROOM_NAME>.`+ 2. `In it, you see:` - Lists all objects, substances, and the agent itself.+ 3. `On <CONTAINER> is:` / `In <CONTAINER> is:` - Describes contents of open containers and furniture.+ 4. `You also see:` - Lists all doorways to adjacent rooms.++## Related Contextual Actions+Use information from `look around` to inform these subsequent actions:++| Action | Syntax Example | Use Case After Scanning |+| :--- | :--- | :--- |+| `examine` | `examine thermometer` | Get detailed properties of a specific object seen in the room. |+| `look at` | `look at cupboard` | See the contents of a specific container (more focused than `look around`). |+| `teleport to` | `teleport to kitchen` | Move to a room listed in the "You also see:" connections. |+| `pick up` | `pick up thermometer` | Take an object that is listed as visible and accessible. |++## Common Room Types & Key Objects+Based on the trajectory, here are typical rooms and objects of interest:+* **Kitchen:** `thermometer`, `oven`, `stove`, `metal pot`, various `boxes`, `cupboard`.+* **Foundry:** `blast furnace` (for high-temperature heating).+* **Hallway:** Central hub with doors to many other rooms.+* **Workshop/Greenhouse/Art Studio:** Likely contain specialized tools or materials.++## Best Practice: The Scan-Act Cycle+1. **SCAN:** Use `look around` upon entry or when uncertain.+2. **PARSE:** Identify the objects relevant to your current goal from the description.+3. **ACT:** Execute a targeted action (`pick up`, `examine`, `use`).+4. **RE-SCAN (if needed):** If your action changes the room state significantly (e.g., activating a furnace, moving many items), consider another `look around` to confirm the new state.diff --git a/experiments/src/skills/scienceworld/scienceworld-room-teleporter/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-room-teleporter/SKILL.mdnew file mode 100644index 0000000..b887db9--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-room-teleporter/SKILL.md@@ -0,0 +1,16 @@+---+name: scienceworld-room-teleporter+description: Teleports the agent to a specified room within the ScienceWorld environment. Use this skill when the target object or location for a task is known to be in a different room, enabling efficient navigation. It takes a target room name as input and outputs a successful teleportation observation.+---+# Instructions+Use the `teleport to LOC` action to move the agent to the specified room.++## Procedure+1. **Identify Target Room:** Determine the exact name of the destination room from the task context or environment description.+2. **Execute Teleport:** Use the action `teleport to <room_name>`, where `<room_name>` is the target location (e.g., `workshop`, `kitchen`, `foundry`).+3. **Verify Success:** The expected output is an observation confirming the teleport, e.g., "You teleport to the workshop."++## Important Notes+- This skill is for navigation only. It does not handle object interaction or task logic within the destination room.+- Ensure the room name matches the environment's naming exactly. Common rooms include: kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallway.+- Use this skill proactively to reduce unnecessary exploration steps when the target location is known.diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-cooler/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-substance-cooler/SKILL.mdnew file mode 100644index 0000000..f77ed4a--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-cooler/SKILL.md@@ -0,0 +1,32 @@+---+name: scienceworld-substance-cooler+description: This skill initiates the cooling of a substance by moving it into a cooling appliance like a freezer. It should be triggered when a task requires lowering the temperature of a specific material to observe phase changes. The skill takes the substance (often in a container) and the target appliance as inputs, using the 'move OBJ to OBJ' action. It outputs confirmation of the new location.+---+# Skill: Substance Cooler++## Purpose+Use this skill to begin the process of cooling a substance to potentially observe a phase change (e.g., freezing). The core action is to relocate the substance into a cooling appliance.++## When to Use+* The task explicitly requires cooling a substance (e.g., "measure the melting point of mercury").+* You have identified both the target substance (often inside a container like a cup or jar) and a suitable cooling appliance (e.g., freezer, ultra low temperature freezer).+* The immediate goal is to lower the substance's temperature.++## Core Instruction+1. **Locate Items:** Ensure you are in the room containing the target substance and the cooling appliance. Use `look around` if necessary.+2. **Execute Move:** Perform the action `move <SUBSTANCE_CONTAINER> to <APPLIANCE>`.+ * `<SUBSTANCE_CONTAINER>`: The object holding the substance (e.g., "glass cup (containing a substance called mercury)").+ * `<APPLIANCE>`: The cooling device (e.g., "freezer").+3. **Verify:** Use `look at <APPLIANCE>` to confirm the substance is now inside the appliance. Report this confirmation.++## Important Notes+* **Prerequisite:** The appliance door must be open. The trajectory shows all containers are already open, so this should not require a separate `open` action.+* **This is an Initialization Skill:** This skill only *starts* the cooling process. Subsequent skills or actions (like `use thermometer on <SUBSTANCE>`) are required to monitor temperature changes and observe the phase transition.+* **Inputs:** The skill requires the names of the substance container and the target appliance as identified in the environment observations.+* **Output:** A confirmation observation stating the substance is now inside the appliance.++## Example from Trajectory+**Trigger:** Task requires measuring the melting point of mercury.+**Action:** `move glass cup (containing a substance called mercury) to freezer`+**Verification:** `look at freezer` yields "In the freezer is: a glass cup (containing a substance called mercury)."+**Output:** "The mercury in its glass cup has been placed into the freezer to begin cooling."diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-cooler/references/phase_change_protocol.md b/experiments/src/skills/scienceworld/scienceworld-substance-cooler/references/phase_change_protocol.mdnew file mode 100644index 0000000..35679a2--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-cooler/references/phase_change_protocol.md@@ -0,0 +1,26 @@+# Reference: Phase Change Observation Protocol++## Overview+Cooling a substance to observe a phase change (e.g., liquid to solid) is a multi-step process. The `scienceworld-substance-cooler` skill is **Step 1**.++## Full Workflow+1. **Initialization (This Skill):** Move the substance into a cooling appliance.+2. **Monitoring:** Periodically use a thermometer on the substance to track its temperature.+ * Command: `use thermometer on <SUBSTANCE_NAME>`+ * Frequency: Varies. Monitor until the target temperature range is approached.+3. **Observation:** Continuously `examine <SUBSTANCE_NAME>` to detect visual/physical state changes indicating a phase transition.+4. **Decision:** Based on the observed melting/freezing point and task criteria, take the next action (e.g., "focus on yellow box").++## Key Concepts from Trajectory+* **Melting/Freezing Point:** The temperature at which a substance changes state. The task may involve determining if this point is above or below a specific value (e.g., -10.0Β°C).+* **Thermal Equilibrium:** It takes time for the substance to cool to the appliance's temperature. Repeated measurements are necessary.+* **Appliance Limitations:** A standard kitchen freezer may not reach extremely low temperatures. For very low melting points, an "ultra low temperature freezer" might be required.++## Common Cooling Appliances+* `freezer`: Standard kitchen appliance. Cools to temperatures below 0Β°C.+* `ultra low temperature freezer`: Found in labs/workshops. Cools to much lower temperatures (e.g., -50Β°C or below).++## Error Handling+* **"You can't do that.":** Ensure the appliance door is open. Use `look at <APPLIANCE>` to check.+* **No Temperature Change:** The appliance might be off or broken. Try `activate <APPLIANCE>` if applicable.+* **Substance Not Found:** Confirm the correct container description from the latest `look around` observation.diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/SKILL.mdnew file mode 100644index 0000000..734e292--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/SKILL.md@@ -0,0 +1,36 @@+---+name: scienceworld-substance-fetcher+description: This skill locates and retrieves a target substance or material from a container in the environment. It should be triggered when the core task involves processing a specific substance (e.g., chocolate, a chemical). The skill finds the substance, often inside a fridge or cupboard, and acquires it via a pick-up or move action.+---+# Skill: Substance Fetcher++## Primary Objective+Locate a specified target substance (e.g., `chocolate`, `sodium chloride`) within the environment and retrieve it for subsequent processing.++## Core Logic & Workflow+1. **Identify Target:** The target substance name is provided as part of the task initiation (e.g., "Your task is to measure the melting point of **chocolate**").+2. **Search Strategy:**+ * If the current room does not contain the target, use `teleport to [room]` to navigate to likely locations (e.g., `kitchen`, `workshop`, `greenhouse`).+ * Use `look around` to survey a room and identify containers.+3. **Locate in Container:**+ * Examine open containers (`fridge`, `cupboard`, `counter`, `drawer`) listed in the room description.+ * The target substance is often found inside a container (e.g., "In the fridge is: **chocolate**").+4. **Retrieval Action:**+ * If the substance is a portable object, use `pick up [substance]`.+ * If the substance is inside another object (e.g., in a pot), use `move [substance] to [destination container]` to prepare it for use.+ * **Key Assumption:** All containers are already open. Do not use `open` or `close` actions.++## Critical Constraints & Notes+* **Container State:** Assume all containers (fridge, cupboard, drawer) are **already open**. Do not waste actions opening them.+* **Action Efficiency:** Prefer `pick up` for direct acquisition. Use `move` only when necessary to transfer the substance to a specific vessel for an experiment.+* **Verification:** After retrieval, you may use `examine [substance]` or check your inventory to confirm success before proceeding to the next phase of the experiment.++## Example Execution (Based on Trajectory)+**Task Context:** "Your task is to measure the melting point of **chocolate**..."+1. `teleport to kitchen`+2. `look around` *(Observes: "In the fridge is: chocolate...")*+3. `pick up chocolate` or `move chocolate to metal pot`++## Error Handling+* If the substance is not found in the initially suspected room, teleport to and search other relevant rooms (e.g., `workshop` for chemicals, `greenhouse` for plants).+* If the retrieval action fails (e.g., object not found), re-examine the room description with `look around` to confirm the substance's location and container.diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/references/action_primer.mdnew file mode 100644index 0000000..fe70995--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-fetcher/references/action_primer.md@@ -0,0 +1,24 @@+# Action Primer for ScienceWorld Environment++## Relevant Actions for Substance Fetching+- `teleport to LOC`: Instantly move to a named room (e.g., `kitchen`, `workshop`).+- `look around`: Get a full description of the current room and its contents.+- `examine OBJ`: Get a detailed description of a specific object.+- `look at OBJ`: Describe a container's contents (redundant if `look around` was just used).+- `pick up OBJ`: Move a portable object to your inventory.+- `move OBJ to OBJ`: Move an object to a container or surface.++## Typical Container Names+* `fridge`+* `freezer`+* `cupboard`+* `counter`+* `drawer`+* `shelf`+* `table`++## Common Substance Locations+* **Kitchen:** Food items (chocolate, fruit), cooking ingredients (salt, oil).+* **Workshop:** Chemicals, tools, raw materials.+* **Greenhouse:** Plants, soil, water.+* **Art Studio:** Paints, solvents, clay.diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-preparator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-substance-preparator/SKILL.mdnew file mode 100644index 0000000..687c3ab--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-preparator/SKILL.md@@ -0,0 +1,36 @@+---+name: scienceworld-substance-preparator+description: This skill transfers a target substance into an appropriate container for processing (e.g., a pot for heating, a beaker for mixing). It should be triggered after acquiring the substance and before setting up an apparatus. The skill selects a suitable empty container and moves the substance into it.+---+# Substance Preparation Skill++## Purpose+Prepare a target substance for subsequent processing (e.g., heating, mixing) by transferring it from its current location into an appropriate, empty container.++## When to Use+1. **Trigger:** After successfully locating and focusing on the target substance.+2. **Prerequisite:** The substance must be accessible (e.g., in inventory, in an open container).+3. **Next Step:** This skill should be completed **before** setting up any apparatus (e.g., activating a stove, connecting electrical components).++## Core Procedure+1. **Identify Target Substance:** Confirm the exact name and location of the substance to be prepared.+2. **Scan Environment for Containers:** Look for empty, process-appropriate containers in the current room. Priority order:+ * **Primary:** Metal pots, beakers, or bowls (for heating/mixing).+ * **Secondary:** Ceramic/glass cups, jars (if primary not available).+ * **Avoid:** Containers already holding items or substances.+3. **Select & Validate Container:** Choose the most suitable empty container. If uncertain, `examine` it to confirm it's empty.+4. **Execute Transfer:** Use the `move [SUBSTANCE] to [CONTAINER]` action.+5. **Verify:** Briefly check the container's contents to confirm the transfer was successful.++## Key Considerations+* **Container State:** All containers are pre-opened. Do not use `open` or `close` actions.+* **Efficiency:** Prefer containers in the same room to minimize `teleport` use.+* **Substance Integrity:** If the substance is temperature-sensitive (e.g., chocolate in a fridge), moving it to a room-temperature container is part of preparation.+* **Error Handling:** If the transfer fails (e.g., container not found), `look around` again and consult the bundled reference for common container names.++## Example from Trajectory+> **Substance:** `chocolate` (found in fridge).+> **Action:** `move chocolate to metal pot` (metal pot was empty in cupboard).+> **Verification:** Subsequent `look at stove` showed "metal pot (containing chocolate)".++**Proceed to the next skill (e.g., apparatus setup) only after this verification.**diff --git a/experiments/src/skills/scienceworld/scienceworld-substance-preparator/references/common_containers.md b/experiments/src/skills/scienceworld/scienceworld-substance-preparator/references/common_containers.mdnew file mode 100644index 0000000..6f9b0ba--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-substance-preparator/references/common_containers.md@@ -0,0 +1,27 @@+# Common Container Reference++## For Heating/Mixing (Primary)+* `metal pot`+* `beaker` (glass)+* `bowl`+* `cauldron` (foundry)+* `crucible` (foundry)++## For General Holding (Secondary)+* `ceramic cup`+* `glass cup`+* `tin cup`+* `wood cup`+* `glass jar`+* `flask`++## Typically Not Suitable+* `drawer` (fixed furniture)+* `fridge`/`freezer` (appliance, not portable)+* `sink` (plumbing fixture)+* `oven` (appliance)++## Verification Commands+* `look at [CONTAINER]` - Lists contents.+* `examine [CONTAINER]` - Confirms object type and state.+* `look around` - Scans room for all available containers.diff --git a/experiments/src/skills/scienceworld/scienceworld-target-identifier/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-target-identifier/SKILL.mdnew file mode 100644index 0000000..18c29c8--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-target-identifier/SKILL.md@@ -0,0 +1,59 @@+---+name: scienceworld-target-identifier+description: Analyzes room observations to identify objects matching a given target description (e.g., 'living thing'). Triggered after exploring a room when the agent needs to locate a specific type of item. Processes the observation list, filters objects based on target criteria, and returns candidate objects for further action.+---+# Skill: Target Object Identifier++## Purpose+This skill enables you to systematically locate objects in the ScienceWorld environment that match a specific target description (e.g., "living thing", "container", "electrical device"). It transforms the raw observation text from `look around` into a structured list of candidate objects for your current task.++## When to Use+1. **Trigger Condition**: Immediately after executing `look around` in any room.+2. **Input Required**: The full observation text from `look around` AND the target description from your task.+3. **Output**: A prioritized list of matching objects with their locations and properties.++## Execution Workflow++### Step 1: Parse Observation+Extract all observable items from the room description. Pay special attention to:+- Objects listed after "Here you see:"+- Objects in containers (marked with "containing" or "On the X is:")+- Substances (marked as "a substance called")+- Living vs. non-living distinctions++### Step 2: Apply Target Filter+Use the bundled classification script to filter objects based on the target description:+- For "living thing": Include animals, plants, eggs, and biological organisms+- For specific categories: Match against known object taxonomies+- For generic descriptions: Use semantic similarity matching++### Step 3: Prioritize Candidates+Rank candidates by:+1. **Accessibility**: Objects not in closed containers first+2. **Proximity**: Objects in current room before other locations+3. **Task Relevance**: Objects matching secondary task criteria (e.g., "easy to transport")++### Step 4: Generate Action Plan+For each high-priority candidate:+1. Note its exact name as it appears in observations+2. Determine if `pick up`, `focus on`, or other preliminary action is needed+3. Plan path to target location if specified in task++## Key Considerations+- **Exact Object Names**: Use the exact phrasing from observations (e.g., "turtle egg" not "egg turtle")+- **Container States**: All containers are open per environment rules+- **Teleportation**: You can instantly move between rooms when searching+- **Multiple Matches**: If multiple objects match, select based on task context (e.g., choose less mobile items for transport tasks)++## Error Handling+- If no matches found: Teleport to another room and repeat+- If ambiguous matches: Use `examine OBJ` for clarification+- If classification uncertain: Check reference taxonomy in bundled resources++## Example Application+*Task*: "Find a living thing and move it to the blue box in bathroom"+1. `look around` in current room+2. Run this skill with target="living thing"+3. Receive list: ["baby wolf", "turtle egg", "crocodile egg"]+4. Select "turtle egg" (easier to transport)+5. `focus on turtle egg` β `pick up turtle egg` β `teleport to bathroom` β `move turtle egg to blue box`diff --git a/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/action_patterns.md b/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/action_patterns.mdnew file mode 100644index 0000000..c5c8b2e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/action_patterns.md@@ -0,0 +1,4 @@+# Common Action Patterns for Target Objects++## Object Acquisition Patterns+### Pattern 1: Simple Pickupdiff --git a/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/taxonomy.md b/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/taxonomy.mdnew file mode 100644index 0000000..add82cc--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-target-identifier/references/taxonomy.md@@ -0,0 +1,64 @@+# ScienceWorld Object Taxonomy++## Living Things Category+### Animals+- Mammals: wolf, dog, cat, mouse, rat+- Reptiles: turtle, crocodile, lizard, snake+- Birds: bird, chicken, duck+- Fish: fish, goldfish+- Insects: ant, bee, butterfly, spider++### Animal States & Parts+- Eggs: turtle egg, crocodile egg, bird egg+- Young: baby [animal], young [animal]+- Remains: fur, feather, bone++### Plants+- Trees: tree, sapling+- Flowers: flower, rose, tulip+- General: plant, leaf, seed, sprout+- Crops: wheat, corn, tomato++### Microorganisms+- Bacteria: (implied in decay processes)+- Fungi: mushroom, mold++## Non-Living Categories+### Containers+- Storage: box, chest, cabinet, closet, drawer, shelf+- Liquid: bottle, jar, cup, glass, bowl+- Transport: bag, basket, cart++### Tools & Equipment+- Cutting: axe, knife, scissors+- Digging: shovel, pickaxe+- Fastening: hammer, screwdriver, wrench, nail, screw+- Measuring: ruler, tape, scale++### Electrical Components+- Power: battery, generator, outlet+- Control: switch, button, dial+- Connection: wire, cable, plug+- Output: lamp, bulb, motor, buzzer++### Substances+- Solids: wood, metal, stone, plastic, cloth+- Liquids: water, oil, juice, milk+- Gases: air, steam, smoke+- Powders: flour, salt, sugar, sand++## Special Object Properties+### Mobility+- Fixed: bed, table, fountain, fire pit+- Portable: most small objects+- Autonomous: living things++### State Changes+- Activatable: devices with on/off states+- Consumable: food, fuel+- Transformable: ingredients for mixing++### Task Relevance Indicators+- For transport tasks: small, light, non-fragile objects preferred+- For electrical tasks: conductive materials needed+- For chemical tasks: reactive substances neededdiff --git a/experiments/src/skills/scienceworld/scienceworld-target-locator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-target-locator/SKILL.mdnew file mode 100644index 0000000..083a25e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-target-locator/SKILL.md@@ -0,0 +1,25 @@+---+name: scienceworld-target-locator+description: This skill determines the most likely location for a target object based on domain knowledge and environmental clues. Trigger this when the agent needs to find a specific item (like an animal) but it is not in the current room. It analyzes the environment description and suggests a room to teleport to for further investigation.+---+# Skill: Target Locator++**Trigger:** When the agent needs to find a specific object (e.g., an animal, a tool, a chemical) and a preliminary `look around` in the current room does not reveal it.++## Core Logic++1. **Analyze the Target:** Classify the target object based on its type (e.g., `animal`, `tool`, `container`, `chemical`).+2. **Consult Domain Knowledge:** Use the bundled reference (`target_location_heuristics.md`) to map the object type to the most probable room(s) in the ScienceWorld environment.+3. **Evaluate Current Context:** Briefly review the recent `look around` observation. If doors to high-probability rooms are visible and open, prioritize them.+4. **Output Decision:** Output a single, clear `teleport to LOC` action command, choosing the most promising location to search next.++**Primary Instruction:** Do not overthink. Rely on the heuristics. The goal is to make an efficient, educated guess to continue the search.++## Example Flow (From Trajectory)+* **Task:** "find a(n) animal."+* **Trigger:** `look around` in hallway shows no animal.+* **Analysis:** Target type = `animal`.+* **Heuristic Check:** Animals are most commonly found `outside`.+* **Context Check:** A door to `outside` is not listed in the hallway observation.+* **Decision:** The highest-probability room `outside` is accessible via teleport.+* **Output:** `teleport to outside`diff --git a/experiments/src/skills/scienceworld/scienceworld-target-locator/references/target_location_heuristics.md b/experiments/src/skills/scienceworld/scienceworld-target-locator/references/target_location_heuristics.mdnew file mode 100644index 0000000..9feae5e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-target-locator/references/target_location_heuristics.md@@ -0,0 +1,25 @@+# Target Location Heuristics for ScienceWorld++This reference contains common-sense mappings between object types and their most likely locations in the ScienceWorld environment. Use this to inform the `teleport` decision.++## Room List+kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallway++## Object Type -> Probable Room(s)++* **animal / egg / living creature:** `outside`, `greenhouse`, `bedroom` (if pet)+* **tool / device / mechanical part:** `workshop`, `foundry`, `kitchen`+* **container (box, chest, bottle):** `workshop`, `kitchen`, `living room`, `bedroom`+* **chemical / substance / liquid:** `bathroom`, `kitchen`, `workshop`, `greenhouse`+* **food / ingredient:** `kitchen`, `greenhouse`+* **art supply / canvas / paint:** `art studio`+* **furniture / decorative item:** `living room`, `bedroom`, `hallway`+* **plant / seed / soil:** `greenhouse`, `outside`+* **book / note / paper:** `bedroom`, `living room`, `art studio`, `workshop`+* **metal / ore / raw material:** `foundry`, `workshop`, `outside`++## Search Priority Notes+1. `outside` and `greenhouse` are high-probability for biological targets.+2. `workshop` and `foundry` are high-probability for mechanical/industrial targets.+3. If a high-probability room is not directly accessible via a visible door, use `teleport`.+4. If the target type is ambiguous, default to the first room in its list.diff --git a/experiments/src/skills/scienceworld/scienceworld-task-focuser/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-task-focuser/SKILL.mdnew file mode 100644index 0000000..9bbdc10--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-task-focuser/SKILL.md@@ -0,0 +1,33 @@+---+name: scienceworld-task-focuser+description: This skill directs the agent's attention to a specific object, either in the environment or inventory, to signal intent or prepare for an operation. It should be triggered before performing a critical action on an object, such as measuring or using it, to ensure the agent is properly aligned with the task. The skill outputs a confirmation of focus, which often is required for subsequent interactive steps in experimental procedures.+---+# Skill: scienceworld-task-focuser++## Purpose+Use this skill to formally declare your intent to interact with a specific object. This is a crucial preparatory step in scientific workflows within the ScienceWorld environment. Focusing on an object signals to the system that subsequent actions (like `use`, `measure`, `connect`) are targeted and deliberate, often unlocking necessary state changes or measurement capabilities.++## When to Use+* **Before Measurement:** Before using a tool (e.g., a thermometer) on a target object.+* **Before Complex Operations:** Prior to connecting, mixing, or using one object on another.+* **Task Alignment:** When a task description explicitly instructs you to "focus on" an object.+* **Inventory Management:** To confirm you have the correct item in your inventory before proceeding.++## Core Instruction+1. **Identify the Target Object:** Determine the exact name of the object you need to focus on (e.g., `thermometer`, `metal fork`).+2. **Locate the Object:** The object may be in the environment (`on table`) or in your inventory (`in inventory`). Use `look around` and `examine` to find it.+3. **Execute the Focus Action:** Use the exact action format:+ * If the object is in the environment: `focus on <OBJECT_NAME>`+ * If the object is in your inventory: `focus on <OBJECT_NAME> in inventory`+4. **Verify Confirmation:** The environment will respond with "You focus on the `<OBJECT_NAME>`." This is your confirmation to proceed.++## Example from Trajectory+**Scenario:** Measuring the temperature of a metal fork.+1. **Focus on the tool:** `focus on thermometer in inventory` (Confirms intent to use the thermometer).+2. **Focus on the target:** `focus on metal fork in inventory` (Confirms the object to be measured).++## Important Notes+* This skill does not perform the main action (e.g., measuring). It only prepares for it.+* The `focus` action has no physical effect on the object; it is a declarative meta-action.+* Always wait for the confirmation observation before attempting the next step in your procedure.+* If an object is not found, revisit your search logic before attempting to focus.diff --git a/experiments/src/skills/scienceworld/scienceworld-task-interpreter/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-task-interpreter/SKILL.mdnew file mode 100644index 0000000..68626d5--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-task-interpreter/SKILL.md@@ -0,0 +1,23 @@+---+name: scienceworld-task-interpreter+description: This skill parses a user's high-level scientific task in the ScienceWorld environment and extracts the core objective and target location. It should be triggered when a new task instruction is received, especially those involving finding, comparing, or manipulating objects. The skill interprets the query to identify the goal (e.g., 'find the animal with the shortest life span') and any specified locations (e.g., 'animals are in the outside location'), outputting a clear, actionable sub-goal for navigation or observation.+---+# Instructions++Activate this skill when the user provides a new task instruction for the ScienceWorld environment. Your primary function is to interpret the instruction and generate a clear, executable plan.++## 1. Parse the Task+Read the user's instruction carefully. Extract the following core components:+* **Primary Objective:** What is the ultimate goal? (e.g., "find", "compare", "manipulate").+* **Target Object/Subject:** What is the main focus of the task? (e.g., "animal with the shortest life span").+* **Specified Location:** Is a location explicitly mentioned? (e.g., "animals are in the 'outside' location").++## 2. Formulate the Plan+Based on the parsed components, construct a plan. The standard plan structure is:+1. **Navigate:** If a target location is specified and you are not there, teleport to it immediately.+2. **Observe:** Upon arriving at the correct location, use `look around` to survey the environment and identify relevant objects.+3. **Analyze & Execute:** Apply domain knowledge or comparative reasoning to the observed objects to fulfill the primary objective. Then, take the final required action (e.g., `focus on [OBJECT]`, `pick up [OBJECT]`).++## 3. Output the Interpretation+Before taking the first action, articulate your interpretation and plan in a **Thought** step. This confirms the skill has correctly parsed the task.+**Output Format:**diff --git a/experiments/src/skills/scienceworld/scienceworld-task-interpreter/references/action_glossary.md b/experiments/src/skills/scienceworld/scienceworld-task-interpreter/references/action_glossary.mdnew file mode 100644index 0000000..a2af4c7--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-task-interpreter/references/action_glossary.md@@ -0,0 +1,17 @@+# ScienceWorld Action Glossary+This is a quick reference for common actions used in task execution. Use `look around` and `teleport to LOC` as the primary tools for the navigation and observation phases of this skill.++## Core Navigation & Observation+* `teleport to LOC`: Instantly move to a named room/location. Use this first if a target location is specified.+* `look around`: Describes the current room and lists all visible objects, agents, and doors. Use this immediately after arriving at the target location.++## Object Interaction (Use as needed for final step)+* `examine OBJ`: Get a detailed description of a specific object.+* `look at OBJ`: List the contents inside a container object.+* `focus on OBJ`: Signal intent or select a specific object as the task target.+* `pick up OBJ`: Move an object into your inventory.+* `use OBJ [on OBJ]`: Operate a device or apply an item.++## Environment Notes+* **Containers are open:** You can directly `look at` or `take from` containers without needing to `open` them first.+* **Rooms:** kitchen, foundry, workshop, bathroom, outside, living room, bedroom, greenhouse, art studio, hallway.diff --git a/experiments/src/skills/scienceworld/scienceworld-task-parser/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-task-parser/SKILL.mdnew file mode 100644index 0000000..e06b71e--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-task-parser/SKILL.md@@ -0,0 +1,37 @@+---+name: scienceworld-task-parser+description: Analyzes user instructions in ScienceWorld environments to extract specific task requirements and constraints. Use this skill when receiving a new task to identify required objects, target locations, and action sequences.+---+# Instructions for ScienceWorld Task Parsing++When you receive a new task instruction in a ScienceWorld environment, follow this process to parse it into a structured plan.++## 1. Parse the Instruction+Immediately analyze the user's natural language instruction. Extract the following core components:+* **Target Object Type:** Identify the category or description of the object to be manipulated (e.g., 'non-living thing', 'liquid', 'electrical component').+* **Target Location:** Identify the final destination for the object, including the room and specific container (e.g., 'purple box in the workshop').+* **Required Actions:** Infer the sequence of actions implied by verbs like "find", "focus on", "move", "pour", "mix", etc.++**Output your analysis as a concise thought.** Example: "Task requires finding a non-living object in the workshop and moving it to the purple box."++## 2. Survey the Environment+* Use `look around` in your current room to get an inventory of visible objects, containers, and their states.+* If the target location is a different room, use `teleport to LOC` to go there first, then `look around`.++## 3. Identify the Target Object+* From the room description, identify objects matching the parsed **Target Object Type**.+* If multiple candidates exist, select one that is clearly non-living, portable, and not part of a fixed apparatus (e.g., a wire, a light bulb, a battery). Avoid substances like 'air'.+* Use `examine OBJ` or `look at OBJ` if you need more detail to confirm an object's properties.++## 4. Execute the Task Sequence+1. **Signal Intent:** Use `focus on OBJ` on the identified target object. This explicitly marks the object for the task.+2. **Perform Core Action:** Execute the primary action from the parsed instruction (e.g., `move OBJ to OBJ`, `pour OBJ into OBJ`).+3. Use `wait` or `wait1` only if necessary to allow for state changes.++## Key Principles+* **Efficiency:** All containers are pre-opened. Do not use `open` or `close` unless explicitly required.+* **Directness:** Teleport directly to the target room. Do not explore unrelated rooms.+* **Clarity:** Structure your internal reasoning using the "Thought:" prefix before each action, as shown in the trajectory.+* **Verification:** If an initial `look around` is insufficient, a second `look around` is acceptable to confirm the environment state before proceeding.++For detailed examples and common task patterns, consult the reference documentation.diff --git a/experiments/src/skills/scienceworld/scienceworld-task-parser/references/task_patterns.md b/experiments/src/skills/scienceworld/scienceworld-task-parser/references/task_patterns.mdnew file mode 100644index 0000000..aa211e4--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-task-parser/references/task_patterns.md@@ -0,0 +1,53 @@+# Common ScienceWorld Task Patterns++This reference catalogs frequent instruction patterns and their corresponding parsing logic.++## Pattern 1: Find and Move+* **Instruction Template:** "Find a(n) [OBJECT_TYPE]. First, focus on the thing. Then, move it to the [CONTAINER] in the [ROOM]."+* **Parsed Components:**+ * Target Object Type: `[OBJECT_TYPE]` (e.g., non-living thing, red wire, light bulb)+ * Target Location: `[CONTAINER]` in `[ROOM]`+ * Action Sequence: `find` -> `focus on` -> `move to`+* **Execution Flow:**+ 1. Teleport to `[ROOM]`.+ 2. `look around`.+ 3. Identify an object matching `[OBJECT_TYPE]`.+ 4. `focus on [OBJECT]`.+ 5. `move [OBJECT] to [CONTAINER]`.++## Pattern 2: Activate/Use Device+* **Instruction Template:** "Turn on/activate/use the [DEVICE]."+* **Parsed Components:**+ * Target Object: `[DEVICE]`+ * Action: `activate` or `use`+* **Execution Flow:**+ 1. Locate the `[DEVICE]` (may require room change).+ 2. `activate [DEVICE]` or `use [DEVICE]`.++## Pattern 3: Create Mixture+* **Instruction Template:** "Mix [SUBSTANCE_A] and [SUBSTANCE_B] in the [CONTAINER]."+* **Parsed Components:**+ * Target Objects: `[SUBSTANCE_A]`, `[SUBSTANCE_B]`+ * Target Location: `[CONTAINER]`+ * Action: `pour` -> `mix`+* **Execution Flow:**+ 1. Locate substances and container.+ 2. `pour [SUBSTANCE_A] into [CONTAINER]`.+ 3. `pour [SUBSTANCE_B] into [CONTAINER]`.+ 4. `mix [CONTAINER]`.++## Object Classification Guide+Use this to disambiguate the **Target Object Type**:+* **Non-living thing:** Any man-made object (wire, bulb, battery, tool, box). Not substances (air, water).+* **Electrical component:** battery, wire, switch, light bulb.+* **Container:** box, freezer, beaker, vial.+* **Substance:** air, water, chemical solutions (often in containers).++## Action Mapping+* `find` -> `look around` / `examine`+* `focus on` -> `focus on`+* `move` -> `move OBJ to OBJ`+* `turn on/off` -> `activate` / `deactivate`+* `connect` -> `connect OBJ to OBJ`+* `pour` -> `pour OBJ into OBJ`+* `mix` -> `mix OBJ`diff --git a/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/SKILL.mdnew file mode 100644index 0000000..9e691c5--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/SKILL.md@@ -0,0 +1,33 @@+---+name: scienceworld-temperature-measurer+description: This skill uses a thermometer on a substance to measure its temperature. It should be triggered when the agent needs to determine the temperature of a material (e.g., lead) to assess if it has reached a specific melting point or threshold. The skill requires a thermometer in inventory and a target substance, outputting the measured temperature in degrees Celsius, which is key for scientific measurement tasks.+---+# Skill: Temperature Measurement for Scientific Experiments++## Purpose+Measure the temperature of a target substance (e.g., a metal like lead) to determine if it has reached a specific state-change threshold, such as its melting point.++## Core Workflow+1. **Acquire Thermometer:** Ensure a thermometer is in your inventory. If not, locate and pick one up.+2. **Locate Target Substance:** Identify the substance to be measured (e.g., "lead"). It may be in a container.+3. **Prepare for Heating (If Necessary):** If measuring a melting point, the substance likely needs to be heated.+ * Transfer the substance to a heat-resistant container (e.g., a metal pot).+ * Move the container to a heating device (e.g., a blast furnace in the foundry).+ * Activate the heating device.+4. **Measure Temperature:** Use the thermometer from your inventory on the target substance.+5. **Interpret Result:** The observation will state the measured temperature in degrees Celsius. Use this value to make a decision (e.g., "above 150.0 degrees" -> focus on the red box).++## Key Actions & Observations+* `pick up thermometer`: Acquire the essential measuring tool.+* `move [substance] to [container]`: Prepare the sample.+* `activate [heating device]`: Initiate the temperature change process.+* `use thermometer in inventory on [substance]`: The primary measurement command. The observation (`the thermometer measures a temperature of X degrees celsius`) is the skill's key output.+* Observe state changes: `a substance called lead` -> `a substance called liquid lead`.++## Bundled Logic+For a standard melting point determination task, use the bundled script `measure_melting_point.py`. It encapsulates the precise sequence for the lead experiment demonstrated in the trajectory.++## Notes+* The skill assumes containers are open and accessible.+* Teleportation (`teleport to [room]`) is often necessary to move between resource locations (e.g., kitchen, foundry).+* If `use thermometer` fails, check the substance's state via `look at [container]` and ensure the thermometer is in your inventory.diff --git a/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/references/action_guide.md b/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/references/action_guide.mdnew file mode 100644index 0000000..9465656--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-temperature-measurer/references/action_guide.md@@ -0,0 +1,36 @@+# Action Guide for ScienceWorld Temperature Measurement++## Essential Actions+| Action | Purpose | Example | Expected Observation Key Phrase |+| :--- | :--- | :--- | :--- |+| `pick up OBJ` | Acquire a tool or sample. | `pick up thermometer` | `You move the thermometer to the inventory.` |+| `move OBJ to OBJ` | Transfer a substance or item. | `move lead to metal pot` | `You move the lead to the metal pot.` |+| `activate OBJ` | Start a device. | `activate blast furnace` | `The blast furnace is now activated.` |+| `use OBJ on OBJ` | Apply a tool to a target. | `use thermometer in inventory on lead` | `the thermometer measures a temperature of X degrees celsius` |+| `teleport to LOC` | Instant movement between rooms. | `teleport to foundry` | `You teleport to the foundry.` |+| `look at OBJ` | Inspect contents of a container/device. | `look at blast furnace` | `In the blast furnace is: a metal pot (containing...)` |+| `focus on OBJ` | Signal intent or confirm target. | `focus on red box` | `You focus on the red box.` |++## Critical Observations for State Tracking+* **Substance State Change:** `a substance called lead` β `a substance called liquid lead`. This indicates melting has occurred.+* **Temperature Reading:** The output of the `use thermometer` action is the numerical result. **Example:** `the thermometer measures a temperature of 450 degrees celsius`.+* **Device Status:** `which is turned on` vs. `which is turned off`. Confirm heaters are active.++## Common Pitfalls & Solutions+1. **"No known action matches that input" when using thermometer.**+ * **Cause:** The target substance name might have changed state (e.g., `lead` -> `liquid lead`) or is not directly accessible.+ * **Solution:** Use `look at [container]` to check the exact name of the substance inside, then use that name (e.g., `use thermometer ... on liquid lead`).++2. **Substance not heating.**+ * **Cause:** The heating device may not be active, or the sample is not inside it.+ * **Solution:** Verify with `look at [heating device]`. Ensure `activate [device]` was successful and the container is inside.++3. **Cannot find the thermometer or substance.**+ * **Cause:** Not in the correct room.+ * **Solution:** Use `look around` to survey the current room. Use `teleport` to move to likely rooms (e.g., `kitchen` for tools, `foundry` for heaters).++## Workflow Triggers+Use this skill when the goal involves:+* "measure the temperature of [substance]"+* "find the melting point of [metal]"+* "check if [material] is above/below [number] degrees"diff --git a/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/SKILL.mdnew file mode 100644index 0000000..b3e548d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-threshold-evaluator+description: This skill compares a measured numerical value (e.g., temperature, weight) against a predefined threshold to determine a binary outcome. It should be triggered immediately after obtaining a measurement that has an associated conditional instruction. The skill evaluates if the value is above/below the threshold to guide the next action.+---+# Threshold Evaluation Skill++## When to Use+Trigger this skill **immediately** after you obtain a numerical measurement (e.g., temperature reading) and you have a conditional instruction that depends on that measurement (e.g., "If value > X, do A; if value < X, do B").++## Core Logic+1. **Extract the Measurement:** Identify the numerical value from the observation (e.g., "the thermometer measures a temperature of 56 degrees celsius" -> `56`).+2. **Identify the Threshold & Condition:** Parse the user's instruction to find the threshold value and the comparison operator (e.g., "above 50.0 degrees" -> `threshold=50.0`, `operator=">"`).+3. **Evaluate:** Perform the comparison (`measured_value > threshold` or `measured_value < threshold`).+4. **Execute Branch:** Based on the boolean result, perform the corresponding action specified in the instruction.++## Key Principles+* **Immediate Execution:** Do not perform any other actions between obtaining the measurement and running this evaluation.+* **Precision:** Use the exact numerical value from the observation. Do not estimate or round unless specified.+* **Binary Decision:** The outcome is strictly one of two paths. If the measurement equals the threshold, re-examine the instruction for guidance (e.g., "above" typically means `>`, not `>=`).++## Common Pitfalls (from Trajectory)+* **Incorrect Branching:** Do not execute the branch for the opposite condition (e.g., focusing on the blue box when the value is above the threshold).+* **Premature Evaluation:** Ensure the measurement is complete and valid before evaluating.+* **Action Confusion:** The final action (e.g., `focus on OBJ`) must target the correct object specified for the satisfied condition.++For detailed examples and the evaluation script, see the reference documentation.diff --git a/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/action_guide.md b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/action_guide.mdnew file mode 100644index 0000000..59c45f6--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/action_guide.md@@ -0,0 +1,69 @@+# Action Execution Guide++## After Evaluation: What to Do Next++Once the threshold evaluation is complete, you must execute the appropriate action based on the result.++### 1. Identify the Target Action++From the original instruction, identify the two possible actions:+- **Action A**: What to do if the condition is `True` (value above/below threshold)+- **Action B**: What to do if the condition is `False` (value not above/below threshold)++**Example from trajectory:**+- If temperature > 50.0: `focus on green box`+- If temperature < 50.0: `focus on blue box`++### 2. Construct the Action Command++Use the standard action format from the environment:+- `focus on OBJ`+- `use OBJ`+- `activate OBJ`+- `move OBJ to OBJ`+- etc.++**Important:** Use the exact object names as they appear in the environment observations.++### 3. Execute Immediately++Do not insert intermediate steps between evaluation and action execution.++### 4. Verification (Optional)++After executing the action, you may want to:+- Confirm the action was successful (check observation)+- Ensure you're now on the correct branch of the task++## Common Action Patterns++| Condition Type | Typical Actions |+|----------------|-----------------|+| **Temperature** | `focus on [object]`, `activate/deactivate [heater/cooler]`, `move [sample] to [location]` |+| **Weight/Mass** | `use [container]`, `move [sample] to [scale]`, `pour [substance] into [vessel]` |+| **pH/Concentration** | `add [reagent]`, `mix [solution]`, `focus on [indicator]` |+| **Time/Duration** | `activate/deactivate [timer]`, `wait`, `focus on [clock]` |++## Error Recovery++If the evaluation leads to an impossible action:+1. **Re-check the measurement** - Did you extract the correct value?+2. **Re-parse the condition** - Did you identify the correct threshold and operator?+3. **Verify object existence** - Is the target object present in the current room?+4. **Consult trajectory** - Look for similar patterns in successful executions.++## Example: Complete Execution Flow++**Initial State:**+- Instruction: "If voltage > 12V, connect to red terminal. If voltage < 12V, connect to black terminal."+- Observation: "multimeter reads 14.5 volts"++**Skill Execution:**+1. Extract measurement: `14.5`+2. Parse condition: threshold=`12.0`, operator=`>`+3. Evaluate: `14.5 > 12.0` = `True`+4. Identify action: `connect to red terminal`+5. Construct command: `connect multimeter to red terminal`+6. Execute: `connect multimeter to red terminal`++**Result:** The correct branch is executed based on the measured value.diff --git a/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/usage_examples.md b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/usage_examples.mdnew file mode 100644index 0000000..abebc44--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-threshold-evaluator/references/usage_examples.md@@ -0,0 +1,80 @@+# Threshold Evaluator - Usage Examples++## Example 1: Temperature Measurement (from Trajectory)++**Instruction:**+> "If the melting point of chocolate is above 50.0 degrees, focus on the green box. If the melting point of chocolate is below 50.0 degrees, focus on the blue box."++**Observation:**+> "the thermometer measures a temperature of 56 degrees celsius"++**Skill Execution:**+1. **Extract Measurement:** `56.0`+2. **Parse Condition:**+ - Threshold: `50.0`+ - Operator: `>` (from "above 50.0 degrees")+ - Action if True: focus on green box+ - Action if False: focus on blue box+3. **Evaluate:** `56.0 > 50.0` = `True`+4. **Execute Branch:** `focus on green box`++**Common Mistake to Avoid:**+- Incorrect: Executing `focus on blue box` when value is above threshold.++## Example 2: Weight Comparison++**Instruction:**+> "If the sample weighs less than 100 grams, use the small container. If it weighs more than 100 grams, use the large container."++**Observation:**+> "The scale reads 87.5 grams"++**Skill Execution:**+1. **Extract Measurement:** `87.5`+2. **Parse Condition:**+ - Threshold: `100.0`+ - Operator: `<` (from "less than 100 grams")+ - Action if True: use small container+ - Action if False: use large container+3. **Evaluate:** `87.5 < 100.0` = `True`+4. **Execute Branch:** `use small container`++## Example 3: pH Level Check++**Instruction:**+> "When the pH drops below 7.0, add the alkaline solution."++**Observation:**+> "pH meter shows 6.8"++**Skill Execution:**+1. **Extract Measurement:** `6.8`+2. **Parse Condition:**+ - Threshold: `7.0`+ - Operator: `<` (from "below 7.0")+ - Action if True: add alkaline solution+ - Action if False: (none specified - continue monitoring)+3. **Evaluate:** `6.8 < 7.0` = `True`+4. **Execute Branch:** `add alkaline solution`++## Edge Cases & Notes++1. **Exact Threshold Match:**+ - Instruction: "above 50 degrees" means `measurement > 50`, not `>= 50`.+ - If measurement equals exactly 50.0, the condition is `False`.+ - Always follow the precise wording of the instruction.++2. **Multiple Measurements:**+ - If taking multiple readings (e.g., monitoring temperature rise), evaluate after each measurement.+ - The skill should be triggered for each new measurement observation.++3. **Implicit Thresholds:**+ - Sometimes the threshold is implied: "If it's too hot (>40Β°C), turn off the heater."+ - Extract the numerical boundary from context.++4. **Unit Consistency:**+ - Ensure the measurement and threshold are in the same units.+ - The extraction function handles unit-agnostic number parsing.++## Integration Pattern+diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/SKILL.mdnew file mode 100644index 0000000..2d0475d--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/SKILL.md@@ -0,0 +1,35 @@+---+name: scienceworld-tool-fetcher+description: This skill locates and picks up a specified tool or instrument from the environment. It should be triggered when a task requires a specific tool (e.g., thermometer, stopwatch) for measurement or manipulation. The skill identifies the tool's location via observation and executes a pick-up action, moving the tool to inventory.+---+# Instructions++**Primary Goal:** Locate a specified tool and move it to your inventory.++## 1. Identify the Target Tool+* The required tool will be specified in the user's task or request (e.g., "thermometer", "stopwatch", "lighter").+* Confirm the exact name of the tool object.++## 2. Locate the Tool via Exploration+* If you are not in the correct room, use `teleport to [ROOM_NAME]` to go to the most likely location (e.g., `kitchen`, `workshop`).+* Use `look around` to survey the current room.+* Scan the observation for the target tool name. It may be:+ * Listed directly in the room description (e.g., "a thermometer").+ * Inside an open container (e.g., "a fridge. In the fridge is: chocolate, a wood cup...").+* If the tool is not immediately visible, examine likely containers using `look at [CONTAINER]` (e.g., `look at counter`, `look at cupboard`).++## 3. Execute the Pick-up+* Once the tool is located, execute the action: `pick up [TOOL_NAME]`.+* Example: `pick up thermometer`.+* Verify the action was successful by checking the observation for confirmation (e.g., "You move the thermometer to the inventory.").++## 4. Post-Action Verification (Optional)+* If required by the broader task, you may perform a secondary action to signal readiness, such as `focus on [TOOL_NAME] in inventory`.++## Key Constraints & Notes+* **Containers are Open:** All containers are pre-opened. Do not use `open` or `close` actions.+* **Direct Action:** Proceed directly to `pick up`. Do not attempt to move the tool to an intermediate location first.+* **Tool Not Found:** If the tool is not in the initial room, systematically `teleport` to other relevant rooms and repeat the `look around` search pattern.+* **Single Tool:** This skill fetches one specified tool. For multiple tools, trigger the skill sequentially.++**Output:** The target tool will be in your inventory, ready for use in subsequent task steps.diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/environment_actions.md b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/environment_actions.mdnew file mode 100644index 0000000..5bef4ae--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/environment_actions.md@@ -0,0 +1,24 @@+# ScienceWorld Environment: Action Reference++## Core Actions for Tool Fetching+| Action | Format | Purpose | Notes for Tool Fetcher |+|--------|--------|---------|------------------------|+| `teleport to` | `teleport to LOC` | Move instantly to another room. | Use to navigate to likely tool locations (e.g., `kitchen`, `workshop`). |+| `look around` | `look around` | Get a full description of the current room and visible objects. | **Primary search action.** Use first in a new room. |+| `look at` | `look at OBJ` | Inspect a container to see its contents. | Use if `look around` mentions a container (e.g., `fridge`, `cupboard`) that might hold the tool. |+| `pick up` | `pick up OBJ` | Move a portable object to your inventory. | **Final action.** Use when the tool is directly visible or confirmed inside an open container. |++## Important Environment Assumptions+1. **Open Containers:** All doors, lids, and drawers are already open. The `open` and `close` actions are **not needed** for this skill.+2. **Inventory System:** Successful `pick up` moves the object to an implicit inventory. You do not need to manage inventory slots.+3. **Object Names:** Use the exact name as it appears in observations (e.g., "thermometer", not "the thermometer").+4. **Room Connectivity:** You can `teleport` directly to any named room.++## Common Tool Locations+* **Thermometer, Stopwatch, Lighter:** Often found in the `kitchen` or `workshop`.+* **Specialized Instruments:** Check `workshop`, `art studio`, or `greenhouse`.+* **Containers to Check:** `fridge`, `cupboard`, `counter`, `drawer`, `shelf`.++## Error Handling Notes+* If `pick up` fails (e.g., "You can't pick that up"), the object may be fixed or too large. Report this failure.+* If the tool is not found after searching likely rooms, inform the user.diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/trajectory_analysis.md b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/trajectory_analysis.mdnew file mode 100644index 0000000..caa9b5a--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-fetcher/references/trajectory_analysis.md@@ -0,0 +1,31 @@+# Skill Derivation: Trajectory Analysis++## Source Trajectory Summary+**Task:** Measure the melting point of chocolate.+**Key Tool-Fetching Segment:**+1. Agent is in the `living room`. Uses `look around`.+2. Not finding the tool, uses `teleport to kitchen`.+3. In the `kitchen`, uses `look around`.+4. Observation lists "a thermometer" directly in the room.+5. Agent executes `pick up thermometer` successfully.++## Extracted Skill Logic+The trajectory demonstrates the core pattern for this skill:+1. **Identify Need:** Task requires a "thermometer".+2. **Navigate:** Teleport to probable location (`kitchen`).+3. **Search:** Use `look around` to scan the room.+4. **Locate:** Identify tool in observation list.+5. **Acquire:** Execute `pick up [tool]`.++## Why This is a Separate Skill+* **Reusable Pattern:** The sequence (teleportβlookβpick up) is generic for fetching any specified tool.+* **Fragile Core:** The exact match of the tool name in the observation and the `pick up` syntax is error-prone, suitable for scripting.+* **Context Isolation:** The skill doesn't need to know about the broader experiment (melting chocolate), only about finding the tool.++## Excluded from Skill+* Actions after tool acquisition (e.g., `focus on thermometer`, `use thermometer`).+* Heating the chocolate or interpreting measurements.+* Interacting with secondary objects (green/blue boxes).++## Design Validation+The skill package isolates the tool-fetching subroutine, allowing it to be invoked whenever a task says "you need a [tool]". The main `SKILL.md` provides high-level guidance, while the script handles the deterministic search logic.diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-user/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-tool-user/SKILL.mdnew file mode 100644index 0000000..012bc25--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-user/SKILL.md@@ -0,0 +1,14 @@+---+name: scienceworld-tool-user+description: Uses a tool from inventory on a target object or location to perform a specific environmental interaction, such as digging or cutting. Activate this skill when a task requires modifying the environment or manipulating materials, like using a shovel to dig soil. It takes the tool and target as inputs and outputs the result of the interaction, enabling physical task progression.+---+# Instructions++Use this skill when you need to perform a physical action on the environment using a tool you possess. The core action is `use TOOL on TARGET`.++## 1. Prerequisites+* **Tool in Inventory:** Ensure the required tool (e.g., `shovel`, `axe`) is in your inventory. Use `pick up OBJ` if it is not.+* **Clear Target:** Identify the exact target object or location name (e.g., `ground`, `tree`).++## 2. Core Action+Execute the interaction with the command:diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-user/references/example_trajectory.md b/experiments/src/skills/scienceworld/scienceworld-tool-user/references/example_trajectory.mdnew file mode 100644index 0000000..c2c58d1--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-user/references/example_trajectory.md@@ -0,0 +1,17 @@+# Skill Application Example: Growing an Avocado Plant++This document illustrates how the `scienceworld-tool-user` skill was applied in a specific trajectory to progress a task.++## Scenario: Digging Soil with a Shovel+**Goal:** Obtain soil for planting an avocado seed.+**Prerequisites Met:**+1. Tool (`shovel`) was acquired via `pick up shovel` in the greenhouse.+2. Target (`ground`) was identified in the `outside` location.++**Skill Execution:**+* **Action:** `use shovel on ground`+* **System Feedback:** "You dig a hole in the ground, and place the soil nearby."+* **Post-Action:** The agent then used `pick up soil` to collect the result.++## Outcome+The successful use of the tool transformed the environment, creating a new resource (`soil`) that was essential for the next step (planting the seed in a flower pot). This demonstrates the skill's role in enabling physical task progression.diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-validator/SKILL.md b/experiments/src/skills/scienceworld/scienceworld-tool-validator/SKILL.mdnew file mode 100644index 0000000..c21233f--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-validator/SKILL.md@@ -0,0 +1,26 @@+---+name: scienceworld-tool-validator+description: This skill performs a basic functionality check on a tool in the agent's inventory. It should be triggered after acquiring a tool and before its first use in a critical task step to ensure it is operational. The skill typically uses a 'focus' or 'examine' action on the tool and confirms its readiness state.+---+# Tool Validation Protocol++## Purpose+Execute a pre-use functionality check on a tool or instrument to confirm it is operational before employing it in a critical task step.++## Core Workflow+1. **Acquire Tool:** Ensure the target tool is in your inventory. If not, retrieve it from the environment.+2. **Execute Validation:** Use the `focus on [TOOL]` action on the tool in your inventory. This is the standard validation action.+3. **Confirm Readiness:** Observe the system's response. A successful focus action (e.g., "You focus on the [tool].") confirms the tool is ready for use. No further diagnostic steps are required unless an error is observed.++## Key Principles+* **Timing:** Perform this check immediately after acquiring a tool and *before* its first application in a task-sensitive operation (e.g., measuring, activating, connecting).+* **Simplicity:** The `focus` action is the primary, lightweight validation method. Avoid unnecessary `examine` or `use` actions during the check.+* **State Awareness:** The skill assumes the environment's containers are open and items are accessible. Teleportation is available for efficient navigation.++## Example Application+* **Scenario:** You need to measure the temperature of a substance.+* **Application:**+ 1. Locate and `pick up thermometer`.+ 2. **Trigger Skill:** `focus on thermometer in inventory`.+ 3. **Confirmation:** Observe "You focus on the thermometer." The tool is now validated for use.+ 4. Proceed with `use thermometer on [SUBSTANCE]`.diff --git a/experiments/src/skills/scienceworld/scienceworld-tool-validator/references/action_primer.md b/experiments/src/skills/scienceworld/scienceworld-tool-validator/references/action_primer.mdnew file mode 100644index 0000000..19ca294--- /dev/null+++ b/experiments/src/skills/scienceworld/scienceworld-tool-validator/references/action_primer.md@@ -0,0 +1,15 @@+# Action Primer for ScienceWorld++## Core Validation & Inspection Actions+* `focus on OBJ`: The primary action for signaling intent and performing a basic operational check on a tool. Use this for validation.+* `examine OBJ`: Provides a detailed description of an object's properties. Use for in-depth inspection *after* validation if needed.+* `look at OBJ`: Describes a container's contents. Not typically used for tool validation.++## Common Tool Contexts+Tools often appear in standard locations:+* **Kitchen:** `thermometer`, `stopwatch`, `lighter` on counters or tables.+* **Workshop/Foundry:** More specialized instruments.+* **Containers:** `fridge`, `cupboard`, `drawer`. Assume they are open.++## Navigation Note+Use `teleport to LOC` to move efficiently between rooms when searching for a tool.diff --git a/experiments/src/skills/scienceworld/soil-extraction/SKILL.md b/experiments/src/skills/scienceworld/soil-extraction/SKILL.mdnew file mode 100644index 0000000..a4ab189--- /dev/null+++ b/experiments/src/skills/scienceworld/soil-extraction/SKILL.md@@ -0,0 +1,28 @@+---+name: soil-extraction+description: Uses a shovel tool to dig soil from the ground in outdoor environments. Execute this skill when you need to obtain soil for planting tasks and have both the shovel in inventory and access to an appropriate digging location. The skill produces soil that can then be collected and transported.+---+# Skill: Soil Extraction++## Purpose+This skill enables the agent to extract soil from the ground using a shovel. It is a foundational step for planting tasks, transforming a bare outdoor location into a source of usable soil.++## Prerequisites+1. **Tool in Inventory:** You must possess a `shovel` in your inventory.+2. **Location:** You must be in an outdoor environment (e.g., `outside`) where digging is permissible.+3. **Ground Access:** The ground must be accessible and diggable.++## Core Procedure+1. **Navigate:** Ensure you are in the target outdoor location (e.g., `teleport to outside`).+2. **Execute Dig:** Use the command `use shovel in inventory on ground`.+3. **Collect Output:** The action will produce `soil` placed nearby. Use `pick up soil` to add it to your inventory.++## Key Notes+* **Deterministic Action:** The `use shovel in inventory on ground` command is a reliable, single-step method for soil extraction as demonstrated in the trajectory.+* **Output Management:** The extracted soil is a separate object that must be explicitly picked up. It does not automatically enter your inventory.+* **Skill Chaining:** This skill is typically followed by `teleport` to transport the soil and `move` to deposit it into a target container (e.g., a flower pot).++## Error Handling & Ambiguity+* If the `use` command is ambiguous, select the action that clearly involves your inventory shovel and the ground.+* If no soil appears after digging, verify your location and that the shovel is correctly in your inventory.+* This skill does not handle soil preparation (e.g., mixing with water) or planting. It is strictly for extraction.diff --git a/experiments/src/skills/scienceworld/soil-extraction/references/trajectory_excerpt.md b/experiments/src/skills/scienceworld/soil-extraction/references/trajectory_excerpt.mdnew file mode 100644index 0000000..9e88918--- /dev/null+++ b/experiments/src/skills/scienceworld/soil-extraction/references/trajectory_excerpt.md@@ -0,0 +1,26 @@+# Relevant Trajectory Excerpts for Soil Extraction++The following actions from the provided trajectory demonstrate the core, repeatable pattern of the soil-extraction skill.++## Pattern: Dig -> Collect+This sequence was successfully executed three times to obtain soil for three flower pots.++1. **First Extraction:**+ * Action: `use shovel in inventory on ground`+ * Observation: `You dig a hole in the ground, and place the soil nearby.`+ * Follow-up: `pick up soil`++2. **Second Extraction:**+ * Action: `use shovel in inventory on ground`+ * Observation: `You dig a hole in the ground, and place the soil nearby.`+ * Follow-up: `pick up soil`++3. **Third Extraction:**+ * Action: `use shovel in inventory on ground`+ * Observation: `You dig a hole in the ground, and place the soil nearby.`+ * Follow-up: `pick up soil`++## Key Environmental Context+* **Location:** All extractions were performed in the `outside` room.+* **Tool State:** The `shovel` was in the agent's inventory prior to each `use` command.+* **Result Consistency:** Each `use` command reliably produced `soil` as a distinct, collectible object.diff --git a/experiments/src/skills/scienceworld/task-completion-focus/SKILL.md b/experiments/src/skills/scienceworld/task-completion-focus/SKILL.mdnew file mode 100644index 0000000..ff6304c--- /dev/null+++ b/experiments/src/skills/scienceworld/task-completion-focus/SKILL.md@@ -0,0 +1,29 @@+---+name: task-completion-focus+description: Focuses on a specific target object to signal task completion. Execute this skill when you have produced the required final object (like a grown banana) and need to formally complete the assigned task. This handles the 'focus on OBJ' action that typically marks successful task execution in the environment.+---+# Skill: Task Completion Focus++## Purpose+This skill is the final step in a task execution chain. It is triggered **only** when the primary objective of a task has been successfully achieved and the target object is present and observable in the environment. Its sole function is to execute the `focus on OBJ` action on the correct object, which formally signals task completion to the environment.++## When to Use+* **Prerequisite:** The final, required object (e.g., a grown banana, a crafted item, a repaired device) must be visibly present in the environment.+* **Trigger:** You have verified the object's presence and your goal is to complete the task.+* **Do Not Use** for intermediate steps, exploration, or object manipulation.++## Execution Protocol++1. **Verification:** Before execution, confirm the target object is in the scene. Use `look around` or `examine` if necessary.+2. **Action Execution:** Perform the `focus on <OBJECT>` action.+3. **Ambiguity Resolution:** The environment may present multiple valid targets (e.g., bananas on different trees). If an "Ambiguous request" observation is received, you **must** select the correct target by number.+ * **Selection Rule:** Choose the target that is most directly associated with the main task goal. If multiple are identical, select the first option (e.g., `0`).++## Example from Trajectory+**Scenario:** Task was to "grow a banana". After successful cultivation, multiple bananas are visible.+* **Observation:** "On the banana tree you see: a banana, a flower."+* **Correct Action:** `focus on banana on banana tree`+* **If Ambiguous:** Select option `0` (or the first instance of the target banana).++## Key Principle+This skill is a **low-freedom, terminal action**. Its logic is simple and deterministic. The creative and complex work (growing the plant, crafting the item) belongs to other skills. This skill exists solely to "press the final button."diff --git a/experiments/src/skills/scienceworld/task-completion-focus/references/action_primer.md b/experiments/src/skills/scienceworld/task-completion-focus/references/action_primer.mdnew file mode 100644index 0000000..6cd6271--- /dev/null+++ b/experiments/src/skills/scienceworld/task-completion-focus/references/action_primer.md@@ -0,0 +1,17 @@+# Primer: The 'focus on' Action++## Environmental Role+The `focus on OBJ` action is a special meta-action within this simulation environment. It does not manipulate the object physically but signals to the task system that the agent has successfully interacted with or produced the object relevant to the assigned goal.++## Semantics+* **Completion Signal:** Its primary use is to mark a task as **complete**.+* **Intent Declaration:** It can also be used to declare an intent to work on a specific object in multi-step tasks, though its most critical function is finalization.+* **Non-Destructive:** The action does not consume, move, or alter the object.++## Handling Ambiguity+The environment often requires disambiguation when multiple instances of a target object exist. The standard pattern is:+1. Agent sends: `focus on <OBJECT> on <CONTAINER>`+2. Environment responds with an "Ambiguous request" and a numbered list.+3. Agent must respond with a single number (e.g., `0`).++**Best Practice:** When the goal is simple completion (e.g., "focus on the grown banana"), selecting the first valid option (`0`) is the correct and sufficient strategy, as demonstrated in the provided trajectory.diff --git a/experiments/src/skills/scienceworld/task-completion-focus/references/trajectory_analysis.md b/experiments/src/skills/scienceworld/task-completion-focus/references/trajectory_analysis.mdnew file mode 100644index 0000000..9ac8e53--- /dev/null+++ b/experiments/src/skills/scienceworld/task-completion-focus/references/trajectory_analysis.md@@ -0,0 +1,17 @@+# Trajectory Analysis: Task Completion Focus++## Source Context+This skill is derived from the final segment of a "grow a banana" task trajectory.++## Key Sequence+1. **Prerequisite Achievement:** Multiple banana trees have reached the "reproducing stage" and are bearing fruit (`a banana`).+2. **Verification:** Agent uses `look around` to confirm the presence of bananas.+3. **Execution Attempt:** Agent issues `focus on banana on banana tree in the reproducing stage`.+4. **Ambiguity:** Environment lists 4 possible banana targets across three flower pots.+5. **Resolution:** Agent selects option `0`, corresponding to the banana in `flower pot 1`.++## Derived Rules+* The skill is invoked **after** the core productive task is done.+* The target object must be explicitly visible in the scene description.+* Ambiguity is resolved by selecting the **first matching option** (`0`), establishing a simple, deterministic rule for the completion step.+* This action is the terminal point of the task workflow.diff --git a/experiments/src/skills/webshop/webshop-action-executor/SKILL.md b/experiments/src/skills/webshop/webshop-action-executor/SKILL.mdnew file mode 100644index 0000000..8f54cfb--- /dev/null+++ b/experiments/src/skills/webshop/webshop-action-executor/SKILL.md@@ -0,0 +1,18 @@+---+name: webshop-action-executor+description: This skill executes a specific interface action, such as clicking a button or selecting an option, within a web shopping environment. It should be triggered when a decision has been made (e.g., to choose a color or proceed to purchase). The input is the target action identifier (e.g., 'white' or 'buy now'), and the output is the corresponding formatted action command (e.g., click[white]).+---+# Skill: WebShop Action Executor++## Purpose+Execute a single, specific action in a WebShop environment after a decision has been made. This skill formats the action into the required command structure for the WebShop interface.++## When to Use+- **Trigger:** When the agent has completed its analysis and has decided on the exact action to take (e.g., "select the white color option," "proceed to buy now").+- **Input:** A clear target identifier (string) derived from the available actions on the current page.+- **Output:** A correctly formatted `click[value]` or `search[keywords]` command.++## Core Instruction+1. **Receive Input:** The skill is provided with a single `target_action` string (e.g., 'white', 'buy now', 'b08w25dbb7').+2. **Format Output:** Immediately output the action in the exact format required by the WebShop environment:+\ No newline at end of filediff --git a/experiments/src/skills/webshop/webshop-attribute-selector/SKILL.md b/experiments/src/skills/webshop/webshop-attribute-selector/SKILL.mdnew file mode 100644index 0000000..641b0ea--- /dev/null+++ b/experiments/src/skills/webshop/webshop-attribute-selector/SKILL.md@@ -0,0 +1,24 @@+---+name: webshop-attribute-selector+description: Selects specific product attributes (e.g., flavor, size) on a product detail page to match user requirements. Triggered when a product page presents configurable options and the parsed query specifies needed values. It identifies the correct option from available clickables (e.g., 'smoked bacon' for flavor, '4 ounce (pack of 2)' for size) and executes the selection click.+---+# Instructions++## When to Use+Activate this skill when ALL of the following are true:+1. You are on a product detail page (not a search results page).+2. The observation contains configurable product options (e.g., "flavor", "size") listed as available actions.+3. The user's instruction specifies required values for one or more of these attributes (e.g., "gluten free", "4 ounce (pack of 2)", "smoked peppered bacon").++## Core Process+1. **Parse Requirements:** From the user's instruction, extract the required attribute values (e.g., target flavor, size, dietary feature).+2. **Map to Options:** Examine the list of available actions (clickables). Identify which clickable text corresponds to each required attribute value.+ * Use exact or fuzzy matching (see `scripts/match_attribute.py` for logic).+ * Prioritize exact matches. For dietary features like "gluten free" or "vegetarian," the product title or description may already confirm this; your goal is to select the correct flavor/size.+3. **Execute Selection:** For each identified attribute option, perform a `click[value]` action, where `value` is the exact text of the matching clickable.+4. **Finalize:** After all required attributes are selected, if a "Buy Now" or similar action is available and the instruction implies a purchase, you may proceed to click it.++## Important Notes+* Do not use this skill on search results pages. Use search actions there.+* If a required attribute cannot be matched to any available clickable, do not click. Re-evaluate the instruction or consider a different product.+* The observation may refresh after each click, showing the same page with selected options highlighted. Continue until all specified attributes are satisfied.diff --git a/experiments/src/skills/webshop/webshop-attribute-verifier/SKILL.md b/experiments/src/skills/webshop/webshop-attribute-verifier/SKILL.mdnew file mode 100644index 0000000..9cb5f3e--- /dev/null+++ b/experiments/src/skills/webshop/webshop-attribute-verifier/SKILL.md@@ -0,0 +1,24 @@+---+name: webshop-attribute-verifier+description: This skill confirms specific product attributes on a detailed product page. It is triggered when navigating to an individual product listing to verify details such as color options, exact price, or specifications. The skill checks available selections or displayed information against the user's requirements, ensuring the product matches before proceeding to purchase.+---+# Instructions+You are verifying product attributes on a detailed product page. Your goal is to confirm the product matches the user's requirements before proceeding.++## Core Workflow+1. **Parse Requirements:** Extract the user's target attributes (e.g., color, max price) from the instruction.+2. **Inspect Page:** Examine the observation for the product's details, available options (like color buttons), price, and specifications.+3. **Verify Match:** Systematically check if the product's attributes satisfy all user requirements.+4. **Act Accordingly:**+ * If the product matches **all** requirements, proceed to select the correct option (e.g., click the correct color) and then initiate the purchase (e.g., click 'Buy Now').+ * If the product **does not match** a requirement (e.g., wrong color, price too high), navigate back to search.++## Action Guidelines+* Use `click[value]` to interact with page elements. The `value` must exactly match a clickable item from the observation.+* Use `search[keywords]` only if you need to find a new product because the current one does not meet requirements.+* Your `Thought:` must explicitly state which requirement you are checking and the result of the check.++## Critical Rules+* **Price Check:** The product's price must be **strictly lower than** the user's specified maximum price.+* **Attribute Selection:** If a specific attribute (like color) is required, you **must** click the corresponding option button (e.g., `click[black]`) before proceeding to purchase.+* **Sequential Actions:** Do not skip the attribute selection step. The purchase action should only follow a successful verification and selection.diff --git a/experiments/src/skills/webshop/webshop-initial-search/SKILL.md b/experiments/src/skills/webshop/webshop-initial-search/SKILL.mdnew file mode 100644index 0000000..c82ffce--- /dev/null+++ b/experiments/src/skills/webshop/webshop-initial-search/SKILL.md@@ -0,0 +1,19 @@+---+name: webshop-initial-search+description: Performs the first search on an e-commerce platform using keywords derived from parsed user requirements. Trigger this skill when starting product discovery or when previous search results are insufficient. It formulates a search query from the criteria (e.g., '24 pack of 7.5 ounce bottles of non-gmo classic tonic') and executes the search action, returning the initial result page.+---+# Instructions+1. **Parse Requirements:** Extract the core product criteria from the user's instruction. Focus on:+ * **Quantity & Packaging:** (e.g., "24 pack")+ * **Size:** (e.g., "7.5 ounce bottles")+ * **Key Attributes:** (e.g., "non-gmo", "classic tonic")+ * **Price Constraint:** (e.g., "price lower than 50.00 dollars") - This is for validation later, not for the initial search query.++2. **Formulate Search Query:** Combine the extracted criteria into a concise, natural-language search string. Prioritize specificity to filter results effectively.+ * **Example:** For "i would like to get a 24 pack of 7.5 ounce bottles of non-gmo classic tonic", the query should be: `24 pack of 7.5 ounce bottles of non-gmo classic tonic`+ * **Do not** include the price constraint in the search keywords.++3. **Execute Search:** Use the platform's `search[<keywords>]` action with your formulated query.+ * The action output will be the initial search results page observation.++4. **Next Steps:** After executing this skill, proceed to evaluate the search results. The next actions will typically involve clicking on a promising product listing or refining the search.diff --git a/experiments/src/skills/webshop/webshop-option-selector/SKILL.md b/experiments/src/skills/webshop/webshop-option-selector/SKILL.mdnew file mode 100644index 0000000..0bf2110--- /dev/null+++ b/experiments/src/skills/webshop/webshop-option-selector/SKILL.md@@ -0,0 +1,24 @@+---+name: webshop-option-selector+description: This skill selects product options or variants (such as size, color, or quantity) on a product detail page based on user preferences or cost optimization. It should be triggered when a product page displays configurable options. The skill evaluates available choices (e.g., 1pcs vs 2pcs) and selects the one that best aligns with the user's constraints, such as minimizing cost.+---+# Skill: WebShop Option Selector++## Trigger Condition+Activate this skill when the observation from the WebShop environment contains:+1. A product detail page (indicated by the presence of a "Price:" field and product title).+2. One or more configurable option categories (e.g., "size:", "color:", "quantity:") with clickable values listed beneath them.++## Core Logic+1. **Parse the Observation:** Identify all configurable option categories and their available values from the current page state.+2. **Apply Selection Strategy:** By default, implement a **cost-minimization strategy**. For each option category, select the value that results in the lowest final price while still meeting any explicit user constraints from the original instruction (e.g., "price lower than 40.00 dollars").+3. **Execute Selection:** Perform a `click[value]` action for the chosen option value. If multiple categories exist, they should be selected in the order they appear on the page.++## Important Notes+- The skill assumes the displayed price updates (or is representative) after an option is selected. Your action should be based on the currently displayed information.+- If the user's instruction contains specific preferences (e.g., "large size", "blue color"), prioritize those over cost minimization.+- If no clear cost difference can be inferred, select the first available option.+- After selecting the desired option, you may proceed with other actions (e.g., `click[buy now]`).++## Example from Trajectory+**Observation Excerpt:**diff --git a/experiments/src/skills/webshop/webshop-option-selector/references/strategy_docs.md b/experiments/src/skills/webshop/webshop-option-selector/references/strategy_docs.mdnew file mode 100644index 0000000..5e9d877--- /dev/null+++ b/experiments/src/skills/webshop/webshop-option-selector/references/strategy_docs.md@@ -0,0 +1,35 @@+# Strategy Documentation for Option Selection++## Overview+This document details the decision-making strategies for the `webshop-option-selector` skill.++## Primary Strategy: Cost Minimization+**When to Use:** Default strategy when no user preference is detected.+**Logic:** Select the option value presumed to be the lowest cost. In e-commerce, this is often:+- The smallest quantity (e.g., "1pcs" vs "2pcs").+- The base model or standard variant.+- The default color or size.++**Implementation Note:** The current script uses a simple heuristic: select the **first listed value** for an option category, as product pages often list options in ascending order of price or quantity. For a production system, this would require integrating with a live pricing API or parsing dynamic price tags.++## Secondary Strategy: User Preference Matching+**When to Use:** When the user's original instruction contains explicit keywords matching an available option.+**Logic:**+1. Extract keywords from the instruction (e.g., "large", "blue", "2 pack").+2. For each configurable option category, check if any value contains a matching keyword (case-insensitive).+3. Select the first matching value.++**Precedence:** User preference overrides cost minimization.++## Edge Cases & Handling+1. **No Options Found:** Skill does not trigger. Return no action.+2. **Multiple Categories:** Process categories in the order they appear on the page. The script currently selects for the first category only; for multiple categories, the agent should loop.+3. **Price Constraint Violation:** The skill assumes the agent has already validated the product price against the user's budget (e.g., "under $40") before reaching the option page. If an option selection would exceed the budget, the agent should backtrack.+4. **Unclear Cost Difference:** If the price impact of options is unknown, default to the first option.++## Integration with Agent+The agent should:+1. Check the trigger condition (product detail page with options).+2. Call the `parse_and_select.py` script (or its logic) with the current observation and the original user instruction.+3. Execute the returned `click[value]` action.+4. Observe the resulting state (updated price, new options) and decide on subsequent actions (e.g., select another option, click "Buy Now").diff --git a/experiments/src/skills/webshop/webshop-price-checker/SKILL.md b/experiments/src/skills/webshop/webshop-price-checker/SKILL.mdnew file mode 100644index 0000000..1e42bda--- /dev/null+++ b/experiments/src/skills/webshop/webshop-price-checker/SKILL.md@@ -0,0 +1,18 @@+---+name: webshop-price-checker+description: This skill scans product listings or detail pages to verify if an item's price meets a specified budget constraint. It is triggered when evaluating a potential product for purchase. It extracts the price from the displayed information (e.g., '$164.95') and compares it against the maximum allowed budget, outputting a boolean decision on whether the item is within budget.+---+# Instructions+When evaluating a product for purchase, use this skill to check if its price is within the specified budget.++## Process+1. **Identify the Budget:** Extract the maximum allowed price from the user's instruction or the current context. The budget is typically expressed as a dollar amount (e.g., "lower than 200.00 dollars").+2. **Locate the Price:** On the current web page (search results or product detail page), find the price string. It is usually prefixed with a `$` symbol and may be labeled "Price:".+3. **Execute Check:** Run the `check_price.py` script, providing it with the extracted price string and the budget.+4. **Make Decision:** Based on the script's boolean output (`True`/`False`):+ * If `True`: The item is within budget. You may proceed with further evaluation or purchase.+ * If `False`: The item exceeds the budget. You should continue searching or select a different item.++## Notes+* The primary action for this skill is to call the bundled script. Do not perform manual price parsing or comparison in your main reasoning.+* If the price cannot be found on the page, assume the item is not suitable and continue your search.diff --git a/experiments/src/skills/webshop/webshop-price-checker/references/price_patterns.md b/experiments/src/skills/webshop/webshop-price-checker/references/price_patterns.mdnew file mode 100644index 0000000..4571af4--- /dev/null+++ b/experiments/src/skills/webshop/webshop-price-checker/references/price_patterns.md@@ -0,0 +1,23 @@+# Common Price String Patterns+This reference lists common formats for price strings encountered in e-commerce environments. The `check_price.py` script is designed to handle these.++## Primary Patterns+* `$164.95`+* `Price: $164.95`+* `$277.99`+* `$100.0` (Note: May be displayed with one decimal place)+* `$1,299.99` (Includes comma as thousands separator)++## Implied Context+On a product page, the price is often near:+* The "Buy Now" button.+* The product title.+* A label such as "Price:", "Cost:", or "Our Price:".++## Notes for the Agent+1. The budget constraint in the instruction may be phrased as:+ * "price lower than 200.00 dollars"+ * "under $200"+ * "less than 200.00"+2. Always convert the budget phrase into a numerical `max_budget` float (e.g., `200.00`) before calling the script.+3. If multiple prices are present (e.g., a sale price and a list price), target the current selling price, which is usually the most prominent.diff --git a/experiments/src/skills/webshop/webshop-product-detail-check/SKILL.md b/experiments/src/skills/webshop/webshop-product-detail-check/SKILL.mdnew file mode 100644index 0000000..3d1465e--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-check/SKILL.md@@ -0,0 +1,41 @@+---+name: webshop-product-detail-check+description: This skill examines a specific product's detailed page to verify it matches the user's requirements, checking price, description, features, and reviews. Trigger when a candidate product is selected from search results. It confirms alignment with constraints and provides a final suitability assessment before purchase.+---+# Skill: Product Detail Verification++## Trigger+Activate this skill when the agent has navigated to a specific product's detailed page from a search results list. The agent should have a user query containing specific requirements (e.g., product type, attributes, price constraints).++## Core Objective+Analyze the product detail page to confirm if the product meets all user-specified constraints. Provide a clear "Proceed" or "Reject" recommendation.++## Execution Workflow++1. **Parse User Requirements:** Extract key constraints from the user's instruction. Primary constraints are typically **Price** and **Key Attributes** (e.g., "long", "clip-in", "natural looking"). Store these in a structured format.++2. **Scrape Product Page Data:** Systematically extract the following information from the current page observation:+ * **Product Title**+ * **Price**+ * **Key Description Snippets** (from Description/Features sections)+ * **Rating** (if available)+ * **Availability of "Buy Now"** action.++3. **Constraint Verification:** Compare the scraped data against the user's requirements.+ * **Price Check:** Is the product price strictly less than the user's maximum? (e.g., < $40.00).+ * **Attribute Check:** Do the title and description contain terms matching the user's key attributes? (e.g., confirm "clip-in" and "natural looking" are present).+ * **Suitability Flag:** Product is suitable only if **ALL** hard constraints (price, mandatory attributes) are satisfied.++4. **Decision & Action:**+ * **If SUITABLE:** Conclude the product matches requirements. The recommended action is `click[buy now]`.+ * **If NOT SUITABLE:** Conclude the product fails one or more constraints. The recommended action is to return to search (`click[back to search]`) to find another candidate.++## Output Format+Your response must use the following format:++**Thought:** [Your reasoning, summarizing the user's constraints, the product details found, and the result of the verification check.]+**Action:** [The single, valid action to take: `click[buy now]` or `click[back to search]`]++## Notes+* Prioritize information explicitly on the product page. Assume missing information (like a Rating of "N.A.") does not disqualify a product unless specified by the user.+* The "Buy Now" button must be present in the available actions list for the purchase action to be valid.diff --git a/experiments/src/skills/webshop/webshop-product-detail-check/references/action_guidelines.md b/experiments/src/skills/webshop/webshop-product-detail-check/references/action_guidelines.mdnew file mode 100644index 0000000..12b5002--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-check/references/action_guidelines.md@@ -0,0 +1,24 @@+# WebShop Action Guidelines++## Action Format+The environment requires actions in one of two strict formats:+* `search[keywords]`+* `click[value]`++The `value` in a `click` action must be an **exact match** (case-insensitive) of an item in the list of available actions presented in the observation.++## Available Actions Identification+Available actions are typically indicated in the observation by:+1. **Clickable Buttons/Text:** Items like `Back to Search`, `< Prev`, `Next >`, `Buy Now`, `Description`.+2. **Product ASINs:** Alphanumeric codes starting with 'B0' (e.g., `B09C337K8S`) that are clickable in search results.+3. **Page Navigation:** `Page X (Total results: Y)`.++## Invalid Actions+If the specified `value` for a `click` action is not present in the current observation, the action is invalid and the agent performs nothing, wasting a step.++## Action Strategy for This Skill+This skill (`webshop-product-detail-check`) operates on a product detail page. The primary actionable outputs are:+1. `click[buy now]`: If the product is verified as suitable.+2. `click[back to search]`: If the product is not suitable, to return to the search results.++Always verify the target string (e.g., "buy now", "back to search") is present in the observation before recommending the action.diff --git a/experiments/src/skills/webshop/webshop-product-detail-inspector/SKILL.md b/experiments/src/skills/webshop/webshop-product-detail-inspector/SKILL.mdnew file mode 100644index 0000000..228ce0f--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-inspector/SKILL.md@@ -0,0 +1,26 @@+---+name: webshop-product-detail-inspector+description: This skill examines a product detail page to verify specific attributes or select options like size, color, or quantity. It is used after clicking on a product, to confirm that the item matches the user's needs (e.g., checking for '10 slots' option, price, material). The input is the product page observation, and the output is an action to select a required variant (e.g., click[10 slots]) or proceed if criteria are satisfied.+---+# Instructions++## Purpose+You are an agent navigating a web shop. Your current task is to inspect a product detail page. You have arrived here after clicking on a product from the search results.++## Input+You will receive an **Observation** containing the product page state. This includes:+* The original user instruction (e.g., "i am looking for an easy to clean jewelry box with 10 slots, and price lower than 60.00 dollars").+* Product details: Title, Price, Rating.+* Available options (e.g., size variants like "3 slot", "10 slots").+* Available actions (e.g., "Buy Now", "Description").++## Core Logic+1. **Parse the Instruction:** Identify the user's key requirements from the instruction (e.g., specific attribute: "10 slots", price constraint: "< $60").+2. **Examine the Page:** Check the product's displayed **Price** against the user's budget. Check the available options for the required attribute.+3. **Decision & Action:**+ * If the required attribute (e.g., "10 slots") is present as a selectable option, click on it.+ * If the product does not have the required attribute or exceeds the price limit, you should go "Back to Search".+ * If the product meets all criteria (correct attribute selected, price is valid), you may proceed (e.g., click "Buy Now").++## Output Format+Your response must be in this exact format:diff --git a/experiments/src/skills/webshop/webshop-product-detail-inspector/references/action_guidelines.md b/experiments/src/skills/webshop/webshop-product-detail-inspector/references/action_guidelines.mdnew file mode 100644index 0000000..fdd1615--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-inspector/references/action_guidelines.md@@ -0,0 +1,23 @@+# Action Guidelines for WebShop Navigation++## Valid Action Patterns+The environment only accepts actions in these formats:+* `search[keywords]`+* `click[value]`++## Click Action Rules+1. **Exact Match Required:** The `value` inside `click[]` must be an exact, case-sensitive string match for a clickable element shown in the observation.+2. **Common Clickable Elements:**+ * Product IDs (e.g., `B08VJB28BL`)+ * Option buttons (e.g., `10 slots`, `Large`, `Blue`)+ * Navigation (e.g., `Back to Search`, `< Prev`, `Next >`)+ * Page actions (e.g., `Buy Now`, `Add to Cart`, `Description`)++## Search Action Rules+1. **Use when:** You need to find new products. This is typically done from the main search page.+2. **Keyword Strategy:** Combine key product terms from the instruction. Be specific but not overly long.+ * Good: `search[jewelry box 10 slots under $60]`+ * Less Effective: `search[box]`++## Error Handling+If you attempt an invalid action (e.g., `click[Something Not Listed]`), the environment will ignore it and the state will not change. Always verify the available actions list in the observation before responding.diff --git a/experiments/src/skills/webshop/webshop-product-detail-inspector/references/trajectory_example.md b/experiments/src/skills/webshop/webshop-product-detail-inspector/references/trajectory_example.mdnew file mode 100644index 0000000..fa806b8--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-inspector/references/trajectory_example.md@@ -0,0 +1,35 @@+# Example Trajectory Breakdown++This document breaks down the provided execution trajectory to illustrate the skill's intended use.++## Scenario+**User Instruction:** "i am looking for an easy to clean jewelry box with 10 slots, and price lower than 60.00 dollars"++### Step 1: Initial Search+* **Observation:** Search page is presented.+* **Agent Thought:** Need to find item matching criteria. Start with a targeted search.+* **Agent Action:** `search[jewelry box, 10 slots, less than $60, easy to clean]`+* **Rationale:** The agent correctly uses the `search` action, incorporating the main product type and key constraints.++### Step 2: Inspecting Search Results+* **Observation:** Search results list. Item `B08VJB28BL` is a "Clear Glass Jewelry Box" priced at `$20.97`.+* **Agent Thought:** First item matches budget and seems relevant ("clear glass" suggests easy to clean). Click to inspect details.+* **Agent Action:** `click[b08vjb28bl]`+* **Rationale:** The agent moves from the list view to the product detail page for closer inspection.++### Step 3: Product Detail Inspection & Variant Selection (CORE SKILL)+* **Observation:** Product detail page. Options include `3 slot`, `6 grids`, `10 slots`, `30 grids`. Price is `$20.97`.+* **Agent Thought:** The page shows a `10 slots` option, which matches the user's requirement. Price is valid.+* **Agent Action:** `click[10 slots]`+* **Rationale:** This is the core function of the skill. The agent identifies the required attribute among the options and selects it.++### Step 4: Proceeding with Purchase+* **Observation:** Page remains on product detail (variant selected). `Buy Now` is available.+* **Agent Thought:** All criteria are satisfied (10 slots selected, price < $60). Proceed to buy.+* **Agent Action:** `click[buy now]`+* **Rationale:** After confirming the product meets all requirements, the agent takes the next logical step.++## Key Takeaways for the Skill+1. The skill is activated **after** navigating to a product page.+2. Its primary job is to **locate and select a specific product variant** based on the user's instruction.+3. It must also perform a final **price check** before proceeding.diff --git a/experiments/src/skills/webshop/webshop-product-detail-navigator/SKILL.md b/experiments/src/skills/webshop/webshop-product-detail-navigator/SKILL.mdnew file mode 100644index 0000000..a9010f0--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-navigator/SKILL.md@@ -0,0 +1,39 @@+---+name: webshop-product-detail-navigator+description: Navigates to and interacts with a specific product's detail page. This skill is triggered after a candidate product ID is selected from search results. It performs the click action to load the product page and then identifies available interactive elements (like flavor or size selectors) that need to be configured to match the user's requirements.+---+# Instructions++## Purpose+This skill is used to navigate from a product search result to the product's detail page and configure it according to the user's specific requirements (e.g., flavor, size, dietary needs).++## When to Use+Use this skill when you have identified a candidate product from a search result list and need to:+1. Load its detailed product page.+2. Verify its attributes against the user's instruction.+3. Select the correct options (like `flavor` or `size`) to match the user's request.+4. Proceed to the final purchase step if all criteria are met.++## Core Workflow+1. **Navigate to Product Page:** Click on the product ID (e.g., `B06Y96MXJV`) from the search results to load its detail page.+2. **Parse the Page State:** Once on the product page, the observation will contain the product title, price, and a list of available interactive elements (clickables). Analyze these to find configuration options.+3. **Match Requirements:** Cross-reference the user's original instruction with the available options. Look for keywords related to:+ * **Product Type/Flavor:** (e.g., "smoked peppered bacon", "smoked bacon").+ * **Attributes:** (e.g., "gluten free", "vegetarian").+ * **Size/Packaging:** (e.g., "4 ounce (pack of 2)").+ * **Price:** Ensure the displayed price is below any specified maximum.+4. **Configure the Product:** Sequentially click on the option values that match the user's requirements. The typical order is to select the correct `flavor` first, then the correct `size`.+5. **Finalize:** After configuring the product, if all requirements are satisfied, click the final action button (e.g., `Buy Now`).++## Action Format+Your actions must strictly follow the required format:+* `click[<exact_value>]` - The `<exact_value>` must match one of the strings in the "clickables" list from the observation, including case and spacing.+* `search[<keywords>]` - Use only if you need to go back to search. This skill focuses on post-search navigation.++## Key Logic (Handled by Script)+The deterministic sequence of checking for and selecting flavor and size options is handled by the bundled script `configure_product.py`. Use it to generate the correct click actions after loading the product page.++## Important Notes+* **Validation:** Do not click an option if it does not appear in the current list of clickables.+* **Observation:** Always read the full observation after each action. The list of clickables updates after each selection.+* **Goal:** The final goal is to have a product configured per the user's instruction and ready for purchase.diff --git a/experiments/src/skills/webshop/webshop-product-detail-navigator/references/action_protocol.md b/experiments/src/skills/webshop/webshop-product-detail-navigator/references/action_protocol.mdnew file mode 100644index 0000000..27d6788--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-detail-navigator/references/action_protocol.md@@ -0,0 +1,19 @@+# WebShop Action Protocol Reference++## Overview+This document details the strict action-response protocol used in the WebShop environment that this skill operates within.++## Action Format+All actions must be output in one of two formats:++1. **Search Action:** `search[<keywords>]`+ * `<keywords>`: A string of search terms. These should be carefully chosen to match the user's request.+ * **Usage:** Primarily used before this skill is triggered. This skill focuses on post-search navigation.++2. **Click Action:** `click[<value>]`+ * `<value>`: **Must exactly match** one of the strings present in the "clickables" list from the most recent observation.+ * **Case Sensitivity:** The match must be exact, including capitalization and spacing.+ * **Validation:** If the value is not in the list, the action is invalid and nothing happens.++## Response Format+The agent's response must follow this exact two-line structure:diff --git a/experiments/src/skills/webshop/webshop-product-evaluator/SKILL.md b/experiments/src/skills/webshop/webshop-product-evaluator/SKILL.mdnew file mode 100644index 0000000..5c48db6--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-evaluator/SKILL.md@@ -0,0 +1,24 @@+---+name: webshop-product-evaluator+description: This skill evaluates product listings against user requirements, such as price limits and feature matches, to identify viable options. It should be triggered when presented with a search results page containing multiple products. The skill analyzes product titles, prices, and brief descriptions to select the most promising candidate for detailed inspection.+---+# Instructions++## When to Use+Activate this skill when you are on a **search results page** in a web shopping environment and need to evaluate multiple products against specific user requirements (e.g., price limits, feature keywords).++## Core Process+1. **Parse the Observation:** Identify the user's instruction, the list of available products, and their associated details (Title, Price, ASIN/Product ID).+2. **Extract Requirements:** From the user instruction, identify:+ * **Price Limit:** The maximum acceptable price (e.g., "lower than 40.00 dollars").+ * **Feature Keywords:** Key product attributes (e.g., "teeth whitening", "freshens breath").+3. **Evaluate Products:** For each product listing on the current page:+ * Check if the price is below the user's limit.+ * Check if the product title contains the required feature keywords.+ * Prioritize products that meet all criteria. If multiple products qualify, choose the one that appears most relevant or cost-effective.+4. **Take Action:**+ * If a suitable product is found, click on its product ID (e.g., `click[B09NYFDNVX]`) to view its details.+ * If no suitable product is found on the current page, consider using the `search` action with refined keywords or clicking `Next >` to browse more results.++## Thought Process Format+Always structure your internal reasoning and final action using this format:diff --git a/experiments/src/skills/webshop/webshop-product-evaluator/references/evaluation_logic.md b/experiments/src/skills/webshop/webshop-product-evaluator/references/evaluation_logic.mdnew file mode 100644index 0000000..a2ba8fd--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-evaluator/references/evaluation_logic.md@@ -0,0 +1,28 @@+# Evaluation Logic Reference++## Parsing Rules for WebShop Observations+The WebShop environment presents data in a specific text format. Key parsing assumptions:+1. The observation is split by the `[SEP]` delimiter.+2. The user's instruction follows the token `Instruction:`.+3. Product listings typically follow this pattern on a search page:+ `[ASIN] [Title] [Price]`+ * **ASIN:** A 10-character alphanumeric identifier, usually starting with 'B' (e.g., `B09NYFDNVX`).+ * **Title:** The full product name.+ * **Price:** A string starting with `$` followed by a number (e.g., `$17.99`).++## Requirement Extraction Heuristics+- **Price Limit:** Look for phrases like "lower than X dollars", "under X", "less than X". Extract the numerical value `X`.+- **Feature Keywords:** Identify nouns and adjectives describing the desired product features. Common stop words (I, need, some, that, also, and) are filtered out.+ * *Example:* From "teeth whitening that also freshens breath", keywords become: `['teeth', 'whitening', 'freshens', 'breath']`.++## Product Scoring & Selection+A product is considered **suitable** if it passes two filters:+1. **Price Filter:** Product price <= User's price limit.+2. **Keyword Filter:** The product title contains all extracted feature keywords (case-insensitive).++If multiple products are suitable, they are **sorted by price (ascending)** to prioritize budget-friendly options. The top result is selected for the next action (`click[ASIN]`).++## Fallback Behavior+If the script finds **no suitable products** on the current page, the skill should guide the agent to:+1. Consider refining the search query using the `search[new keywords]` action.+2. Or, if available, navigate to the next page of results (`click[Next >]`).diff --git a/experiments/src/skills/webshop/webshop-product-search/SKILL.md b/experiments/src/skills/webshop/webshop-product-search/SKILL.mdnew file mode 100644index 0000000..311e80e--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-search/SKILL.md@@ -0,0 +1,31 @@+---+name: webshop-product-search+description: This skill performs an initial product search using a web interface by generating appropriate search keywords based on interpreted query criteria. It is triggered when starting a product discovery task or when returning to search results. The skill inputs structured search parameters and outputs a list of candidate products from the search results page.+---+# Skill: WebShop Product Search++## Primary Function+Generate a targeted search query and execute it on a web shopping interface to retrieve a list of candidate products that match the user's criteria.++## Core Workflow+1. **Interpret Criteria:** Analyze the user's instruction to identify key product attributes (e.g., "long clip-in hair extension", "natural looking", "price lower than 40.00 dollars").+2. **Formulate Query:** Construct a concise, effective search string that prioritizes the most critical attributes. The primary goal is to balance specificity with recall.+3. **Execute Search:** Use the `search[keywords]` action to submit the query.+4. **Parse Results:** The skill's success is marked by the system returning a "Page 1" observation containing a list of products (ASINs, titles, prices).++## Key Decision Logic+* **Query Formulation:** Start with a broad query containing the core product type. If the initial results are poor, the skill may be re-invoked with a more refined query (e.g., adding "synthetic" or "human hair" based on observed results).+* **Trigger Condition:** This skill is the entry point for a new product discovery task. It is also the correct action when the observation contains "[SEP] Search" or "[SEP] Back to Search", indicating the agent is on a search page.+* **Output Handoff:** The output of this skill is the search results page. Subsequent skills (e.g., `product-evaluation`) should be used to analyze individual items from this list.++## Error Handling / Edge Cases+* If no search action is available in the current state, this skill is not applicable.+* If the observation does not contain a clear search interface prompt, do not use this skill.+* The search keywords must be a single string enclosed in brackets after `search[`. Do not include multiple actions or extra formatting.++## Example from Trajectory+**Instruction:** "i need a long clip-in hair extension which is natural looking, and price lower than 40.00 dollars"+**Skill Execution:**+1. Criteria identified: `product_type="clip-in hair extension"`, `attribute="long"`, `attribute="natural looking"`, `budget="<40.00"`.+2. Query formulated: Prioritizes core product type and key attribute -> `"long clip-in hair extension"`.+3. Action: `search[long clip-in hair extension]`diff --git a/experiments/src/skills/webshop/webshop-product-selector/SKILL.md b/experiments/src/skills/webshop/webshop-product-selector/SKILL.mdnew file mode 100644index 0000000..d9e44d7--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-selector/SKILL.md@@ -0,0 +1,17 @@+---+name: webshop-product-selector+description: Selects the most promising product candidate from a filtered shortlist for detailed inspection. Use this skill when multiple items seem viable; it makes a final selection based on a heuristic (e.g., best feature match, lowest price) and triggers the action to navigate to that product's detail page (click[product_id]).+---+# Instructions+Use this skill when you are on a search results page with multiple product options that appear to meet the user's core requirements.++## Decision Process+1. **Assess the List:** Review the provided observation, which contains a list of products. Each product entry typically includes a Product ID (e.g., `B093C1THVP`), a title, and a price.+2. **Apply Selection Heuristic:** Use the bundled `selector.py` script to programmatically identify the best candidate. The script implements the following logic:+ * Filters products strictly under the user's specified maximum price.+ * Scores remaining products based on keyword matching in the title against the user's core requirements (e.g., "portable", "easy to carry", "double horn").+ * Selects the product with the highest score. In case of a tie, it chooses the lowest-priced item.+3. **Execute Action:** The final action is always to click on the selected product's ID to navigate to its detail page for final verification and purchase. The action format is `click[product_id]`.++## Thought Process Template+Structure your reasoning before acting using this template:diff --git a/experiments/src/skills/webshop/webshop-product-selector/references/action_format.md b/experiments/src/skills/webshop/webshop-product-selector/references/action_format.mdnew file mode 100644index 0000000..23389a4--- /dev/null+++ b/experiments/src/skills/webshop/webshop-product-selector/references/action_format.md@@ -0,0 +1,28 @@+# WebShop Action Format Reference++## Valid Action Types+The WebShop environment accepts two primary action formats:++1. `search[keywords]`+ * Initiates a product search.+ * `keywords`: A string of search terms (e.g., `"double horn bluetooth speaker"`).++2. `click[value]`+ * Clicks on an interactive element on the page.+ * `value`: Must be an **exact match** of a value present in the current observation's list of available actions.+ * Common `value` types:+ * **Product IDs**: Typically a 10-character alphanumeric string (e.g., `b093c1thvp`). Appear in search results.+ * **UI Elements**: Phrases like `"buy now"`, `"description"`, `"back to search"`, `"next >"`.++## Critical Rule for `click[value]`+The `value` for a click action **must be copied verbatim** from the observation text. For product IDs, the observation often shows them in uppercase (e.g., `B093C1THVP`), but the clickable action typically expects the lowercase version (e.g., `b093c1thvp`). Always check the format in the trajectory or environment feedback.++## Observation Structure+Observations are text blocks with `[SEP]` delimiters. Key sections include:+* **Instruction**: The user's original request.+* **Page Info**: e.g., `Page 1 (Total results: 50)`.+* **Product Listings**: Pattern is usually `[SEP] ProductID [SEP] Title [SEP] Price [SEP]`.+* **Clickable Actions**: A list of available `click[value]` targets at the end of the observation.++## Skill-Specific Guidance+The `webshop-product-selector` skill outputs a `click[product_id]` action. Ensure the selected `product_id` is present in the current observation before executing.diff --git a/experiments/src/skills/webshop/webshop-purchase-executor/SKILL.md b/experiments/src/skills/webshop/webshop-purchase-executor/SKILL.mdnew file mode 100644index 0000000..dedd91c--- /dev/null+++ b/experiments/src/skills/webshop/webshop-purchase-executor/SKILL.md@@ -0,0 +1,30 @@+---+name: webshop-purchase-executor+description: This skill executes the purchase action for a confirmed suitable product on an e-commerce page. It is triggered after product verification when the user decision is to buy. The skill clicks the purchase button (e.g., 'Buy Now') to complete the transaction.+---+# Skill: webshop-purchase-executor++## Purpose+Execute the final purchase transaction for a verified product on an e-commerce platform. This skill is the terminal action in a shopping workflow, initiated only after a product has been confirmed to meet the user's criteria (e.g., price, description).++## When to Use+- **Trigger:** You are on a product detail page.+- **Prerequisite:** The product has been verified against the user's requirements (e.g., price < $40.00, "natural looking").+- **User Intent:** The user has made a decision to buy the product.+- **Available Action:** A purchase button (e.g., "Buy Now") is present in the list of clickable elements.++## Core Action+Perform a `click` action on the purchase button.++## Execution Logic+1. **Locate Purchase Button:** Identify the purchase button from the available actions. Common identifiers include:+ - `buy now`+ - `add to cart` (if the instruction implies immediate purchase)+ - `purchase`+2. **Validate Context:** Ensure you are on a product page and the prior verification step is logically complete.+3. **Execute Click:** Perform the `click[purchase_button_value]` action using the exact value from the available actions list.++## Important Notes+- Do not use this skill for browsing, searching, or product comparison.+- The skill assumes price and specification validation occurred in a previous step.+- If multiple purchase options exist (e.g., "Buy Now", "Add to Cart & Checkout"), prefer the most direct path to complete the transaction, typically "Buy Now".diff --git a/experiments/src/skills/webshop/webshop-purchase-executor/references/purchase_ui_patterns.md b/experiments/src/skills/webshop/webshop-purchase-executor/references/purchase_ui_patterns.mdnew file mode 100644index 0000000..6344e40--- /dev/null+++ b/experiments/src/skills/webshop/webshop-purchase-executor/references/purchase_ui_patterns.md@@ -0,0 +1,30 @@+# Reference: Common E-commerce Purchase UI Patterns++This document catalogs common button text and UI patterns for purchase actions across e-commerce platforms. Use this to improve the robustness of the purchase button detection logic.++## Primary Purchase Buttons+- **Buy Now**: The most direct purchase action. Often leads to a single-page checkout.+- **Add to Cart**: Places item in shopping cart. May require a subsequent "Checkout" action.+- **Purchase**: A generic term, common on some marketplaces.+- **Checkout**: Typically appears on cart pages or as a combined "Add to Cart & Checkout" button.++## Secondary/Contextual Actions+- **Subscribe and Save**: For recurring purchases.+- **Rent Now**: For rental services.+- **Pre-order**: For items not yet released.+- **Bid/Buy It Now**: On auction sites.++## Stylistic Variations & Casing+Buttons may appear in different casings:+- `Buy Now`+- `BUY NOW`+- `buy now`+- `Add To Cart`++## Localization Examples+- **French**: `Acheter maintenant`, `Ajouter au panier`+- **Spanish**: `Comprar ahora`, `AΓ±adir al carrito`+- **German**: `Jetzt kaufen`, `In den Warenkorb`++## Implementation Note for the Skill+The `execute_purchase.py` script prioritizes "Buy Now" patterns. If the target platform uses different terminology, the skill's text instructions should guide the agent to identify the correct button based on the specific UI context provided in the observation.diff --git a/experiments/src/skills/webshop/webshop-purchase-initiator/SKILL.md b/experiments/src/skills/webshop/webshop-purchase-initiator/SKILL.mdnew file mode 100644index 0000000..493c461--- /dev/null+++ b/experiments/src/skills/webshop/webshop-purchase-initiator/SKILL.md@@ -0,0 +1,30 @@+---+name: webshop-purchase-initiator+description: This skill initiates the purchase process by clicking the buy button once a product and its options have been selected and verified against requirements. It should be triggered when all selection criteria are satisfied and the user is ready to proceed to checkout. The skill confirms the final price meets any budget constraints before executing the purchase action.+---+# Instructions++## When to Use+Activate this skill when:+1. A product has been selected from search results.+2. All required product options (e.g., size, color, quantity) have been chosen.+3. The final displayed price has been verified to be within the user's specified budget.+4. The user's instruction implicitly or explicitly indicates readiness to purchase (e.g., "I need to buy...", "I want this one").++## Core Action+Execute the `click[buy now]` action to proceed to checkout.++## Verification Logic (Before Clicking)+Before clicking "Buy Now", you **must** perform these checks:+1. **Budget Check**: Confirm the final displayed `Price:` is less than the maximum budget specified in the user's original instruction. If no budget is specified, skip this check.+2. **Option Selection Check**: Ensure the required product options (like 'size', 'color') show a selected state or that your previous action has selected the correct option. The observation should reflect the chosen option.+3. **Product Match Check**: Verify the product title and description align with the user's core requirements (e.g., "teeth whitening that also freshens breath").++If any check fails, do not use this skill. Instead, revert to selecting the correct option or searching for a different product.++## Trajectory Example+Refer to `references/trajectory_example.md` for a detailed walkthrough of a successful skill execution.++## Error Handling+- If the "Buy Now" button is not present in the list of clickable actions, the action will be invalid. Do not force the action.+- If the price changes after selecting options and exceeds the budget, abort the purchase and inform the user.diff --git a/experiments/src/skills/webshop/webshop-purchase-initiator/references/trajectory_example.md b/experiments/src/skills/webshop/webshop-purchase-initiator/references/trajectory_example.mdnew file mode 100644index 0000000..13a6f4d--- /dev/null+++ b/experiments/src/skills/webshop/webshop-purchase-initiator/references/trajectory_example.md@@ -0,0 +1,15 @@+# Example Execution Trajectory++**User Instruction:** "i need some teeth whitening that also freshens breath, and price lower than 40.00 dollars"++**Process:**+1. **Search:** `search[teeth whitening that also freshens breath]`+2. **Product Selection:** From the results, `click[B09NYFDNVX]` on a product titled "JUIK Teeth Cleansing Whitening Powder... Keep Freshen Breath".+3. **Option Selection:** On the product page, choose the desired option (e.g., `click[1pcs]` for size).+4. **Verification & Purchase (This Skill):**+ * **Check 1 (Budget):** The displayed `Price: $17.99` is confirmed to be < $40.00. β+ * **Check 2 (Option):** The '1pcs' size was just selected. β+ * **Check 3 (Product Match):** The product title includes "Whitening" and "Freshen Breath". β+ * **Action:** `click[buy now]` is executed to initiate checkout.++**Key Takeaway:** The skill triggers only after the product is fully configured and all constraints are satisfied.diff --git a/experiments/src/skills/webshop/webshop-query-interpreter/SKILL.md b/experiments/src/skills/webshop/webshop-query-interpreter/SKILL.mdnew file mode 100644index 0000000..a29ca8b--- /dev/null+++ b/experiments/src/skills/webshop/webshop-query-interpreter/SKILL.md@@ -0,0 +1,18 @@+---+name: webshop-query-interpreter+description: This skill interprets a user's shopping query to extract key product requirements such as item type, attributes, and constraints. It should be triggered when a new shopping instruction is received, parsing natural language into structured criteria (e.g., product category, desired features, price limits). The output is a clear set of search parameters for use in subsequent product lookup steps.+---+# Instructions++## Trigger+Activate this skill when a new shopping instruction is received from the user. The instruction will be a natural language request for a product.++## Core Process++1. **Parse the Instruction:** Analyze the user's query to identify the following key components:+ * **Primary Product Type:** The main item being requested (e.g., "hair extension").+ * **Key Attributes/Features:** Descriptive requirements (e.g., "long", "clip-in", "natural looking").+ * **Constraints:** Hard limits, especially price (e.g., "price lower than 40.00 dollars").++2. **Structure the Output:** Format the extracted information into a clear, structured set of search parameters. Use the following template:+\ No newline at end of filediff --git a/experiments/src/skills/webshop/webshop-query-interpreter/references/execution_example.md b/experiments/src/skills/webshop/webshop-query-interpreter/references/execution_example.mdnew file mode 100644index 0000000..aad61e8--- /dev/null+++ b/experiments/src/skills/webshop/webshop-query-interpreter/references/execution_example.md@@ -0,0 +1,7 @@+# Execution Example from Trajectory++This document shows the original execution trajectory that informed the skill design, demonstrating the end-to-end process from user instruction to structured output.++## Original Interaction++**User Instruction:**diff --git a/experiments/src/skills/webshop/webshop-query-interpreter/references/query_patterns.md b/experiments/src/skills/webshop/webshop-query-interpreter/references/query_patterns.mdnew file mode 100644index 0000000..de6d2b2--- /dev/null+++ b/experiments/src/skills/webshop/webshop-query-interpreter/references/query_patterns.md@@ -0,0 +1,49 @@+# Common Query Patterns for Product Search++This reference document catalogs common linguistic patterns found in shopping queries to aid in the development and refinement of the query parser.++## 1. Product Type Indicators+- **Direct Request:** "I need/want/looking for a [product]"+- **Imperative:** "Find/show me [product]"+- **Question:** "Where can I get [product]?" or "Do you have [product]?"++## 2. Attribute & Feature Patterns+- **Adjective-Noun:** "long hair", "natural looking extensions"+- **Compound Adjectives:** "clip-in", "heat-resistant", "easy-to-use"+- **Prepositional Phrases:** "with clips", "made of synthetic hair"+- **Relative Clauses:** "which is natural looking", "that costs under $40"++## 3. Constraint Patterns (Price Focus)+- **Explicit Price Limit:**+ - "price lower/less than [amount]"+ - "under/below [amount]"+ - "[amount] or less"+ - "maximum/minimum [amount]"+ - "around/about [amount]"+ - "budget of [amount]"++- **Currency Formats:**+ - "$40.00"+ - "40 dollars"+ - "40 USD"+ - "forty dollars"++## 4. Common Product Descriptors+- **Size/Length:** long, short, medium, 16-inch, 22"+- **Material:** synthetic, human hair, remy, cotton, leather+- **Color:** black, brown, blonde, red, blue, gradient+- **Style:** straight, curly, wavy, natural, professional+- **Quality:** premium, high-quality, durable, authentic++## 5. Ambiguity & Edge Cases+- **Multiple Products:** "hair extensions and clips" (parse as primary product: hair extensions)+- **Negation:** "not synthetic" (extract as feature: human hair)+- **Comparatives:** "cheaper than $50" (constraint: < 50)+- **Ranges:** "between $30 and $50" (constraint: 50, note as range in features)++## 6. Example Queries for Testing+1. "find me a wireless mouse under $25"+2. "I want organic cotton t-shirts that are machine washable"+3. "looking for a waterproof watch with GPS under $200"+4. "need a laptop backpack with usb charging port, maximum $60"+5. "show me running shoes for women, size 8, around $80"diff --git a/experiments/src/skills/webshop/webshop-query-parser/SKILL.md b/experiments/src/skills/webshop/webshop-query-parser/SKILL.mdnew file mode 100644index 0000000..003331e--- /dev/null+++ b/experiments/src/skills/webshop/webshop-query-parser/SKILL.md@@ -0,0 +1,32 @@+---+name: webshop-query-parser+description: This skill extracts key constraints and product requirements from a user's shopping query. It should be triggered when the agent receives a new shopping instruction, to identify product attributes (e.g., 'gluten free'), price limits (e.g., 'lower than 140.00 dollars'), and other specifications. The skill outputs a structured set of search criteria to guide subsequent product discovery.+---+# Instructions++## When to Use+Activate this skill immediately when a new shopping instruction is received from the user, before any search or click actions are performed.++## Core Task+Parse the user's natural language instruction to extract structured search criteria. Your goal is to identify:+1. **Product Type/Name:** The primary item the user wants (e.g., "popcorn").+2. **Key Attributes:** Descriptive features like "gluten free", "organic", "vegan", etc.+3. **Price Constraints:** Any upper or lower price limits (e.g., "lower than 140.00 dollars").+4. **Other Specifications:** Brand, size, quantity, or other qualifying terms.++## Procedure+1. **Run the Parser:** Execute the bundled script `parse_query.py` on the user's instruction.+2. **Review & Refine:** Examine the script's output. If the instruction is complex or ambiguous, use your judgment to refine the criteria. For example, ensure price limits are correctly interpreted as numeric ranges.+3. **Formulate Search Strategy:** Use the extracted criteria to plan the initial web search. Combine the **Product Type** with the most critical **Key Attributes** to form effective initial search keywords.+ * **Example:** For "i need gluten free popcorn, and price lower than 140.00 dollars", the script will output `{'product': 'popcorn', 'attributes': ['gluten free'], 'price_max': 140.0}`. Your initial search should be `search[gluten free popcorn]`.++## Output+After parsing, hold the structured criteria in memory. Use it to:+* Guide the formulation of `search[keywords]` actions.+* Evaluate product listings and details during `click` actions to check for constraint compliance (especially price).+* Inform your reasoning in the `Thought:` part of your response.++## Notes+* Keep the initial search query concise but precise. Prioritize must-have attributes from the user's instruction.+* The price filter is often not available as a direct web action; you must manually check prices in the search results and product details.+* If the initial search yields no results, consider broadening the search by removing less critical attributes one at a time, but always respect hard constraints like "gluten free" if specified.diff --git a/experiments/src/skills/webshop/webshop-query-parser/references/query_components.md b/experiments/src/skills/webshop/webshop-query-parser/references/query_components.mdnew file mode 100644index 0000000..4bfa3ff--- /dev/null+++ b/experiments/src/skills/webshop/webshop-query-parser/references/query_components.md@@ -0,0 +1,43 @@+# Query Component Reference++This document lists common patterns and components found in WebShop user instructions to aid in parsing and criteria formulation.++## 1. Product Type Indicators+Look for these phrases followed by the product name:+* "I need..."+* "I want..."+* "I'm looking for..."+* "Find me..."+* "Show me..."+* "Buy..."++## 2. Common Attributes & Keywords+| Category | Examples |+| :--- | :--- |+| **Dietary** | gluten free, vegan, vegetarian, organic, non-gmo, kosher, halal, nut free, dairy free, sugar free, low carb, keto, paleo |+| **Health** | low calorie, high fiber, low sodium, heart healthy, probiotic, antioxidant |+| **Quality** | gourmet, premium, luxury, best selling, top rated, award winning |+| **Form/Packaging** | individual bags, bulk, pack of [number], family size, travel size, reusable container |+| **Flavor/Type** | original, chocolate, caramel, cheese, butter, spicy, sweet, salted |++## 3. Price Constraint Patterns+| Pattern | Example | Interpretation |+| :--- | :--- | :--- |+| **Upper Limit** | "lower than $X", "less than X dollars", "under X", "below X", "maximum X" | `price_max = X` |+| **Lower Limit** | "above $X", "more than X", "over X", "minimum X" | `price_min = X` |+| **Range** | "between X and Y dollars", "X - Y", "from X to Y" | `price_min = X`, `price_max = Y` |+| **Exact** | "around X", "about X" | Consider `price_max = X * 1.1`, `price_min = X * 0.9` |++## 4. Other Specifications+* **Brand:** "SkinnyPop", "Kellogg's", "Nike"+* **Size/Quantity:** "12 pack", "5 ounce", "1 gallon"+* **Color:** "red", "blue", "black"+* **Material:** "stainless steel", "cotton", "plastic"++## 5. Search Strategy Tips+* **Primary Search:** Combine the core `product` with the most critical `attribute` (e.g., `search[gluten free popcorn]`).+* **Secondary Filters:** If results are poor, relax less critical attributes one by one.+* **Price Checking:** The website often lacks a price filter action. You must:+ 1. Scan the price listed next to each search result item.+ 2. Click into promising items and check the `Price:` field on the product page.+ 3. Manually reject items that violate the `price_max` or `price_min` constraints.diff --git a/experiments/src/skills/webshop/webshop-result-analyzer/SKILL.md b/experiments/src/skills/webshop/webshop-result-analyzer/SKILL.mdnew file mode 100644index 0000000..1a2c5a9--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-analyzer/SKILL.md@@ -0,0 +1,28 @@+---+name: webshop-result-analyzer+description: This skill evaluates a list of search results against the target product criteria. Trigger it when a search result page is observed, to identify promising product listings. It analyzes each result's title, price, and brief description to shortlist items that best match the required attributes (like size, color, and price), outputting a prioritized list of candidate product IDs or links for further inspection.+---+# Instructions++Trigger this skill when you observe a search result page (e.g., containing "Page 1 (Total results: 50)" and multiple product listings).++## 1. Extract User Requirements+First, parse the user's instruction from the observation. Identify the following key attributes:+- **Product Type:** (e.g., "woman's us size 5 high heel shoe")+- **Specific Attributes:** (e.g., "rubber sole", "color patent-beige")+- **Price Constraint:** (e.g., "price lower than 90.00 dollars")++## 2. Analyze Search Results+For each product listing in the observation (typically formatted as `[ASIN/Product ID] [SEP] [Title] [SEP] [Price Range]`):+1. Extract the **Product ID** (e.g., B09GXNYJCD).+2. Extract the **Product Title**.+3. Extract the **Price**. Convert any range (e.g., "$49.99 to $54.99") to its maximum value for comparison against the budget.+4. Perform a **textual match** between the title/description and the required attributes (size, color, material like "rubber", product type).++## 3. Score and Prioritize+Use the bundled Python script `analyze_results.py` to perform a consistent, deterministic analysis.+1. **Run the script** with the extracted user requirements and the list of product data.+2. The script will output a **prioritized list** of candidate Product IDs, sorted by a match score.++## 4. Output and Next Action+Present the analysis in this format:diff --git a/experiments/src/skills/webshop/webshop-result-analyzer/references/attribute_patterns.md b/experiments/src/skills/webshop/webshop-result-analyzer/references/attribute_patterns.mdnew file mode 100644index 0000000..6fabc99--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-analyzer/references/attribute_patterns.md@@ -0,0 +1,21 @@+# Common Attribute Patterns for WebShop Analysis++Use these regular expression patterns to identify key attributes in product titles and descriptions.++## Size Patterns+- **US Size 5:** `r"\bsize\s*5\b|\b5\s*us\b|\b5\.0\b"`+- **Size Range (e.g., 5-13):** `r"\b5\s*[-β]\s*13\b"` (will match "5-13", "5 β 13")++## Color & Material Patterns+- **Patent Beige:** `r"patent-beige|beige.*patent|patent.*beige|beige-almond toe-patent leather"`+- **Rubber Sole:** `r"rubber\s*sole|sole\s*rubber"`++## Price Extraction+- **Single Price:** `\$\d+\.?\d*` (e.g., $54.99)+- **Price Range:** `\$\d+\.?\d*\s*to\s*\$\d+\.?\d*` (e.g., $49.99 to $54.99)++## General Keyword Matching+When the user provides specific terms (e.g., "high heel", "wedges"), perform a simple case-insensitive substring check. No regex is needed for simple keywords.++## Usage Note+These patterns are examples. You may need to adjust them based on the observed text formatting in the WebShop environment. The bundled script uses these as configurable inputs.diff --git a/experiments/src/skills/webshop/webshop-result-analyzer/references/execution_example.md b/experiments/src/skills/webshop/webshop-result-analyzer/references/execution_example.mdnew file mode 100644index 0000000..dbd0142--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-analyzer/references/execution_example.md@@ -0,0 +1,4 @@+# Skill Execution Example++## Scenario+**Observation Excerpt:**diff --git a/experiments/src/skills/webshop/webshop-result-filter/SKILL.md b/experiments/src/skills/webshop/webshop-result-filter/SKILL.mdnew file mode 100644index 0000000..43e4b37--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-filter/SKILL.md@@ -0,0 +1,44 @@+---+name: webshop-result-filter+description: This skill filters search results by evaluating product listings against specific user constraints like price, features, or ratings. It should be triggered when reviewing a page of search results to identify items that match all given criteria. The skill takes a list of products with their details and outputs a subset that meets the defined requirements for closer inspection.+---+# Skill: webshop-result-filter++## When to Use+Activate this skill when you are on a search results page in a web shopping environment and need to systematically evaluate which products meet a user's specific, multi-faceted requirements (e.g., "price lower than 40.00 dollars" AND "natural looking").++## Core Instruction+1. **Parse the Instruction:** Extract the user's constraints from the instruction. Common constraints include:+ * **Price:** A maximum or target price (e.g., `price lower than 40.00 dollars`).+ * **Features:** Specific attributes or keywords (e.g., `natural looking`, `long`, `clip-in`).+ * **Ratings:** A minimum rating threshold (if available in the observation).++2. **Parse the Observation:** Extract the list of products from the search results page. Each product listing typically contains:+ * A Product ID/ASIN (e.g., `B09C337K8S`).+ * A Title/Description.+ * A Price.+ * A Rating (if available).++3. **Apply Filters:** For each product in the list, check it against **all** extracted user constraints.+ * **Price Filter:** Compare the product's price to the user's maximum price. Convert prices to numerical values for comparison.+ * **Keyword/Feature Filter:** Check if the product's title/description contains keywords related to the required features (e.g., "natural").+ * **Rating Filter:** If a rating constraint exists and the product has a rating, ensure it meets the minimum.++4. **Output Decision:** Identify the **first product** in the filtered list that passes all criteria. This becomes the primary candidate for the next action (`click[product_id]`). If no product passes all filters, you may need to refine the search.++## Example from Trajectory+* **User Instruction:** `i need a long clip-in hair extension which is natural looking, and price lower than 40.00 dollars`+* **Extracted Constraints:**+ * `price < 40.00`+ * Keywords: `natural` (implied from "natural looking")+* **Observation (First Page):** Contains ~10 products with IDs, titles, and prices.+* **Filtering Process:**+ 1. `B09C337K8S`: Price $29.99 (< $40.00). Title contains "Natural Looking". **PASSES**.+ 2. `B093BKWHFK`: Price $63.99 (> $40.00). **FAILS** on price.+ 3. `B099K9Z9L2`: Price $43.99 (> $40.00). **FAILS** on price.+* **Result:** `B09C337K8S` is selected as the top matching candidate.++## Next Action+After identifying a matching product, the recommended action is to click on it for more details: `click[<matching_product_id>]`.++For complex filtering logic or to process large result sets, use the bundled script.diff --git a/experiments/src/skills/webshop/webshop-result-filter/references/constraint_extraction_guide.md b/experiments/src/skills/webshop/webshop-result-filter/references/constraint_extraction_guide.mdnew file mode 100644index 0000000..b499fa3--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-filter/references/constraint_extraction_guide.md@@ -0,0 +1,36 @@+# Guide: Extracting Constraints from User Instructions++This guide helps parse natural language shopping instructions into structured filters for the `webshop-result-filter` skill.++## Common Constraint Patterns++### 1. Price Constraints+* **Maximum Price:** `lower than X dollars`, `under X`, `less than X`, `below X`, `cheaper than X`+ * Extract: `max_price = X`+* **Price Range:** `between X and Y dollars`+ * Extract: `min_price = X`, `max_price = Y`+* **Exact Price:** `around X dollars`, `about X`+ * Extract: `target_price = X` (consider a small tolerance, e.g., Β±10%)++### 2. Feature/Attribute Constraints+* **Direct Keywords:** `natural looking`, `long`, `clip-in`, `synthetic`, `human hair`+ * Extract: Add keyword to `required_keywords` list.+* **Implied Keywords:** `looks real` β implies `natural`.+* **Negations:** `not synthetic` β requires checking for the *absence* of a keyword.++### 3. Quality/Rating Constraints+* **Minimum Rating:** `highly rated`, `well reviewed`, `rated 4 stars or above`+ * Extract: `min_rating = 4.0` (map phrases to numerical values).++## Parsing Examples++| User Instruction | Extracted Constraints |+| :--- | :--- |+| "i need a long clip-in hair extension which is natural looking, and price lower than 40.00 dollars" | `max_price: 40.00`<br>`required_keywords: ["natural", "long", "clip-in"]` |+| "find a red dress under $50 with good reviews" | `max_price: 50.00`<br>`required_keywords: ["red", "dress"]`<br>`min_rating: 4.0` (assuming "good" = 4+) |+| "wireless headphones between $100 and $200" | `min_price: 100.00`<br>`max_price: 200.00`<br>`required_keywords: ["wireless", "headphones"]` |++## Implementation Notes+* Use case-insensitive matching for keywords.+* Some constraints may be soft (preferences) vs. hard (requirements). This skill focuses on hard requirements.+* When in doubt, be conservative. If a constraint is ambiguous, it's better to filter it out than to include a non-matching product.diff --git a/experiments/src/skills/webshop/webshop-result-page-navigator/SKILL.md b/experiments/src/skills/webshop/webshop-result-page-navigator/SKILL.mdnew file mode 100644index 0000000..91b99b7--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-page-navigator/SKILL.md@@ -0,0 +1,21 @@+---+name: webshop-result-page-navigator+description: Navigates through paginated search results by moving to the next or previous page. Use this skill when the current page of product listings does not contain a suitable match and you need to review more options. It identifies and clicks the appropriate pagination controls (e.g., 'next >' or '< prev') to load additional result pages for evaluation.+---+# Skill: WebShop Result Page Navigator++## Purpose+This skill enables systematic navigation through paginated product search results in a WebShop environment. It is triggered when the current page of results does not contain an item matching the user's criteria, allowing the agent to access more options.++## Core Logic+1. **Trigger Condition:** The agent has reviewed the current page of product listings and determined that no item satisfies the user's requirements (e.g., price, features).+2. **Action Selection:** The skill identifies the correct pagination control to click:+ * `click[next >]` to load the subsequent page of results.+ * `click[< prev]` to return to the previous page of results.+3. **Post-Action:** After navigation, the agent should resume its primary task of evaluating the newly loaded product listings against the user's instruction.++## Usage in Trajectory+The skill was demonstrated when the agent, searching for a pendant light under $120 with a dimmer switch, found no suitable options on Page 1. It correctly executed `click[next >]` to access Page 2, and repeated the action to access Page 3, where a potential match was found.++## Key Principle+This skill handles the deterministic, repetitive task of page navigation, freeing the agent's reasoning capacity for the higher-freedom task of evaluating product features and making purchase decisions.diff --git a/experiments/src/skills/webshop/webshop-result-page-navigator/references/pagination_controls.md b/experiments/src/skills/webshop/webshop-result-page-navigator/references/pagination_controls.mdnew file mode 100644index 0000000..21fe230--- /dev/null+++ b/experiments/src/skills/webshop/webshop-result-page-navigator/references/pagination_controls.md@@ -0,0 +1,22 @@+# Reference: WebShop Pagination Controls++## Context+This document details the structure and identifiers for pagination elements within the WebShop environment, as observed in the provided trajectory.++## Observed Pagination Format+Pagination controls appear within the observation text, following the page information header. The format is consistent:+`[SEP] < Prev [SEP] Next > [SEP]`++## Control Identification+* **"Next >"**: The control to advance to the next page of results. The exact clickable value is `next >`.+* **"< Prev"**: The control to return to the previous page of results. The exact clickable value is `< prev`.++## Action Syntax+The correct action format to use with these controls is:+* `click[next >]`+* `click[< prev]`++## Important Notes+1. These controls are only present when there is a previous or next page to navigate to (e.g., not on Page 1 of 1).+2. The skill should only be invoked after a conscious evaluation of the current page's contents.+3. The primary agent logic is responsible for parsing the `Observation` to confirm the presence of these controls before the skill executes.diff --git a/experiments/src/skills/webshop/webshop-search-constructor/SKILL.md b/experiments/src/skills/webshop/webshop-search-constructor/SKILL.mdnew file mode 100644index 0000000..544521b--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-constructor/SKILL.md@@ -0,0 +1,23 @@+---+name: webshop-search-constructor+description: This skill formulates an effective search query from structured product criteria. It is used when initiating a product search on an e-commerce platform, converting attributes into a concise, relevant keyword string. The input is a set of parsed criteria (e.g., 'jewelry box', '10 slots', 'easy to clean', 'price < $60'), and the output is a formatted search action string (e.g., 'search[jewelry box, 10 slots, less than $60, easy to clean]') optimized for the platform's search engine.+---+# Instructions+When tasked with finding a product on an e-commerce platform, use this skill to construct the initial search query.++## Core Process+1. **Receive Criteria:** You will be given a set of structured product criteria (e.g., product type, attributes, price limit).+2. **Construct Query:** Use the `construct_search_query.py` script to transform the criteria into a single, optimized search string. The script handles formatting and keyword ordering.+3. **Execute Action:** Format the script's output into the required platform action: `search[<constructed_query>]`.++## Workflow Example+**Input Criteria:** `{'product': 'jewelry box', 'attributes': ['10 slots', 'easy to clean'], 'price_limit': 60.00}`+**Skill Execution:**+1. Run the script: `python scripts/construct_search_query.py --product "jewelry box" --attributes "10 slots" "easy to clean" --price-limit 60.00`+2. The script returns: `jewelry box, 10 slots, less than $60, easy to clean`+3. You output the final action: `search[jewelry box, 10 slots, less than $60, easy to clean]`++## Important Notes+* **Use the Script:** Always delegate query construction to the bundled script. Do not attempt to manually format the search string.+* **Input Format:** Ensure criteria are passed to the script as discrete arguments (product, list of attributes, price limit). Parse the user's instruction into this structure before calling the script.+* **Output Format:** The final action must strictly follow the `search[<query>]` syntax.diff --git a/experiments/src/skills/webshop/webshop-search-constructor/references/query_optimization_guide.md b/experiments/src/skills/webshop/webshop-search-constructor/references/query_optimization_guide.mdnew file mode 100644index 0000000..41d506b--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-constructor/references/query_optimization_guide.md@@ -0,0 +1,21 @@+# Query Optimization Guide for E-commerce Search++## Principles+Effective search queries on platforms like WebShop balance specificity with breadth.++1. **Order Matters:** Place the most critical, distinguishing term first. Typically, this is the product category.+2. **Conciseness:** Avoid stop words (the, a, an, for). Use commas to separate key concepts, which many search engines interpret as "AND" operators.+3. **Natural Language Filters:** For price, use phrases like "less than $X" which are commonly parsed by search engines. Avoid complex symbols like `<`.+4. **Attribute Prioritization:** Include quantifiable attributes (e.g., "10 slots") before qualitative ones (e.g., "easy to clean").++## Example Transformations+* **Criteria:** `product='laptop', attributes=['16GB RAM', 'lightweight'], price_limit=1200`+* **Optimized Query:** `laptop, 16GB RAM, lightweight, less than $1200`++* **Criteria:** `product='coffee maker', attributes=['programmable'], price_limit=80.00`+* **Optimized Query:** `coffee maker, programmable, less than $80.00`++## Platform-Specific Notes+* The `search[query]` action format is specific to the WebShop environment used in the trajectory.+* The comma-separated format (`term1, term2, term3`) is a robust pattern that works across many e-commerce search engines.+* Always verify the available actions in the observation. If `search` is not available, this skill should not be invoked.diff --git a/experiments/src/skills/webshop/webshop-search-executor/SKILL.md b/experiments/src/skills/webshop/webshop-search-executor/SKILL.mdnew file mode 100644index 0000000..bb462d1--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-executor/SKILL.md@@ -0,0 +1,14 @@+---+name: webshop-search-executor+description: Executes a search on an e-commerce platform using parsed keywords. Trigger when you need to find products matching specific criteria from a user query. This skill takes structured search terms and performs a search action, returning a list of product results for evaluation.+---+# Instructions++## Core Function+When triggered, this skill executes a product search on a simulated e-commerce platform (WebShop). Your primary goal is to translate a user's product request into an effective search query, execute it, and return the parsed results for further action.++## 1. Trigger Condition+Activate this skill when the user provides an instruction to find or buy a product with specific attributes (e.g., ingredients, price range, features). The instruction will be provided in the `Observation`.++## 2. Action Protocol+You must respond using **only** the following two action formats. Your final response must be in the exact structure:diff --git a/experiments/src/skills/webshop/webshop-search-executor/references/action_grammar.md b/experiments/src/skills/webshop/webshop-search-executor/references/action_grammar.mdnew file mode 100644index 0000000..f4c2877--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-executor/references/action_grammar.md@@ -0,0 +1,34 @@+# WebShop Action Grammar Reference++## Overview+This document defines the strict grammar for interacting with the WebShop environment. Adherence is required for successful execution.++## Action Types++### 1. Search Action+* **Format:** `search[<keywords>]`+* **Purpose:** To query the product database.+* **Construction Rules:**+ * `<keywords>` is a single string.+ * Combine the core product name with the most salient modifiers from the user instruction.+ * **Example:** Instruction: "soft organic cotton socks for men under $20"+ * **Query:** `search[organic cotton socks for men]`++### 2. Click Action+* **Format:** `click[<value>]`+* **Purpose:** To interact with any clickable element on the page.+* **Value Source:** The `<value>` must be copied **exactly** (including case) from the `Observation` text.+* **Common Clickable Values:**+ * **Product IDs:** Listed next to products in search results (e.g., `B09LKXR62L`). Use the **lowercase** version for the action (e.g., `click[b09lkxr62l]`).+ * **Navigation:** `Back to Search`, `< Prev`, `Next >`.+ * **Page Elements:** `Description`, `Features`, `Reviews`.+ * **Primary Action:** `Buy Now`.++## Observation Parsing Guide+The `Observation` text is structured with `[SEP]` delimiters. Key sections after a search:+1. `Page X (Total results: Y)` - Pagination info.+2. `Product_ID` - The clickable identifier for the product.+3. `Product Title` - The full name/description.+4. `$Price` - The product price.++**To click on a product, always use its `Product_ID` in lowercase.**diff --git a/experiments/src/skills/webshop/webshop-search-formulator/SKILL.md b/experiments/src/skills/webshop/webshop-search-formulator/SKILL.mdnew file mode 100644index 0000000..7b19949--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-formulator/SKILL.md@@ -0,0 +1,28 @@+---+name: webshop-search-formulator+description: This skill generates effective search keywords based on parsed product criteria. It is triggered after query parsing, when the agent needs to perform an initial product search on an e-commerce platform. The skill takes structured attributes (e.g., 'women's size 5 patent-beige high heel') and produces a concise, platform-appropriate search string designed to return relevant results, balancing specificity with recall.+---+# Skill: Webshop Search Formulator++## Purpose+You are an expert at formulating the initial search query for an e-commerce product search. Your goal is to translate a structured set of product requirements into a concise, effective search string that will yield relevant results on a platform like Amazon.++## Core Workflow+1. **Input:** You receive a parsed query containing key product attributes (e.g., category, type, size, color, material, price limit).+2. **Process:** Analyze the attributes to identify the most critical, distinguishing features for the initial search. Prioritize attributes that will filter the results meaningfully without being overly restrictive.+3. **Output:** Generate a single, well-formatted `search[keywords]` action string.++## Key Principles for Search Formulation+* **Balance Specificity & Recall:** Start with a moderately specific query. Including 2-3 core attributes (e.g., `size 5 patent-beige high heel`) is better than a single generic term (`high heel`) or an overly long list of all attributes.+* **Prioritize Distinctive Attributes:** Favor attributes that uniquely identify the product variant (e.g., "patent-beige", "size 5") over very common ones (e.g., "women's") in the initial search.+* **Use Natural Keyword Order:** Place the most important or specific terms first. Mimic how a user might type the query.+* **Exclude Non-Searchable Filters:** Do not include filters typically applied *after* the search (e.g., price ranges like `< $90`) in the initial keyword string. These are for later refinement.+* **Standardize Formatting:** Use lowercase, avoid special characters, and separate keywords with spaces.++## Example from Trajectory+**Parsed Instruction:** `woman's us size 5 high heel shoe with a rubber sole and color patent-beige, and price lower than 90.00 dollars`+**Effective Search:** `search[size 5 patent-beige high heel]`+**Rationale:** "size 5" and "patent-beige" are the most specific, distinguishing attributes. "high heel" defines the product type. "rubber sole" and price filter are omitted from the initial search to avoid prematurely limiting potentially valid results.++## Action Format+Your final output must be a single action in the exact format:diff --git a/experiments/src/skills/webshop/webshop-search-formulator/references/search_strategy_guide.md b/experiments/src/skills/webshop/webshop-search-formulator/references/search_strategy_guide.mdnew file mode 100644index 0000000..ca3ba82--- /dev/null+++ b/experiments/src/skills/webshop/webshop-search-formulator/references/search_strategy_guide.md@@ -0,0 +1,32 @@+# Search Strategy Guide for E-commerce Agents++## Attribute Priority Hierarchy+Use this hierarchy to decide which attributes to include in your initial search string (Higher = More likely to include).++1. **Specific Variant Identifiers:** Exact size, exact color name (e.g., "patent-beige", "midnight blue"), exact model number.+2. **Product Type/Subcategory:** The core item type (e.g., "high heel", "running shoe", "blender").+3. **Key Material/Feature:** A primary material or feature if it's central to the request (e.g., "rubber sole", "stainless steel", "wireless"). Omit if it's a common default or likely to be tagged in metadata rather than title.+4. **Brand or Style:** If the user specifies a brand ("Nike") or style ("wedge").+5. **Demographic/Generic Descriptors:** Terms like "women's", "men's", "kids". Often implied or can be filtered later; include only if crucial for disambiguation.++## Common Pitfalls & Solutions+| Pitfall | Example Bad Search | Better Approach | Reason |+| :--- | :--- | :--- | :--- |+| **Over-Specification** | `search[women's us size 5 high heel shoe rubber sole patent-beige under $90]` | `search[size 5 patent-beige high heel]` | Long queries often match *fewer* items. Price and secondary features are better used as filters after the search. |+| **Under-Specification** | `search[high heel shoes]` | `search[beige high heel size 5]` | Returns too many irrelevant results, making navigation inefficient. |+| **Incorrect Order** | `search[heel high patent beige 5 size]` | `search[size 5 patent-beige high heel]` | Follows natural language query patterns that search engines are optimized for. |+| **Including Non-Keyword Filters** | `search[high heel price<90]` | `search[high heel]` (then filter by price later) | Search bars typically do not parse operators like `<`. Use the platform's built-in price filter after the search. |++## Platform Assumptions (General E-commerce)+* **Search Syntax:** Assumes a simple keyword-matching engine. No advanced operators (e.g., `AND`, `OR`, quotes) are guaranteed to work.+* **Result Ranking:** Results are typically ranked by relevance (keyword match in title/description) and popularity.+* **Filtering:** Attributes like price, brand, and sometimes specific colors/materials are available as post-search filters (clickable options).++## Workflow Integration+This skill outputs the `search[keywords]` action. The subsequent agent workflow should be:+1. Execute the `search` action from this skill.+2. Observe the search results page.+3. Use available `click[]` actions to:+ * Navigate pages (`Next >`).+ * Select specific products (by ID or name).+ * Apply filters (size, color, price) that appear on the results page.diff --git a/experiments/src/skills/webshop/webshop-variant-chooser/SKILL.md b/experiments/src/skills/webshop/webshop-variant-chooser/SKILL.mdnew file mode 100644index 0000000..40db917--- /dev/null+++ b/experiments/src/skills/webshop/webshop-variant-chooser/SKILL.md@@ -0,0 +1,19 @@+---+name: webshop-variant-chooser+description: This skill selects a product variant (e.g., size, quantity) from available options on a product detail page. It is triggered when a product page displays multiple choices, assessing the options (like '1.1 pound (pack of 1)' or 'pack of 2') and selecting one that aligns with user needs, often defaulting to a standard single unit if unspecified.+---+# Instructions++## When to Use+Use this skill when you are on a product detail page and the observation contains a list of variant options (e.g., under a "size" or "quantity" heading). The skill is triggered by the presence of multiple clickable options that represent different configurations of the same product.++## Core Decision Logic+1. **Parse the Observation:** Identify the list of available variant options from the observation text. These are typically presented as clickable values after a label like "size".+2. **Assess User Needs:** Review the original user instruction for any explicit or implicit preferences regarding variant (e.g., budget constraints, desired quantity). If no preference is stated, default logic applies.+3. **Select and Act:** Choose the most appropriate variant and execute a `click[value]` action.+ * **If user instruction specifies a constraint (e.g., "price lower than 40.00 dollars"):** Ensure the selected variant's price (if displayed) complies.+ * **If no user preference is stated:** Prefer the standard, single-unit option (e.g., "1.1 pound (pack of 1)" over "pack of 2") as a sensible default.+ * **If the choice is ambiguous:** You may need to click on a variant to see its updated price/details before finalizing the selection, as shown in the trajectory.++## Action Format+Your response must strictly follow this format:diff --git a/experiments/src/skills/webshop/webshop-variant-chooser/references/trajectory.md b/experiments/src/skills/webshop/webshop-variant-chooser/references/trajectory.mdnew file mode 100644index 0000000..9f1f21c--- /dev/null+++ b/experiments/src/skills/webshop/webshop-variant-chooser/references/trajectory.md@@ -0,0 +1,7 @@+# Execution Trajectory Example++This document contains the exact interaction trajectory that demonstrates the `webshop-variant-chooser` skill.++**Instruction:** i need some kosher sea salt, and price lower than 40.00 dollars++**Observation 1 (Search Results Page):**diff --git a/experiments/src/utils.py b/experiments/src/utils.pynew file mode 100644index 0000000..b9a76fe--- /dev/null+++ b/experiments/src/utils.py@@ -0,0 +1,26 @@+import os+from openai import OpenAI+import json+from retry import retry++client = OpenAI(+ api_key=os.environ["API_KEY"],+ base_url=os.environ["BASE_URL"]+)++@retry(tries=5, delay=5, backoff=2, jitter=(1, 3))+def get_llm_response(messages, is_string=False, model="gpt-4o"):+ response = client.chat.completions.create(+ model=model,+ messages=messages+ )+ if not hasattr(response, "error"):+ ans = response.choices[0].message.content+ if is_string:+ return ans+ else:+ cleaned_text = ans.strip("`json\n").strip("`\n").strip("```\n")+ ans = json.loads(cleaned_text)+ return ans+ else:+ raise Exception(response.error.message)\ No newline at end of filediff --git a/experiments/src/webshop/data/test_indices.json b/experiments/src/webshop/data/test_indices.jsonnew file mode 100644index 0000000..ba96b58--- /dev/null+++ b/experiments/src/webshop/data/test_indices.json@@ -0,0 +1 @@+[2853, 5934, 1642, 4914, 4805, 9666, 900, 6133, 10887, 11543, 2583, 2933, 1689, 6351, 580, 10031, 1451, 11390, 3403, 11870, 8693, 8359, 6719, 5413, 8255, 9639, 9188, 1346, 10959, 4705, 3917, 3503, 3584, 6446, 3141, 9645, 3847, 10151, 1035, 5030, 9911, 5009, 11861, 4417, 8891, 2367, 11882, 3936, 11580, 1190, 10965, 1414, 8695, 485, 10886, 9102, 2980, 3230, 6990, 3854, 9680, 4117, 3229, 8120, 10558, 8089, 10126, 11155, 4944, 8573, 7624, 8330, 9744, 10660, 3466, 1427, 5948, 6453, 7331, 5433, 6943, 3642, 10183, 10364, 5825, 5492, 5613, 2640, 7097, 7375, 7368, 3134, 4288, 8725, 10939, 8231, 6770, 3569, 10789, 5757, 7828, 8459, 10584, 9518, 5023, 11809, 4656, 5720, 7475, 4161, 5455, 10072, 3841, 7802, 7265, 5144, 4196, 5457, 6604, 604, 3742, 861, 7232, 4249, 9346, 4999, 7235, 7603, 7057, 6766, 6074, 4886, 8208, 7572, 11151, 9169, 1301, 4530, 1143, 314, 3012, 7209, 6275, 8387, 9794, 10438, 950, 9963, 2828, 5563, 11358, 5900, 2751, 1857, 6925, 4962, 11572, 5375, 11322, 6206, 11831, 1145, 5068, 6686, 11020, 7953, 1254, 8897, 9439, 4465, 10188, 11896, 3137, 978, 7922, 6115, 2159, 4317, 11755, 3354, 4078, 7999, 7607, 9021, 988, 10982, 6596, 846, 1211, 7662, 3838, 8434, 2731, 4415, 1410, 1735, 4773, 7378, 3944, 818]\ No newline at end of filediff --git a/experiments/src/webshop/prompts/system_prompt.py b/experiments/src/webshop/prompts/system_prompt.pynew file mode 100644index 0000000..959fa67--- /dev/null+++ b/experiments/src/webshop/prompts/system_prompt.py@@ -0,0 +1,18 @@+webshop_system_prompt = """You are web shopping.+I will give you instructions about what to do.+You have to follow the instructions.+Every round I will give you an observation and a list of available actions, you have to respond an action based on the state and instruction.+You can use search action if search is available.+You can click one of the buttons in clickables.+An action should be of the following structure:+search[keywords]+click[value]+If the action is not valid, perform nothing.+Keywords in search are up to you, but the value in click must be a value in the list of available actions.+Remember that your keywords in search should be carefully designed.++Your response should use the following format:++Thought: <your thoughts>+Action: <your next action>+"""\ No newline at end of filediff --git a/experiments/src/webshop/webshop_overall_procedure_examples.txt b/experiments/src/webshop/webshop_overall_procedure_examples.txtnew file mode 100644index 0000000..427c0bb--- /dev/null+++ b/experiments/src/webshop/webshop_overall_procedure_examples.txt@@ -0,0 +1,158 @@+<EXAMPLE_1>++# Procedural Guidance: Purchase Specific Men's Dress Shirt++## Phase 1: Search Strategy+**Objective:** Locate products matching the complex material and style description.++1. **Formulate Search Query:** Combine the core product name with the distinct material and style descriptors provided in the instruction.+ * **Action:** `search[machine wash men's dress shirts polyester heathers cotton heather needle sleeve classic fit]`+2. **Error Handling (Empty Results):** If the initial specific search returns no results, remove the generic terms ("machine wash", "needle sleeve") and retry with the material composition.+ * **Alternative Action:** `search[men's dress shirts polyester heathers cotton heather]`+++## Phase 2: Selection & Verification+**Objective:** Identify a candidate item under the price limit ($50.00).++1. **Scan Results for Price:** Review the search results list. You must identify an item where the displayed price is strictly less than 50.00.+2. **Scan for Relevance:** Verify the item title matches the core requirements (polyester heathers, men's dress shirt).+3. **Select Item:**+ * **Precondition:** The item price is < 50.00.+ * **Action:** `click[{item_title}]` (Replace `{item_title}` with the actual text of the valid item).+++## Phase 3: Product Configuration+**Objective:** Select the specific variants required by the user on the product detail page.++1. **Select Color:** Locate the color options.+ * **Action:** `click[kelly green]`+2. **Select Fit Type:** Locate the fit type options.+ > **Note:** Strictly follow the prompt even if "women" seems unusual for a men's shirt.+ * **Action:** `click[women]`+3. **Select Size:** Locate the size options.+ * **Action:** `click[small]`+4. **Error Handling (Missing Options):** If any of these specific buttons (`kelly green`, `women`, `small`) are not visible or clickable:+ * **Action:** `click[< Prev]` (Return to search results and select a different candidate).+++## Phase 4: Finalization+**Objective:** Complete the purchase.++1. **Verify Selections:** Ensure all selected options are highlighted.+2. **Execute Purchase:**+ * **Action:** `click[Buy Now]`++<EXAMPLE_1_END>++--------------------------------------------------------------------------------++<EXAMPLE_2>++# Procedural Guidance: Purchase Specific Men's Heather Tank Top++## Phase 1: Search and Initial Filtering+**Objective:** Locate a product matching the material descriptions and price constraints.++1. **Formulate Search Query:**+ * Combine the core product type with the most distinctive material descriptors to filter out generic tank tops.+ * **Action:** Execute `search[machine wash men's tank tops polyester heathers cotton heather needle sleeve classic fit]`+ * *Error Handling:* If this query returns 0 results, refine by removing the least critical adjectives (e.g., `search[men's tank tops polyester heathers cotton heather]`).++2. **Scan and Select Candidate:**+ * Review the search results.+ * **Precondition:** The item price must be **lower than $50.00**.+ * **Logic:** Look for an item title that includes "Heather Grey" or the specific material blends mentioned ("polyester heathers", "needle sleeve").+ * **Action:** Execute `click[<item_name>]` (where `<item_name>` is the specific clickable title of the best match).+++## Phase 2: Variant Configuration+**Objective:** Select the specific attributes required (Color, Fit, Size) on the product details page.++1. **Select Color:**+ * Locate the color options.+ * **Action:** Execute `click[heather grey]`.+ * *Constraint Check:* Verify the image or text updates to show the grey version.++2. **Select Fit Type:**+ * The user specified "fit type: men". Look for this specific option selector.+ * **Action:** Execute `click[men]`.+ * *Note:* If "men" is not a clickable button but is in the product title, proceed to the next step.++3. **Select Size:**+ * Locate the size options.+ * **Action:** Execute `click[small]`.+++## Phase 3: Final Verification and Purchase+**Objective:** Confirm constraints and finalize the transaction.++1. **Final Price Check:**+ * **Precondition:** Verify the displayed price is still **lower than $50.00** after selecting all variants.++2. **Execute Purchase:**+ * Once all options (heather grey, men, small) are selected and the price is verified.+ * **Action:** Execute `click[Buy Now]`.+++## Error Handling & Recovery rules+* **Item Unavailable/Wrong Price:** If you navigate to an item and realize the specific variant (e.g., "heather grey" in "small") is out of stock or price jumps above $50.00, execute `click[< Prev]` to return to search results and select the next candidate.+* **Missing Options:** If the required buttons (e.g., `click[small]`) are not present in the `Available Actions` list, the item does not meet constraints. Return to search.++<EXAMPLE_2_END>++--------------------------------------------------------------------------------++<EXAMPLE_3>++# Procedural Guidance: WebShop Item Acquisition++## Phase 1: Search Query Formulation & Execution+**Goal:** Locate candidate items matching the core product, material, and color constraints.+**Preconditions:** The agent is on the landing page or a search bar is available.++1. **Analyze Constraints:** Identify the core object ("men's tuxedo shirts"), color ("brown"), and material keywords ("polyester heathers", "heathers cotton").+2. **Formulate Query:** Construct a search query that combines the product, color, and primary material to narrow results.+ * **Action:** `search[men's tuxedo shirts polyester heathers cotton brown]`+3. **Error Handling (Empty Results):**+ * If the initial search yields "Your search did not match any documents" or zero relevant items, broaden the search by removing material constraints.+ * **Recovery Action:** `search[men's tuxedo shirts brown]`+++## Phase 2: Result Evaluation & Selection+**Goal:** Identify a specific item that meets the price (< $50.00) and title requirements.+**Preconditions:** A list of search results is displayed with titles and prices.++1. **Scan for Price:** Iterate through the displayed results. Ignore any item where the price is $50.00 or higher.+2. **Verify Title Match:** Among items under $50.00, look for titles containing "tuxedo", "brown", and ideally "heather" or "cotton".+3. **Select Item:** Choose the best-matching candidate.+ * **Action:** `click[<Full Name of Item>]` (e.g., `click[Men's Tuxedo Shirt Brown X-Large]`).+++## Phase 3: Attribute Configuration+**Goal:** Select the specific product options (Size, Color, Fit) required by the instruction.+**Preconditions:** The agent is on a specific product details page.++1. **Select Color:** Look for the specific color button requested ("brown").+ * **Action:** `click[brown]`+2. **Select Size:** Look for the specific size button requested ("x-large").+ * **Action:** `click[x-large]`+3. **Select Fit/Type:** Look for the specific fit button if available ("men").+ * **Action:** `click[men]`+4. **Verify Configuration:** Ensure the selected options correspond to "wash cold, machine wash" descriptions in the text (if visible), but prioritize clicking the specific buttons for size and color.+++## Phase 4: Acquisition+**Goal:** Finalize the purchase.+**Preconditions:** The correct options (Brown, X-Large, Men) have been clicked/selected.++1. **Execute Purchase:** Locate the purchase button.+ * **Action:** `click[Buy Now]`+++## Global Error Handling+* **Invalid Action:** If the system returns "Invalid action", check the list of available `clickables`. If the desired option (e.g., "x-large") is not in the list, the item is out of stock or incorrect.+ * **Recovery:** Use `click[<Back to Search>]` and select a different item from Phase 2.+* **Price Mismatch:** If the item details page shows a price > $50.00 (e.g., due to size selection increasing price), do not buy.+ * **Recovery:** Use `click[<Back to Search>]` and select a different item.++<EXAMPLE_3_END>\ No newline at end of filediff --git a/experiments/src/webshop/webshop_procedure_code_template.py b/experiments/src/webshop/webshop_procedure_code_template.pynew file mode 100644index 0000000..aaebe45--- /dev/null+++ b/experiments/src/webshop/webshop_procedure_code_template.py@@ -0,0 +1,106 @@+# ==========================================+# Procedure code template for WebShop environment+# ==========================================+def overall_procedure_code(+ env,+ llm,+ model: str,+ parse_action,+ messages: list = [],+ max_steps: int = 30+):+ """+ Procedure code template for solving a WebShop interactive task using iterative LLM-guided actions.++ INPUTS:+ - env: The environment instance to interact with. (Predefined, call directly)+ - llm: The language model function to generate agent responses. (Predefined, call directly)+ - model: The specific model name or identifier to use with the llm. (Predefined, pass directly)+ - parse_action: A function to extract executable actions from LLM responses. (Predefined, call directly)+ - messages: Pre-populated dialogue context as a list of message dicts. (Contains messages describing the environment background and the task, or previous examples)+ - max_steps: Maximum number of interaction steps before termination. (Predefined, pass directly)+ RETURNS:+ - messages: The updated dialogue context including all interactions.+ - task_done: Boolean indicating if the task was successfully completed.+ - reward: The final reward received from the environment.+ - current_steps: The total number of steps taken in the interaction loop.+ These Input Arguments and Return Types MUST NOT be changed.++ This function serves as a STRICT TEMPLATE to enforce grounded, environment-driven task execution.+ """++ # ------------------------------------------------------------------+ # [SECTION] Overall Procedural Guidance INJECTION+ # INSTRUCTION: You should add detailed Overall Procedural Guidance here to help the agent better complete the task.+ # These guidelines will be visible to the agent as user messages.+ # You may define additional helper variables and functions as needed to help the generated code running correctly and efficiently.+ # ------------------------------------------------------------------+ # Example:+ procedure_guidelines = "<detailed_overall_procedural_guidelines_here>"+ messages.append({"role": "user", "content": procedure_guidelines})+ # ------------------------------------------------------------------++ # --- Core task execution state ---+ task_done = False+ current_steps = 0+ reward = 0 # always track latest reward++ # --- Main agent loop (IMMUTABLE STRUCTURE) ---+ while not task_done and current_steps < max_steps:++ # ============================================================+ # 1) THOUGHT PHASE β Query LLM based on current message state+ # - DO NOT change this call signature+ # ============================================================+ try:+ response = llm(messages, model)+ print(f'\033[92mAgent response: \n{response}\033[0m')+ except Exception as e:+ print(f'\033[91mError in LLM call: {e}\033[0m')+ break++ # ============================================================+ # 2) Persist assistant response into dialogue+ # ============================================================+ messages.append({"role": "assistant", "content": response})++ # ============================================================+ # 3) ACTION PARSING PHASE β Extract executable command+ # Expected format: "Action: <command>"+ # ============================================================+ action = parse_action(response)++ # ============================================================+ # 4) ENVIRONMENT INTERACTION PHASE β Execute Action+ # - Must use env.step()+ # - Do not alter the list wrapping behavior+ # - Task completion (task_done) and reward MUST ONLY be+ # derived from env.step() outputs. DO NOT INFER.+ # ============================================================+ observation, reward, task_done, info = env.step(action)++ print(f'\033[93mObservation: \n{observation}\033[0m')++ # ============================================================+ # 5) FEEDBACK PHASE β Feed environment signal back to agent+ # ============================================================+ messages.append({"role": "user", "content": f"Observation: {observation}"})++ # ==============================================================================+ # 6) RUNTIME ANALYSIS & INTERVENTION (Optional, Leave empty if not needed.)+ # INSTRUCTION: Analyze 'observation' or 'response'.+ # You can append EXTRA hints to 'messages' here.+ # WARNING: Do NOT use 'continue', 'break', or 'return'.+ # ==============================================================================+ # Example (change as needed):+ if "<specific_condition>" in observation:+ extra_hint = "<extra_hint_here>"+ messages.append({"role": "user", "content": extra_hint})+ # ==============================================================++ # ============================================================+ # 7) STEP ACCOUNTING+ # ============================================================+ current_steps += 1++ return messages, task_done, reward, current_stepsdiff --git a/experiments/webshop_run.py b/experiments/webshop_run.pynew file mode 100644index 0000000..0a7972c--- /dev/null+++ b/experiments/webshop_run.py@@ -0,0 +1,317 @@+import os+from openai import OpenAI+import re+from retry import retry+import concurrent.futures+from concurrent.futures import ThreadPoolExecutor, as_completed+from tqdm import tqdm+import json+import gym+import yaml+import sys+import argparse+import traceback+import multiprocessing++from src.webshop.prompts.system_prompt import webshop_system_prompt+from src.skill import SkillModule++current_dir = os.path.dirname(os.path.abspath(__file__))+webshop_path = os.path.join(current_dir, "webshop")+if webshop_path not in sys.path:+ sys.path.append(webshop_path)+# WebShop specific imports+from webshop.web_agent_site.envs import WebAgentTextEnv+from webshop.web_agent_site.utils import DEFAULT_FILE_PATH+from webshop.web_agent_site.envs.web_agent_text_env import SimServer+++client = OpenAI(+ api_key=os.environ["API_KEY"],+ base_url=os.environ["BASE_URL"]+)++@retry(tries=5, delay=5, backoff=2, jitter=(1, 3))+def llm(prompt, model="YOUR_MODEL_NAME"):+ print(f'Calling LLM with model: {model}')+ if isinstance(prompt, list):+ messages = prompt+ elif isinstance(prompt, str):+ messages = [{"role": "user", "content": prompt}]+ else:+ raise ValueError(f'prompt must be a list or a string, but got {type(prompt)}')+ response = client.chat.completions.create(+ model=model,+ messages=messages+ )+ content = response.choices[0].message.content+ return content if content is not None else "Output Error"++class Colors:+ RED = '\033[91m'+ GREEN = '\033[92m'+ YELLOW = '\033[93m'+ BLUE = '\033[94m'+ RESET = '\033[0m'++def parse_action(response: str) -> str:+ pattern = re.compile(r"Action:\s*(.+)", re.IGNORECASE)+ match = pattern.search(response)+ if match:+ return match.group(1).strip().strip('"\'*`')+ return ""++def run_standard_procedure(env, llm, model, messages, max_steps):+ task_done = False+ task_reward = 0+ current_steps = 0++ while not task_done and current_steps < max_steps:+ current_steps += 1++ try:+ response = llm(messages, model)+ print(f'{Colors.GREEN}Agent response: \n{response}{Colors.RESET}')+ except Exception as e:+ print(f'{Colors.RED}Error in LLM call: {e}{Colors.RESET}')+ break++ messages.append({"role": "assistant", "content": response})+ action = parse_action(response)++ observation, reward, done, info = env.step(action)++ task_reward = reward+ task_done = done++ print(f'{Colors.YELLOW}Observation: \n{observation}{Colors.RESET}')++ messages.append({"role": "user", "content": f"Observation: {observation}"})++ if task_done:+ print(f'{Colors.GREEN}Whole Task completed! Reward: {task_reward}{Colors.RESET}')++ return messages, task_done, task_reward, current_steps+++def webshop_run_single(env, ob, instruction_text, max_steps=30, model=None, Skill_Module=None):+ results = []++ query = instruction_text++ # Initialize context+ messages = [{"role": "system", "content": webshop_system_prompt}]+ messages.append({"role": "user", "content": ob})++ task_done = False+ task_reward = 0+ steps = 0+ relevant_skill_names = []+ overall_procedure = ""+ overall_procedure_code = ""++ use_skill = False+ if Skill_Module is not None:+ relevant_skill_names = Skill_Module.retrieve_relevant_skills(ob)+ if relevant_skill_names:+ use_skill = True+ print(f'{Colors.BLUE}Retrieved relevant skills: {relevant_skill_names}{Colors.RESET}')+ else:+ print(f"[INFO] No relevant skills found for task: {ob}. Falling back to standard procedure.")+++ # Execute Strategy+ if use_skill:+ overall_procedure = Skill_Module.generate_overall_procedure(ob, relevant_skill_names)+ print(f'\n{Colors.BLUE}Generated Overall Procedure:\n{overall_procedure}{Colors.RESET}')++ MAX_RETRIES = 3+ retries = 0++ while retries < MAX_RETRIES:+ try:+ overall_procedure_code = Skill_Module.generate_overall_procedure_code(ob, overall_procedure)+ print(f'\n{Colors.BLUE}Generated Overall Procedure Code:\n{overall_procedure_code}{Colors.RESET}')++ # Dynamic execution of generated procedure+ namespace = {}+ exec(overall_procedure_code, namespace)+ func = namespace["overall_procedure_code"]++ messages, task_done, task_reward, steps = func(+ env, llm, model, parse_action, messages, max_steps+ )++ if task_done:+ print(f'{Colors.GREEN} Task completed! Reward: {task_reward}{Colors.RESET}')+ break+ except Exception as e:+ print(f'Error loading/executing procedure script: {e}')+ retries += 1+ else:+ messages, task_done, task_reward, steps = run_standard_procedure(+ env, llm, model, messages, max_steps+ )++ results.append({+ "query": query,+ "task_done": task_done,+ "reward": task_reward,+ "steps": steps,+ "messages": messages,+ "relevant_skill_names": relevant_skill_names+ })++ return results++def eval_single_game(game_idx, session_id, args, output_path):+ try:+ # WebShop environment setup+ port = 3500 + game_idx+ base_url = 'http://127.0.0.1:' + str(port)+ env = gym.make('WebAgentTextEnv-v0', observation_mode='text', num_products=None, base_url=base_url)+ print(f'{Colors.BLUE}Initialized WebShop environment for game {game_idx} at port {port}{Colors.RESET}')+ ob = env.reset(session=session_id)[0]++ print(f'{Colors.RED}Processing task {game_idx} (Session {session_id}): {ob}{Colors.RESET}')++ # θ·ε WebShop ηδ»»ε‘ζ什+ instruction_text = env.instruction_text++ # Initialize SkillModule (if enabled)+ Skill_Module = None+ if args.use_skill:+ skill_config = {+ "skills_dir": "src/skills/webshop",+ "overall_procedure_examples_path": "src/webshop/webshop_overall_procedure_examples.txt",+ "procedure_code_template_path": "src/webshop/webshop_procedure_code_template.py",+ "model": args.model+ }+ Skill_Module = SkillModule(**skill_config)++ batch_results = webshop_run_single(+ env=env,+ ob=ob,+ instruction_text=instruction_text,+ max_steps=args.max_steps,+ model=args.model,+ Skill_Module=Skill_Module+ )++ result = batch_results[0]+ result['session_id'] = session_id+ save_file = f'{output_path}/idx_{game_idx}.json'+ with open(save_file, 'w') as f:+ json.dump(result, f, indent=4, ensure_ascii=False)++ return result++ except Exception as e:+ print(f"Error in game {game_idx} (Session {session_id}):")+ traceback.print_exc()+ return None+ finally:+ try:+ env.close()+ except:+ pass++def main(args):+ try:+ multiprocessing.set_start_method('spawn', force=True)+ except RuntimeError:+ pass++ model_name = args.model+ output_path = f'results/webshop/{model_name}/{args.exp_name}_skill_{args.use_skill}'+ if not os.path.exists(output_path):+ os.makedirs(output_path, exist_ok=True)++ with open('src/webshop/data/test_indices.json', 'r') as f:+ session_ids = json.load(f)++ # ---------------------------------------------------------+ # Identify Remaining Tasks (Checkpointing)+ # ---------------------------------------------------------+ num_games = len(session_ids)+ tasks_to_run = {}+ finished_games = 0+ all_rewards = 0+ all_steps = 0+ existing_files = set()++ # Scan existing results+ if os.path.exists(output_path):+ for file in os.listdir(output_path):+ if file.endswith('.json') and file.startswith('idx_'):+ try:+ idx = int(file.split('_')[1].split('.')[0])+ existing_files.add(idx)++ with open(f'{output_path}/{file}', 'r') as f:+ res = json.load(f)+ all_rewards += res['reward']+ all_steps += res['steps']+ finished_games += 1+ except:+ continue++ # Filter tasks to run+ for idx in range(num_games):+ if idx not in existing_files:+ # tasks_to_run.append(idx)+ tasks_to_run[idx] = session_ids[idx]++ print(f"Already finished: {finished_games}, Remaining: {len(tasks_to_run)}")+++ # ---------------------------------------------------------+ # Parallel Execution+ # ---------------------------------------------------------+ print(f"Starting parallel evaluation with {args.max_workers} workers...")++ with concurrent.futures.ProcessPoolExecutor(max_workers=args.max_workers) as executor:+ future_to_idx = {+ executor.submit(eval_single_game, idx, session_id, args, output_path): idx+ for idx, session_id in tasks_to_run.items()+ }+ # Monitor progress with tqdm+ pbar = tqdm(total=len(tasks_to_run), desc="Evaluating WebShop")+ for future in concurrent.futures.as_completed(future_to_idx):+ idx = future_to_idx[future]+ try:+ result = future.result()+ if result:+ finished_games += 1+ all_rewards += result['reward']+ all_steps += result['steps']++ # Update progress bar description+ current_avg_reward = all_rewards / finished_games if finished_games > 0 else 0+ current_avg_steps = all_steps / finished_games if finished_games > 0 else 0+ pbar.set_postfix({+ 'Avg Reward': f'{current_avg_reward:.2f}',+ 'Avg Steps': f'{current_avg_steps:.2f}'+ })+ except Exception as exc:+ print(f'\nGame {idx} generated an exception: {exc}')++ pbar.update(1)++ pbar.close()++ # Final Summary+ print(f"Evaluation finished. Total Games: {finished_games}")+ if finished_games > 0:+ print(f"Final Avg Reward: {all_rewards / finished_games}")+ print(f"Final Avg Steps: {all_steps / finished_games}")++if __name__ == '__main__':+ parser = argparse.ArgumentParser()+ parser.add_argument('--model', type=str, default='gpt-4o')+ parser.add_argument('--max_workers', type=int, default=1, help="Number of parallel workers")+ parser.add_argument('--max_steps', type=int, default=30)+ parser.add_argument('--exp_name', type=str, default='')+ parser.add_argument('--use_skill', action='store_true')+ args = parser.parse_args()+ main(args)\ No newline at end of file