Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Dealing with sculk sensors and shriekers

ruben-hude opened this issue ยท 4 comments

commented

Describe your suggestion

Make Baritone capable of avoiding triggering sculk sensors and sculk shrieker by sneaking or using wool.

Settings

There could be an avoidTriggeringSculkSensors setting that would avoid them in any situation and an avoidSummoningWarden one that would do its best to avoid triggering sculk shriekers and when it's not possible to complete the task without doing so, count the number of times the shriekers have been activated and wait 10 minutes without making noise to reset the counter.
avoidTriggeringSculkSensors would be set to false by default, and avoidSummoningWarden to true.

Context

Using Baritone in the latest versions of the game for mining or any other task that happen deep underground can now be dangerous since it can sometimes summon a warden which kills the player.

commented

Could add sculk sensors and shriekers to avoidance, but it I guess it would come at an even higher performance cost than mob / mobspawner avoidance because the range has to be higher.

It should also be possible to always sneak when near a sculk sensor / shrieker, rather than only if a warden is about to spawn. Counting is more difficult and more dangerous.

commented

I was just thinking about how to overhaul avoidance and I think the idea is to change the lookup map key from XYZ to just XY - it wouldn't be that big of a performance drop even if we still wanted to check Y. And then creating the map is O(r^2) instead of O(r^3)

commented

So if I'm expanding a node at x,y,z I'd look up x,z in the map and find a list of entries with different y values so I can then calculate the avoidance at x,y,z from that?
Would definitely speed up building the map and as long as only one or two avoidance sources are present in a column this wouldn't hurt lookup much, but if I turn on mobAvoidance that's not quite the case.
Not checking y is not an option, even more so on 1.17+ because people really don't care about monsters and shriekers 200 meters below their feet.

Speaking of overhauls: I don't think avoidance does what is needed to do it's job. It leads to poor avoidance at low coefficients and if you turn it too high it will even refuse to walk away from places of danger. It would help if avoidance was directional so walking towards trouble could have super high cost but walking away stays unchanged (or slightly lower). Can't have walking away be super cheap because that would cancel out the cost of walking into the bad zone and end up not doing anything.

commented

directional is good - high cost moving towards the center, normal cost moving away

Yeah it would be something like a map where the key is (x,z) and the value is.... i don't know, perhaps simply List<Avoidance>. Y would still be checked while expanding a node, just as a second step.