From 77535f97d50f9283212a3723c2bc6b8bccb4ffbc Mon Sep 17 00:00:00 2001 From: Isadora White Date: Fri, 23 May 2025 11:49:51 -0700 Subject: [PATCH] fix goal string issues --- settings.js | 2 +- src/agent/agent.js | 8 +++-- src/agent/tasks/tasks.js | 26 ++++++++++++---- tasks/construction_tasks/get_blueprint.js | 2 +- .../require_collab_test_2_items/3_agent.json | 30 ++++--------------- .../require_collab_test_2_items/4_agent.json | 30 ++++--------------- .../require_collab_test_2_items/5_agent.json | 30 ++++--------------- tasks/example_tasks.json | 5 ++++ 8 files changed, 51 insertions(+), 82 deletions(-) diff --git a/settings.js b/settings.js index 735755b..c73502a 100644 --- a/settings.js +++ b/settings.js @@ -44,7 +44,7 @@ const settings = { "verbose_commands": true, // show full command syntax "narrate_behavior": true, // chat simple automatic actions ('Picking up item!') "chat_bot_messages": true, // publicly chat messages to other bots - "log_all_prompts": false, // log ALL prompts to file + "log_all_prompts": true, // log ALL prompts to file } // these environment variables override certain settings diff --git a/src/agent/agent.js b/src/agent/agent.js index b8046bb..745abd5 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -26,8 +26,6 @@ export class Agent { } console.log('Starting agent initialization with profile:', profile_fp); - - // Initialize components with more detailed error handling console.log('Initializing action manager...'); @@ -105,6 +103,12 @@ export class Agent { if (!load_mem) { if (task_path !== null) { this.task.initBotTask(); + this.task.setAgentGoal(); + } + } else { + // set the goal without initializing the rest of the task + if (task_path !== null) { + this.task.setAgentGoal(); } } diff --git a/src/agent/tasks/tasks.js b/src/agent/tasks/tasks.js index 0a740ab..1c00d95 100644 --- a/src/agent/tasks/tasks.js +++ b/src/agent/tasks/tasks.js @@ -266,6 +266,15 @@ export class Task { this.taskTimeout = this.data.timeout || 300; // Set validator based on task_type + // do goal initialization here + + // let agentGoal = this.getAgentGoal(); + // if (agentGoal) { + // agentGoal += "You have to collaborate with other agents/bots, namely " + this.available_agents.filter(n => n !== this.name).join(', ') + " to complete the task as soon as possible by dividing the work among yourselves."; + // console.log(`Setting goal for agent ${this.agent.count_id}: ${agentGoal}`); + // await executeCommand(this.agent, `!goal("${agentGoal}")`); + // } + if (this.task_type === 'construction') { this.validator = new ConstructionTaskValidator(this.data, this.agent); } else if (this.task_type === 'cooking' || this.task_type === 'techtree') { @@ -407,7 +416,17 @@ export class Task { return false; } + async setAgentGoal() { + let agentGoal = this.getAgentGoal(); + if (agentGoal && this.data.agent_count + this.data.human_count > 1) { + agentGoal += "You have to collaborate with other agents/bots, namely " + this.available_agents.filter(n => n !== this.name).join(', ') + " to complete the task as soon as possible by dividing the work among yourselves."; + console.log(`Setting goal for agent ${this.agent.count_id}: ${agentGoal}`); + } + await executeCommand(this.agent, `!goal("${agentGoal}")`); + } + async initBotTask() { + await this.setAgentGoal(); await this.agent.bot.chat(`/clear ${this.name}`); console.log(`Cleared ${this.name}'s inventory.`); @@ -508,12 +527,7 @@ export class Task { await executeCommand(this.agent, `!startConversation("${other_name}", "${this.data.conversation}")`); } - let agentGoal = this.getAgentGoal(); - if (agentGoal) { - agentGoal += "You have to collaborate with other agents/bots, namely " + this.available_agents.filter(n => n !== this.name).join(', ') + " to complete the task as soon as possible by dividing the work among yourselves."; - console.log(`Setting goal for agent ${this.agent.count_id}: ${agentGoal}`); - await executeCommand(this.agent, `!goal("${agentGoal}")`); - } + } async teleportBots() { diff --git a/tasks/construction_tasks/get_blueprint.js b/tasks/construction_tasks/get_blueprint.js index dcf2493..841a886 100644 --- a/tasks/construction_tasks/get_blueprint.js +++ b/tasks/construction_tasks/get_blueprint.js @@ -23,7 +23,7 @@ bot.on('spawn', async () => { const xOffset = 30; const zOffset = 20; - const taskFilePath = '/Users/isadorawhite/izzy_mindcraft/mindcraft/tasks/construction_tasks/custom/flower_three_agents.json'; + const taskFilePath = ''; const task_name = "flower_three_agents"; diff --git a/tasks/cooking_tasks/require_collab_test_2_items/3_agent.json b/tasks/cooking_tasks/require_collab_test_2_items/3_agent.json index 861248c..8e595f0 100644 --- a/tasks/cooking_tasks/require_collab_test_2_items/3_agent.json +++ b/tasks/cooking_tasks/require_collab_test_2_items/3_agent.json @@ -19,10 +19,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "gold_ingot": 3 @@ -62,10 +59,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", "initial_inventory": { "0": { "gold_ingot": 3 @@ -103,10 +97,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "milk_bucket": 2 @@ -142,10 +133,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", "initial_inventory": { "0": { "coal": 3, @@ -187,10 +175,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", "initial_inventory": { "0": { "coal": 3, @@ -229,10 +214,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", "initial_inventory": { "0": { "gold_ingot": 3, diff --git a/tasks/cooking_tasks/require_collab_test_2_items/4_agent.json b/tasks/cooking_tasks/require_collab_test_2_items/4_agent.json index 0f49d81..9a44990 100644 --- a/tasks/cooking_tasks/require_collab_test_2_items/4_agent.json +++ b/tasks/cooking_tasks/require_collab_test_2_items/4_agent.json @@ -19,10 +19,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "gold_ingot": 2 @@ -65,10 +62,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", "initial_inventory": { "0": { "gold_ingot": 2 @@ -109,10 +103,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "milk_bucket": 1 @@ -150,10 +141,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", "initial_inventory": { "0": { "coal": 3, @@ -199,10 +187,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", "initial_inventory": { "0": { "coal": 3, @@ -245,10 +230,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", "initial_inventory": { "0": { "gold_ingot": 2, diff --git a/tasks/cooking_tasks/require_collab_test_2_items/5_agent.json b/tasks/cooking_tasks/require_collab_test_2_items/5_agent.json index ffe5341..320e34c 100644 --- a/tasks/cooking_tasks/require_collab_test_2_items/5_agent.json +++ b/tasks/cooking_tasks/require_collab_test_2_items/5_agent.json @@ -19,10 +19,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 bread. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "gold_ingot": 2 @@ -67,10 +64,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 rabbit_stew. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for rabbit_stew:\n[\"Step 1: Go to the farm and collect 1 carrot, 1 potato, and 1 brown mushroom (search for 'potatoes' (not 'potato').\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to the furnace and bake the potato.', 'Step 5: From your inventory or other agents get a bowl', 'Step 6: Kill a rabbit and pick up 1 raw rabbit that is dropped.', 'Step 7: Go to the furnace and cook the raw rabbit.', 'Step 8: Go to the crafting table and combine the cooked rabbit, baked potato, carrot, brown mushroom, and bowl to make rabbit stew.']", "initial_inventory": { "0": { "gold_ingot": 2 @@ -114,10 +108,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", - "1": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']" - }, + "goal": "Collaborate with agents around you to make 1 cake, 1 bread. Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']Recipe for bread:\n['Step 1: Go to the farm and collect 3 wheat.', 'Step 2: Go to the crafting table and use the wheat to craft bread.']", "initial_inventory": { "0": { "milk_bucket": 1 @@ -159,10 +150,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 golden_apple. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']", "initial_inventory": { "0": { "coal": 2, @@ -211,10 +199,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", - "1": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']" - }, + "goal": "Collaborate with agents around you to make 1 baked_potato, 1 cake. Recipe for baked_potato:\n[\"Step 1: Go to the farm and collect 1 potato (search for 'potatoes' (not 'potato')).\", 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 2: Go to the furnace and bake the potato.']Recipe for cake:\n['Step 1: Go to the farm and collect 3 wheat, 2 sugar cane.', 'Step 2: From your inventory or other agents get 3 milk buckets (already filled with milk).', 'Step 3: Get an egg from your inventory or other agents.', 'Step 4: Go to the crafting table and craft the sugarcane into sugar.', 'Step 5: Go to the crafting table and combine all ingredients (3 wheat, 2 sugar, 1 egg, and milk bucket) to make a cake.']", "initial_inventory": { "0": { "coal": 2, @@ -261,10 +246,7 @@ ] }, "blocked_access_to_recipe": [], - "goal": { - "0": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", - "1": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']" - }, + "goal": "Collaborate with agents around you to make 1 golden_apple, 1 cooked_beef. Recipe for golden_apple:\n['Step 1: Get 1 apple and 8 gold ingots from your inventory or other bots.', 'Step 2: Go to the crafting table and surround the apple with the gold ingots to create a golden apple.']Recipe for cooked_beef:\n['Step 1: Kill a cow and pick up 1 beef that is dropped.', 'Step 2: Get coal from your inventory or other agents.', 'Step 3: Put coal in the furnace', 'Step 4: Go to furnace and use it to cook the beef.']", "initial_inventory": { "0": { "gold_ingot": 2, diff --git a/tasks/example_tasks.json b/tasks/example_tasks.json index 1523c82..8122649 100644 --- a/tasks/example_tasks.json +++ b/tasks/example_tasks.json @@ -102,6 +102,11 @@ "type": "debug", "timeout": 60 }, + "debug_goal": { + "goal": "Reply to all messages with star emojis when prompted", + "agent_count": 1, + "type": "debug" + }, "debug_different_goal": { "goal": { "0": "Reply to all messages with star emojis when prompted",