Baritone AI pathfinder

Baritone AI pathfinder

72.7k Downloads

Mob avoidance

bphd opened this issue ยท 3 comments

commented

What do you need help with?

With as much detail as possible, describe your question and what you may need help with.

https://github.com/cabaletta/baritone/blob/5eeb33a6f5a971f6052c1a6bf0abc23c3b4f2764/src/main/java/baritone/utils/pathing/Avoidance.java

From what I understood, if avoidance coefficient is at 1.0000...1 the player will not approach mobs nearer than avoidance radius. But if for example the coefficient is 0.5, he will not approch them closer than half the setted radius, if coeff at 2, not nearer than 2 times the setted radius...

I'm I right?

If i'm right, why have setted such a coefficient? Why not just asks for a radius to respect? What does it change in both situation? I mean, coeff=2 radius=3 equals to radius=6. I can acheive same parameters without coefficient. If it was to toggle it, you should replace coefficient with a toggle boolean simply. Because this avoidance function is not well documented at all, appart from dark old topic where someone have to directly ask it and he got an evasive reply, but anyway. So normal people not going to reverse engineer the program and without documentation will think that 1 coeff is to have a neutral coefficient, not to deactivate the function. And the cherry on the cake is that baritone already have a general toggle function for all functions, so yeah, whats the point of this coefficient?

And I think that default parameter of spawner and mob should be set accordingly to minecraft radius where mob spots the player, because even if spawner spawn mobs, if you're to far for them to see you it's not a problem. So it resolves both problems. I know it's relative to difficulty and maybe each mob capacities, so I suggest to set it by default for hardcore mob and for mob that see the farthest

Something else, I see that the passive/agressive mob list (enderman, spiders...) is really thin. Last minecraft update have given more new passive/agressive mobs, so it should be updated accordingly

Does cave spider count as passive/agressive? It seems that they are aggressive all the time

Final checklist

  • I know how to properly use check boxes
  • [ x] I have not used any OwO's or UwU's in this issue.
commented

You are wrong. The coefficient is a factor applied to all movement costs within radius around the position being avoided. That means if you set the coefficient to 2 and the radius to 10 it will act as if everything it does within 10 blocks of a monster took twice the amount of time.

Your second point is correct. There are a few neutral mobs missing on the list.

No, cave spiders are aggressive.

commented

Okay so the player will not absolutely dodge a mob detection radius
If a path cost an infinite time and an other path with a mob will cost a finite time, he will prefer the mob path
And on an infinite time it 100% leads to death
That replies partly to an other issue I opened
From my personal experience, with only baritone, the player never have survived to a mob path choice (and with a trainer/launcher it's specifically the skeleton who kills even with mob automatic protection), so from my opinion this choice make avoidance unsafe in the absolute, or even not safe for a reasonable amount of time (I never reached more than 15 minutes without ended being killed, but I for sure can expand that time with crazy radius and coefficient, but baritone stops instead of walk to generate new chunks to find blocks, so it's not a solution neither)

And what about default setted radius? Does it respect the worse mob and worse difficulty?
What about merging spawner and mob parameter?

What about the toggle at 1 considering that there's already a global toggle in baritone? Or maybe it's not really a toggle and just the fact that the radius cost as much as any other places (neutral coeff)?

What about documenting avoidance in manual?

And a little detail, idk if mob spawner name have changed or what, but barotone doesn't dodge mob spawner at all, something to look at

commented

Make a new issue to correct the anger level of the other mobs