Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent starts building and then somehow stops even though it is still executing the code. #90

Closed
Luca-Girotti opened this issue May 21, 2024 · 1 comment

Comments

@Luca-Girotti
Copy link

I am currently experimenting both the gpt 4o and the 4-turbo and after it starts building, it basically stops and has the running effect (check the picture)

bug minecraft

these are also the logs:
{
role: 'user',
content: 'Topo1717: with what you have in your inventory, please build me a short cute tiny house, with also internal decorationsw'
},
{
role: 'assistant',
content: "Absolutely! I'll get started on your tiny house right away. 🏠 !newAction"
},
{
role: 'system',
content: 'Code generation started. Write code in codeblock in your response:'
}
]
Received.
Generated code: """
const buildTinyHouse = async (bot) => {
const position = world.getPosition(bot);
const startX = position.x;
const startY = position.y;
const startZ = position.z;
const width = 5;
const depth = 5;
const height = 3;

// Build the floor
for (let x = startX; x < startX + width; x++) {
    for (let z = startZ; z < startZ + depth; z++) {
        await skills.placeBlock(bot, 'spruce_planks', x, startY, z);
    }
}

// Build the walls
for (let x = startX; x < startX + width; x++) {
    for (let y = startY + 1; y < startY + height; y++) {
        for (let z = startZ; z < startZ + depth; z++) {
            // Leave a space for the door
            if ((x === startX || x === startX + width - 1 || z === startZ || z === startZ + depth - 1) && !(x === startX + 2 && z === startZ && y === startY + 1)) {
                await skills.placeBlock(bot, 'birch_planks', x, y, z);
            }
        }
    }
}

// Build the roof
for (let x = startX; x < startX + width; x++) {
    for (let z = startZ; z < startZ + depth; z++) {
        await skills.placeBlock(bot, 'oak_stairs', x, startY + height, z);
    }
}

// Place the door
await skills.placeBlock(bot, 'jungle_door', startX + 2, startY + 1, startZ);

// Internal decorations
// Place a bed
await skills.placeBlock(bot, 'red_bed', startX + 1, startY + 1, startZ + 1);

// Place a chest
await skills.placeBlock(bot, 'chest', startX + 3, startY + 1, startZ + 1);

// Place an enchanting table
await skills.placeBlock(bot, 'enchanting_table', startX + 1, startY + 1, startZ + 3);

// Place a furnace
await skills.placeBlock(bot, 'furnace', startX + 3, startY + 1, startZ + 3);

// Place an armor stand
await skills.placeBlock(bot, 'armor_stand', startX + 2, startY + 1, startZ + 2);

};

await buildTinyHouse(bot);"""
executing code...

placing block...
placing block...
placing block...
placing block...
placing block...

@kolbytn
Copy link
Owner

kolbytn commented May 30, 2024

This is a common issue and is caused by the pathfinder. I haven't found a good fix yet other than restarting the bot.

@kolbytn kolbytn closed this as completed Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants