diff --git a/.gitignore b/.gitignore index 22d104f..7a030f5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ services/viaproxy/viaproxy.yml tmp/ wandb/ experiments/ + diff --git a/multiagent_crafting_tasks.json b/multiagent_crafting_tasks.json new file mode 100644 index 0000000..5d3bf0c --- /dev/null +++ b/multiagent_crafting_tasks.json @@ -0,0 +1,43 @@ +{ + "multiagent_techtree_1_stone_pickaxe": { + "conversation": "Let's collaborate to build a stone pickaxe", + "agent_count": 2, + "initial_inventory": { + "0": { + "wooden_pickaxe": 1 + }, + "1": { + "wooden_axe": 1 + } + }, + "blocked_actions": { + "0": [], + "1": [] + }, + "target": "stone_pickaxe", + "number_of_target": 1, + "type": "techtree", + "timeout": 20 + }, + "multiagent_techtree_1_shears": { + "goal": "Collaborate with other agents to build a shear.", + "conversation": "Let's collaborate to build a shear.", + "agent_count": 2, + "initial_inventory": { + "0": { + "iron_ingot": 1 + }, + "1": { + "iron_ingot": 1 + } + }, + "blocked_actions": { + "0": [], + "1": [] + }, + "target": "shears", + "number_of_target": 1, + "type": "techtree", + "timeout": 20 + } +} \ No newline at end of file diff --git a/src/agent/agent.js b/src/agent/agent.js index d394dde..3e26dee 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -92,7 +92,6 @@ export class Agent { this.startEvents(); // this.task.initBotTask(); - if (!load_mem) { this.task.initBotTask(); } diff --git a/src/agent/self_prompter.js b/src/agent/self_prompter.js index eb18407..19ead75 100644 --- a/src/agent/self_prompter.js +++ b/src/agent/self_prompter.js @@ -124,6 +124,7 @@ export class SelfPrompter { this.stopLoop(); this.state = STOPPED; } + async pause() { this.interrupt = true; await this.agent.actions.stop(); diff --git a/src/agent/tasks.js b/src/agent/tasks.js index 7057f6a..9474a06 100644 --- a/src/agent/tasks.js +++ b/src/agent/tasks.js @@ -102,7 +102,7 @@ export class Task { bot.chat(`/clear ${name}`); console.log(`Cleared ${name}'s inventory.`); - + //kill all drops if (this.agent.count_id === 0) { bot.chat(`/kill @e[type=item]`);