mindcraft icon indicating copy to clipboard operation
mindcraft copied to clipboard

Enhancement: Add recipe suggestions to !craftRecipe failed output

Open TheInvisibleMage opened this issue 1 year ago • 2 comments

At present, if an agent attempts to execute "!craftRecipe" and requests either an item that it does not have the resources for, or cannot be crafted at all, the return message is the same: "You do not have the resources to craft a [item name]". This can cause the agent to get a bit stuck if it's a non-craftable recipe, as (at least in my experience) it will try multiple times to figure out a recipe that works.

I'd suggest the following potential improvements:

  • Create a new response for non-craftable items, something along the lines of "That item is not craftable and must be attained by other means."
  • For craftable items, returning a list of the resources required to craft them.

TheInvisibleMage avatar Sep 26 '24 08:09 TheInvisibleMage

hm which api model u using?

hackeropjohn avatar Sep 26 '24 11:09 hackeropjohn

I'm using Llama-3.1-SauerkrautLM-8b-Instruct.Q5_K_M, running locally. However, the enhancement I've suggested is a modification to the !craftRecipe output, which comes from line 81 of /src/agent/library/skills.js; the model does not affect this output, only receives it.

TheInvisibleMage avatar Sep 26 '24 20:09 TheInvisibleMage

Solved: https://github.com/mindcraft-bots/mindcraft/blob/59835c0005c61e5d22b537b8ddb8de9832da5cb1/src/agent/library/skills.js#L85C9-L85C203

However, there's still an issue with this approach:

Say the bot wants to craft a fletching table, and it has 4 cherry planks and 1 flint. The output will tell it that it needs 4 oak planks and 2 flint, leading the bot to (correctly) obtain another flint, and then mislead itself into searching for oak planks, even if the only wood nearby is cherry.

uukelele-scratch avatar Sep 25 '25 12:09 uukelele-scratch