Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

More inteligent backfill

Alacaster opened this issue ยท 1 comments

commented

Describe your suggestion

Simulate or devise an algorithm that doesn't block off areas that will be filled in the future.

Each block placement - Multi layer checks, starting with simpler ones first?
"Will this placement separate the cavity I'm in into two cavities?" (a cavity is defined by spreading a 1x2x1 block out in every direction as long as it's on the ground and it's allowed to teleport to places it's already been (blue space), then a 1x1x1 but at most 4 blocks away from the blue space. ("ray traced" from the centers of blocks on the outside surface; pythagorean theorem shit) Or will this block placement remove from this space more than 1 block? maybe find a way to remove blocks in batches.

If this is true how do we handle that? Map what placements will and won't as we place blocks in another thread for anywhere we're not near then cache them. prefer to start with blocks on the edge of this but don't move if we have to to place on the outside unless there's no more non blue space blocks. This isn't perfect but it doesn't cause any issues and will decrease bad placement hits by a lot. There's no point in checking after each placement more then 7 blocks away right? We want to place a block in the cavity that we would have created by a theoretical bad placement, so pick the closest one in that cavity and try again?

Settings

Use this setting for backfill? Does current backfill just replace blocks that we just mined that we also aren't standing in? This creates infinite loops in some cases.

Context

This would make filling in areas of all types besides tunnels when traveling long distances actually possible in reasonable time frames.

Thank you, please tell me if I'm being stupid and why.

commented

Are you talking about filling areas with BuilderProcess (#sel and #build) or about BackfillBehavior (#set backfill)?

Backfill really just remembers which blocks turned into air while you were looking at them (usually that means you mined the block) and if they are not part of the current movement it places them back. As far as I know does not create infinite loops, unlike the builder which is really prone to those.