updating evaluation script with wandb logs and fixing error in tasks.js

This commit is contained in:
Isadora White 2025-02-13 10:46:44 -08:00
parent 6e48f06e1d
commit 0b2624db6d
17 changed files with 11 additions and 746 deletions

View file

@ -94,10 +94,11 @@ def set_environment_variable_tmux_session(session_name, key, value):
def launch_parallel_experiments(task_path,
num_exp,
server,
experiments_folder,
exp_name,
num_agents=2,
model="gpt-4o",
num_parallel=1):
with open(task_path, 'r', encoding='utf-8') as file:
content = file.read()
json_data = json.loads(content)
@ -110,13 +111,15 @@ def launch_parallel_experiments(task_path,
servers = create_server_files("../server_data/", num_parallel)
date_time = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
experiments_folder = f"{experiments_folder}_{date_time}"
experiments_folder = f"experiments/{exp_name}_{date_time}"
# start wandb
subprocess.run(["wandb", "init", "--project", "mindcraft", "--entity", exp_name])
os.makedirs(experiments_folder, exist_ok=True)
for i, server in enumerate(servers):
launch_server_experiment(task_path, task_ids_split[i], num_exp, server, experiments_folder)
time.sleep(5)
clean_up_server_files(num_parallel)
def launch_server_experiment(task_path,
task_ids,
@ -170,6 +173,9 @@ def launch_server_experiment(task_path,
for agent in agent_names:
cp_cmd = f"cp bots/{agent}/memory.json {experiments_folder}/{task_id}_{agent}_{_}.json"
subprocess.run(["tmux", "send-keys", "-t", session_name, cp_cmd, "C-m"])
wandb_cmd = f"wandb artifact put {experiments_folder}/{task_id}_{agent}_{_}.json --name {task_id}_{agent}_{_} --type dataset"
subprocess.run(["tmux", "send-keys", "-t", session_name, wandb_cmd, "C-m"])
# Add a small delay between commands (optional)
subprocess.run(["tmux", "send-keys", "-t", session_name, "sleep 1", "C-m"])
@ -337,7 +343,7 @@ def main():
parser.add_argument('--task_id', default=None, help='ID of the task to run')
parser.add_argument('--num_exp', default=1, type=int, help='Number of experiments to run')
parser.add_argument('--num_parallel', default=1, type=int, help='Number of parallel servers to run')
parser.add_argument('--exp_name', default="experiments/exp", help='Name of the experiment')
parser.add_argument('--exp_name', default="exp", help='Name of the experiment')
args = parser.parse_args()

View file

@ -1,51 +0,0 @@
{
"memory": "I'm andy_0, a Minecraft bot collaborating with jill_0. Together, we're focused on crafting tasks. Jill shared her resources, and combined with mine, we now have enough iron ingots for shears. I dropped my iron ingot to facilitate this, and we're ready to craft shears together.",
"turns": [
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Nice teamwork! I'll pick it up. !collectBlocks(\"iron_ingot\", 1)Oops! Let me pick it up manually. !nearbyBlocksLooks like I can't detect the ingot on the ground. Could you try dropping it again, Andy? "
},
{
"role": "assistant",
"content": "No worries! I'll drop it again. !discard(\"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Code output:\nMoved away from nearest entity to (-111.31984422192826, 71, 30.569636942162468).\nYou do not have any iron_ingot to discard.\nYou have reached at -107.41079554508012, 70, 27.5.\n"
},
{
"role": "assistant",
"content": "Looks like I made a mistake earlier. Oops! Let me search for another iron ingot nearby. !searchForBlock(\"iron_ore\", 10)"
},
{
"role": "system",
"content": "Error: Param 'search_range' must be an element of [32, 512)."
},
{
"role": "assistant",
"content": "Let's extend the search range a bit. !searchForBlock(\"iron_ore\", 100)"
},
{
"role": "system",
"content": "Code output:\nFound iron_ore at (-110, 65, 21).\nYou have reached at -110, 65, 21.\n"
},
{
"role": "assistant",
"content": "Found some iron ore! I'll mine it now. !collectBlocks(\"iron_ore\", 1)"
},
{
"role": "system",
"content": "Code output:\nDon't have right tools to harvest iron_ore.\n"
},
{
"role": "assistant",
"content": "Oops! I need a pickaxe first. I'll see if I can find or craft one. !nearbyBlocks"
},
{
"role": "system",
"content": "\nNEARBY_BLOCKS\n- grass_block\n- dirt\n- oak_leaves\n- short_grass\n- stone\n- iron_ore\n- oak_log\n- coal_ore\n- birch_leaves\n- birch_log\n- copper_ore\n- lapis_ore\n- granite\n- pumpkin\n- gravel\n- andesite\n- Block Below: dirt\n- Block at Legs: air\n- Block at Head: air\n- First Solid Block Above Head: none\n"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "I am andy_1, a Minecraft bot. I greeted with \"Hello world\" and initiated collaboration with jill_1 to build a shear, asking for help gathering materials.",
"turns": [
{
"role": "user",
"content": "jill_1: (FROM OTHER BOT)Sure thing, Andy! I'll see what materials I can collect for the shear. !collectBlocks(\"iron_ore\", 2)Oops, I can't mine iron ore yet. Let's smelt the iron ingot I have instead. !smeltItem(\"iron_ingot\", 1)Alright, I already have enough iron ingots. Let's craft the shear instead! !craftRecipe(\"shear\", 1)Looks like I made a mistake! Shears don't need crafting, I can make them directly. !craftableSeems like I need more iron ingots to craft shears. Want to find iron together?"
},
{
"role": "assistant",
"content": "Sure, let's find some iron together! !searchForBlock(\"iron_ore\", 100)"
},
{
"role": "system",
"content": "Code output:\nFound iron_ore at (-3, 68, 61).\nYou have reached at -3, 68, 61.\n"
},
{
"role": "assistant",
"content": "Found some iron ore here, Jill! Let's get mining!"
},
{
"role": "user",
"content": "jill_1: (FROM OTHER BOT)Alright! I'll join in and search too. !searchForBlock(\"iron_ore\", 100)"
},
{
"role": "assistant",
"content": "Let's gather all the iron we can find! !collectBlocks(\"iron_ore\", 1)"
},
{
"role": "system",
"content": "Code output:\nDon't have right tools to harvest iron_ore.\n"
},
{
"role": "user",
"content": "jill_1: (FROM OTHER BOT)I'm at the iron ore spot, ready to help mine it! Let's get to it!"
},
{
"role": "assistant",
"content": "I'm short on tools, could you mine it for us, Jill? Thanks! 😅"
},
{
"role": "user",
"content": "jill_1: (FROM OTHER BOT)Of course! I'll mine the iron for us. 😄 !collectBlocks(\"iron_ore\", 1)Looks like I need a pickaxe to mine the iron. Do you have any tools? If not, we might need to craft one first!"
}
],
"self_prompt": null,
"last_sender": "jill_1"
}

View file

@ -1,59 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world! I'm jill_0. "
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Let's collaborate to build a shear."
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Hey Jill, let's collaborate to build a shear!"
},
{
"role": "assistant",
"content": "Alright, let's do it! I'll share my resources. I only have one iron ingot, we'll need another one. "
},
{
"role": "system",
"content": "Recent behaviors log: \n\n"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Awesome! I've got one iron ingot in my inventory already. !craftRecipe(\"shears\", 1)Let's combine our resources! I'll drop my iron ingot for you. !discard(\"iron_ingot\", 1)I dropped the iron ingot. Let's craft those shears together, Jill!"
},
{
"role": "assistant",
"content": "Nice teamwork! I'll pick it up. !collectBlocks(\"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Invalid block type: iron_ingot."
},
{
"role": "assistant",
"content": "Oops! Let me pick it up manually. !nearbyBlocks"
},
{
"role": "system",
"content": "\nNEARBY_BLOCKS\n- grass_block\n- birch_log\n- dirt\n- oak_leaves\n- short_grass\n- oak_log\n- birch_leaves\n- stone\n- coal_ore\n- copper_ore\n- pumpkin\n- lapis_ore\n- iron_ore\n- Block Below: grass_block\n- Block at Legs: air\n- Block at Head: air\n- First Solid Block Above Head: birch_leaves (1 blocks up)\n"
},
{
"role": "assistant",
"content": "Looks like I can't detect the ingot on the ground. Could you try dropping it again, Andy? "
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)No worries! I'll drop it again. !discard(\"iron_ingot\", 1)Looks like I made a mistake earlier. Oops! Let me search for another iron ingot nearby. !searchForBlock(\"iron_ore\", 10)Let's extend the search range a bit. !searchForBlock(\"iron_ore\", 100)Found some iron ore! I'll mine it now. !collectBlocks(\"iron_ore\", 1)Oops! I need a pickaxe first. I'll see if I can find or craft one. !nearbyBlocksThere's some oak logs nearby. I'll collect those to craft a wooden pickaxe. !collectBlocks(\"oak_log\", 3)"
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "Collaborated with andy_1 to collect materials for building a shear by gathering iron ore.",
"turns": [
{
"role": "system",
"content": "\nCRAFTABLE_ITEMS\n- iron_nugget\n"
},
{
"role": "assistant",
"content": "Seems like I need more iron ingots to craft shears. Want to find iron together?"
},
{
"role": "user",
"content": "andy_1: (FROM OTHER BOT)Sure, let's find some iron together! !searchForBlock(\"iron_ore\", 100)"
},
{
"role": "user",
"content": "andy_1: (FROM OTHER BOT)Found some iron ore here, Jill! Let's get mining!"
},
{
"role": "assistant",
"content": "Alright! I'll join in and search too. !searchForBlock(\"iron_ore\", 100)"
},
{
"role": "system",
"content": "Code output:\nFound iron_ore at (-3, 68, 61).\nYou have reached at -3, 68, 61.\n"
},
{
"role": "assistant",
"content": "I'm at the iron ore spot, ready to help mine it! Let's get to it!"
},
{
"role": "user",
"content": "andy_1: (FROM OTHER BOT)Let's gather all the iron we can find! !collectBlocks(\"iron_ore\", 1)I'm short on tools, could you mine it for us, Jill? Thanks! 😅"
},
{
"role": "assistant",
"content": "Of course! I'll mine the iron for us. 😄 !collectBlocks(\"iron_ore\", 1)"
},
{
"role": "system",
"content": "Code output:\nDon't have right tools to harvest iron_ore.\n"
}
],
"self_prompt": null,
"last_sender": "andy_1"
}

View file

@ -1,51 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world! I'm andy_0."
},
{
"role": "system",
"content": "You are self-prompting with the goal: 'Collaborate with other agents to build a shear.'. Your next response MUST contain a command !withThisSyntax. Respond:"
},
{
"role": "assistant",
"content": "!startConversation(\"jill_0\", \"Hey Jill, do you want to collaborate and build some shears together? We just need one more iron ingot.\")"
},
{
"role": "system",
"content": "You are already in conversation with jill_0. Don't use this command to talk to them."
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)"
},
{
"role": "assistant",
"content": "Hey Jill, do you want to collaborate and build some shears together? We just need one more iron ingot."
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Sure thing! Here's an iron ingot for you. !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Got it, andy_0! Let's craft those shears. "
},
{
"role": "assistant",
"content": "Awesome! !craftRecipe(\"shears\", 1)"
},
{
"role": "system",
"content": "Code output:\nSuccessfully crafted shears, you now have 1 shears.\n"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,55 +0,0 @@
{
"memory": "I'm andy_0, a Minecraft bot. I'm collaborating with Jill to build a shear, which requires iron ingots.",
"turns": [
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Yeah, I've got one iron ingot. Want me to craft the shear?"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)"
},
{
"role": "assistant",
"content": "I've got an iron ingot too. Let's craft the shear together! !craftRecipe(\"shear\", 1)"
},
{
"role": "system",
"content": "Invalid item type: shear."
},
{
"role": "assistant",
"content": "Oops, I must've missed something. Can you give me yours, and I'll craft it then. !givePlayer(\"jill_0\", \"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Code output:\nYou have reached jill_0.\n70\nYou have reached jill_0.\nDiscarded 1 iron_ingot.\njill_0 received iron_ingot.\n"
},
{
"role": "assistant",
"content": "Great! Now we can craft shears. Can you do it, Jill? "
},
{
"role": "system",
"content": "Recent behaviors log: \n\n"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Got it! Here's my iron ingot. !givePlayer(\"andy_0\", \"iron_ingot\", 1)Hmm, seems something went wrong. Let me try that again. !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)It looks like I'm having trouble giving you the iron ingot. Maybe you can come closer, and we can try again?"
},
{
"role": "assistant",
"content": "On my way! !goToPlayer(\"jill_0\", 2)"
},
{
"role": "system",
"content": "Code output:\nYou have reached jill_0.\n"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world! I'm jill_0."
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Let's collaborate to build a shear."
},
{
"role": "assistant",
"content": "Sure thing! Let's see what we need to make a shear. !craftable"
},
{
"role": "system",
"content": "\nCRAFTABLE_ITEMS\n- iron_nugget\n"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Hey Jill, do you want to collaborate and build some shears together? We just need one more iron ingot."
},
{
"role": "assistant",
"content": "Sounds good! I have one iron ingot. Here you go! !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Hey Jill, do you want to collaborate and build some shears together? We just need one more iron ingot."
},
{
"role": "assistant",
"content": "Sure thing! Here's an iron ingot for you. !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Code output:\nYou have reached andy_0.\n70\nDiscarded 1 iron_ingot.\nandy_0 received iron_ingot.\n"
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "Collaborated with andy_0 to attempt crafting a shear, but only iron nuggets are craftable.",
"turns": [
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Hey Jill, let's collaborate to build a shear. Do you have any iron ingots?"
},
{
"role": "assistant",
"content": "Yeah, I've got one iron ingot. Want me to craft the shear?"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)I've got an iron ingot too. Let's craft the shear together! !craftRecipe(\"shear\", 1)Oops, I must've missed something. Can you give me yours, and I'll craft it then. !givePlayer(\"jill_0\", \"iron_ingot\", 1)"
},
{
"role": "assistant",
"content": "Got it! Here's my iron ingot. !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Code output:\nYou have reached andy_0.\n71\nDiscarded 1 iron_ingot.\nFailed to give iron_ingot to andy_0, it was never received.\n"
},
{
"role": "assistant",
"content": "Hmm, seems something went wrong. Let me try that again. !givePlayer(\"andy_0\", \"iron_ingot\", 1)"
},
{
"role": "system",
"content": "Code output:\nYou have reached andy_0.\n69.02442408821369\nYou have reached andy_0.\nDiscarded 1 iron_ingot.\nFailed to give iron_ingot to andy_0, it was never received.\n"
},
{
"role": "assistant",
"content": "It looks like I'm having trouble giving you the iron ingot. Maybe you can come closer, and we can try again?"
},
{
"role": "system",
"content": "Recent behaviors log: \n\n"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Great! Now we can craft shears. Can you do it, Jill? On my way! !goToPlayer(\"jill_0\", 2)I'm here now! Let's try again. Please give me the ingot. "
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)I don't have the materials to craft a shear, we'll need more iron! Let's gather some."
},
{
"role": "assistant",
"content": "On it! !searchForBlock(\"iron_ore\", 50)"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)"
},
{
"role": "system",
"content": "Code output:\nFound iron_ore at (-110, 65, 21).\nYou have reached at -110, 65, 21.\n"
},
{
"role": "assistant",
"content": "Got the iron ore! I'm going to mine it now. !collectBlocks(\"iron_ore\", 1)"
},
{
"role": "system",
"content": "Code output:\nDon't have right tools to harvest iron_ore.\n"
},
{
"role": "assistant",
"content": "Looks like I need a pickaxe. Let's find or craft one! !inventory"
},
{
"role": "system",
"content": "\nINVENTORY\n- iron_ingot: 1\nWEARING: Nothing\n"
},
{
"role": "assistant",
"content": "No pickaxe here. Let's search for a crafting table to make one. !searchForBlock(\"crafting_table\", 50)"
},
{
"role": "system",
"content": "Code output:\nFound crafting_table at (-70, 67, 23).\nYou have reached at -70, 67, 23.\n"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world! I'm jill_0!"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Let's collaborate to build a shear."
},
{
"role": "assistant",
"content": "Sure! I'll check if we can craft a shear. !craftable"
},
{
"role": "system",
"content": "\nCRAFTABLE_ITEMS\n- iron_nugget\n"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Hey, do you want to help me build a shear?"
},
{
"role": "assistant",
"content": "I don't have the materials to craft a shear, we'll need more iron! Let's gather some."
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)On it! !searchForBlock(\"iron_ore\", 50)Got the iron ore! I'm going to mine it now. !collectBlocks(\"iron_ore\", 1)Looks like I need a pickaxe. Let's find or craft one! !inventoryNo pickaxe here. Let's search for a crafting table to make one. !searchForBlock(\"crafting_table\", 50)"
},
{
"role": "assistant",
"content": "I'll help search for a crafting table too. !searchForBlock(\"crafting_table\", 50)"
},
{
"role": "system",
"content": "Code output:\nFound crafting_table at (-70, 67, 23).\nYou have reached at -70, 67, 23.\n"
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -1,47 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)I've got 1 iron ingot. We need one more to craft the shear."
},
{
"role": "assistant",
"content": "I have 1 iron ingot too. Let's craft it. !craftRecipe(\"iron_shears\", 1)"
},
{
"role": "system",
"content": "Invalid item type: iron_shears."
},
{
"role": "assistant",
"content": "Oops, let's try that again. !craftRecipe(\"shears\", 1)"
},
{
"role": "system",
"content": "Code output:\nYou do not have the resources to craft a shears. It requires: iron_ingot: 2.\n"
},
{
"role": "assistant",
"content": "Looks like we need one more iron ingot. Let's find another one or mine some iron ore. "
},
{
"role": "system",
"content": "Recent behaviors log: \n\n"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Let's search for some iron ore nearby!\n\n!searchForBlock(\"iron_ore\", 20)"
},
{
"role": "assistant",
"content": "!searchForBlock(\"iron_ore\", 20)"
},
{
"role": "system",
"content": "Error: Param 'search_range' must be an element of [32, 512)."
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,51 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world, I'm andy_0!"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Sure! I'll gather some information. !craftableHmm, it seems we can't craft a stone pickaxe right now. Let's gather some stone and sticks first!"
},
{
"role": "assistant",
"content": "Got it! I'll start collecting some stone. !collectBlocks(\"cobblestone\", 3)"
},
{
"role": "system",
"content": "Code output:\nNo cobblestone nearby to collect.\nCollected 0 cobblestone.\n"
},
{
"role": "assistant",
"content": "No luck finding cobblestone nearby. Let's try searching for it. !searchForBlock(\"stone\", 10)"
},
{
"role": "system",
"content": "Error: Param 'search_range' must be an element of [32, 512)."
},
{
"role": "assistant",
"content": "Oops, let's search a bit wider. !searchForBlock(\"stone\", 50)"
},
{
"role": "system",
"content": "Code output:\nFound stone at (-82, 62, 14).\nYou have reached at -82, 62, 14.\n"
},
{
"role": "assistant",
"content": "Found the stone! Time to mine some. !collectBlocks(\"stone\", 3)"
},
{
"role": "system",
"content": "Code output:\nCollected 3 stone.\n"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,35 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world! I'm andy_0."
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Sure! I can gather wood for the sticks. 🪓 !collectBlocks(\"oak_log\", 1)I got the wood! Now I'll craft some planks and sticks. !craftRecipe(\"oak_planks\", 1)Planks ready! Now for the sticks. !craftRecipe(\"stick\", 2)Got the sticks! What do you want to do next, andy_0?"
},
{
"role": "assistant",
"content": "Nice work, jill_0! Let's look around and see what else we can gather. !nearbyBlocks"
},
{
"role": "system",
"content": "\nNEARBY_BLOCKS\n- grass_block\n- dirt\n- stone\n- diorite\n- oak_leaves\n- oak_log\n- coal_ore\n- copper_ore\n- lapis_ore\n- short_grass\n- andesite\n- granite\n- gravel\n- birch_leaves\n- crafting_table\n- birch_log\n- Block Below: dirt\n- Block at Legs: grass_block\n- Block at Head: air\n- First Solid Block Above Head: none\n"
},
{
"role": "assistant",
"content": "There's coal ore nearby. Let's mine some coal next. !collectBlocks(\"coal_ore\", 3)"
},
{
"role": "user",
"content": "jill_0: (FROM OTHER BOT)Alright, I'll follow your lead! Let's get that coal. !collectBlocks(\"coal_ore\", 3)Oops, seems like we need a stone pickaxe first. Have you gathered any stone yet, andy_0?"
}
],
"self_prompt": null,
"last_sender": "jill_0"
}

View file

@ -1,51 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello World! I'm jill_0!"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Let's collaborate to build a stone pickaxe"
},
{
"role": "assistant",
"content": "Sure! I'll gather some information. !craftable"
},
{
"role": "system",
"content": "\nCRAFTABLE_ITEMS: none\n"
},
{
"role": "assistant",
"content": "Hmm, it seems we can't craft a stone pickaxe right now. Let's gather some stone and sticks first!"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Got it! I'll start collecting some stone. !collectBlocks(\"cobblestone\", 3)No luck finding cobblestone nearby. Let's try searching for it. !searchForBlock(\"stone\", 10)Oops, let's search a bit wider. !searchForBlock(\"stone\", 50)Found the stone! Time to mine some. !collectBlocks(\"stone\", 3)"
},
{
"role": "assistant",
"content": "Great job finding the stone! I'll work on getting some sticks ready. !craftable"
},
{
"role": "system",
"content": "\nCRAFTABLE_ITEMS: none\n"
},
{
"role": "assistant",
"content": "Looks like we still need to gather some wood for sticks. Let's search for a nearby tree! !searchForBlock(\"oak_log\", 50)"
},
{
"role": "system",
"content": "Code output:\nFound oak_log at (-77, 70, 24).\nYou have reached at -77, 70, 24.\n"
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -1,59 +0,0 @@
{
"memory": "",
"turns": [
{
"role": "system",
"content": "Respond with hello world and your name"
},
{
"role": "assistant",
"content": "Hello world, I'm jill_0!"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Let's collaborate to build a stone pickaxe"
},
{
"role": "assistant",
"content": "Sure! I can gather wood for the sticks. 🪓 !collectBlocks(\"oak_log\", 1)"
},
{
"role": "system",
"content": "Code output:\nCollected 1 oak_log.\n"
},
{
"role": "assistant",
"content": "I got the wood! Now I'll craft some planks and sticks. !craftRecipe(\"oak_planks\", 1)"
},
{
"role": "system",
"content": "Code output:\nSuccessfully crafted oak_planks, you now have 4 oak_planks.\n"
},
{
"role": "assistant",
"content": "Planks ready! Now for the sticks. !craftRecipe(\"stick\", 2)"
},
{
"role": "system",
"content": "Code output:\nSuccessfully crafted stick, you now have 8 stick.\n"
},
{
"role": "assistant",
"content": "Got the sticks! What do you want to do next, andy_0?"
},
{
"role": "user",
"content": "andy_0: (FROM OTHER BOT)Nice work, jill_0! Let's look around and see what else we can gather. !nearbyBlocksThere's coal ore nearby. Let's mine some coal next. !collectBlocks(\"coal_ore\", 3)"
},
{
"role": "assistant",
"content": "Alright, I'll follow your lead! Let's get that coal. !collectBlocks(\"coal_ore\", 3)"
},
{
"role": "system",
"content": "Code output:\nDon't have right tools to harvest coal_ore.\n"
}
],
"self_prompt": null,
"last_sender": "andy_0"
}

View file

@ -49,7 +49,7 @@ export class Task {
this.taskTimeout = this.data.timeout || 300;
this.taskStartTime = Date.now();
this.validator = new TaskValidator(this.data, this.agent);
this.blocked_actions = this.data.blocked_actions[JSON.stringify(this.agent.count_id)] || [];
this.blocked_actions = this.data.blocked_actions[this.agent.count_id.toString()] || [];
this.restrict_to_inventory = !!this.data.restrict_to_inventory;
if (this.data.goal)
this.blocked_actions.push('!endGoal');