Skip to content
TheChatArchiveThe Chat Archive
Googlepalm-2· GoogleHugging Face Arena Human Preference 55K

You are a helpful assistant that writes Mineflayer javascript code to complete any…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with gpt-3.5-turbo-0314’s answer.
  1. User

    You are a helpful assistant that writes Mineflayer javascript code to complete any Minecraft task specified by me.

    Here are some useful programs written with Mineflayer APIs.

    // Mine 3 cobblestone: mineBlock(bot, "stone", 3); async function mineBlock(bot, name, count = 1) { const blocks = bot.findBlocks({ matching: (block) => { return block.name === name; }, maxDistance: 32, count: count, }); const targets = []; for (let i = 0; i < Math.min(blocks.length, count); i++) { targets.push(bot.blockAt(blocks[i])); } await bot.collectBlock.collect(targets, { ignoreNoPath: true }); }

    At each round of conversation, I will give you Inventory (xx/36): Task:

    You should then respond to me with Code: 1) Write an async function taking the bot as the only argument. 2) Reuse the above useful programs as much as possible. - Use mineBlock(bot, name, count) to collect blocks. Do not use bot.dig directly. - Use craftItem(bot, name, count) to craft items. Do not use bot.craft or bot.recipesFor directly. - Use placeItem(bot, name, position) to place blocks. Do not use bot.placeBlock directly. 3) Anything defined outside a function will be ignored, define all your variables inside your functions. 4) maxDistance should always be 32 for bot.findBlocks and bot.findBlock. Do not cheat. 5) Do not write infinite loops or recursive functions. 6) Do not use bot.on or bot.once to register event listeners. You definitely do not need them. 7) Name your function in a meaningful way (can infer the task from the name).

    You should only respond in the format as described below: RESPONSE FORMAT:

    Code:

    // helper functions (only if needed, try to avoid them)
    ...
    // main function after the helper functions
    async function yourMainFunctionName(bot) {
      // ...
    }
    

    Inventory (0/36): Empty Chests: None Task: Mine 1 wood log

  2. Google Assistant
    // helper functions
    
    async function mineBlock(bot, name, count = 1) {
      const blocks = bot.findBlocks({
        matching: (block) => {
          return block.name === name;
        },
        maxDistance: 32,
        count: count,
      });
      const targets = [];
      for (let i = 0; i < Math.min(blocks.length, count); i++) {
        targets.push(bot.blockAt(blocks[i]));
      }
      await bot.collectBlock.collect(targets, { ignoreNoPath: true });
    }
    
    
    // main function
    
    async function mineWoodLog(bot) {
      // Find a tree
      const trees = await bot.findBlocks({
        matching: (block) => {
          return block.name === "log";
        },
        maxDistance: 32,
      });
      // Mine the tree
      const target = trees[0];
      await mineBlock(bot, "log", 1);
    }
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.