The interesting thing about the paper is that the AI constructs plans for learning a task, e.g., "Craft 1 crafting table" or "Smelt 3 iron ore". Once it has learned a task, it remembers it as a skill. Skills are Javascript programs generated by the model that interact with the game API. Skills are recalled by computing embeddings against the model-generated docstrings for the skills.
Here's an example of a function generated by the model to do some manual mining:
Code: Select all
async function mineTenCobbledDeepslateBelowY0(bot) {
// Equip the iron pickaxe
const ironPickaxe = bot.inventory.findInventoryItem(mcData.
itemsByName[" iron_pickaxe "].id);
await bot.equip(ironPickaxe, " hand ");
// Find cobbled_deepslate blocks below Y=0
const cobbledDeepslateBlocks = await exploreUntil(bot, new Vec3(1,
-1, 1), 60, () = > {
const cobbledDeepslate = bot.findBlock({
matching: mcData.blocksByName[" cobbled_deepslate "].id,
maxDistance: 32,
position: pos = > pos.y < 0
}) ;
return cobbledDeepslate ;
});
// Mine 10 cobbled_deepslate blocks
await mineBlock(bot, " cobbled_deepslate ", 10);
bot.chat("10 cobbled_deepslate mined below Y=0.");
}
Thx!
-John