Hi :)
Not sure where to put this and I feel like the talk page is getting more and more nested.
Regarding Mob AI
I'm not familiar with the bedrock ecosystem at all, but I found some resources which might be of interest?
These are mainly for creating add-on for bedrock I think, but microsoft's articles still contain some generic descriptions of various systems in the game.
For example, the barter goal links to this piglin file: https://github.com/Mojang/bedrock-samples/blob/preview/behavior_pack/entities/piglin.json
Now my question is: are these actually describing/completely identical to how things work in-game, or are they more like "here's how you can mimic vanilla behaviour with add-on" and not necessarily how the behaviour is actually implemented?
Even if it's the latter, I think it's still a good resource to suggest what and where to look or test.
And this article suggests that these are vanilla details, but there may be some internal stuff going on in the code that we are still not privy to, so the game can still do things on top of these files that result in the actual behaviours we can observe in-game.
I think the add-on article on this wiki is actually a good starting point, I'm learning about this stuff as well.
Regarding Pathfinding
There's reference to the "pathfinder" there, and the preferred path also associate "costs" to different blocks.
WaterGenie3 (talk) 20:28, 1 October 2025 (UTC)
- About the mobs you’ve listed as using Brain AI. From studying the Zoglin’s behavior, it doesn’t seem to use Brain AI in any form.
- The only thing a Hoglin uses Brain AI for, as far as I can tell by studying its behavior, is broadcasting anger to other Hoglins when it gets hit. It seems that Zoglins lose that ability (although it doesn’t affect gameplay because Zoglins attack everything anyway). As far as I can tell on Bedrock, Zoglins use purely Goal AI. If you notice something I missed, please tell me.
- Of course, the Hoglin and Zoglin articles both say that these mobs do not actively pursue and attack a player that it is leashed to. I’ve tested and disproved this on Bedrock, but it may still happen on Java. It’s possible, therefore, that Java Zoglins (and Hoglins) use Brain AI to detect whether they are leashed to a player or not before selecting a target. DKRap064 () 02:29, 2 October 2025 (UTC)
- I don't think we have to distinguish them for bedrock, all this brain vs goal thing is purely just different ways that mob behaviours are defined in java. Both are still used to describe general behaviours like finding and attacking the nearest target, fleeing from entities they fear, etc.
- Under the hood, goals are structured as one big priority list of behaviours.
- E.g. cows have panic goal with priority 1 if it's damaged and random wandering goal with priority 5.
So if it's damaged, it will panic because that goal has higher priority. But if it's not damaged, the goal will be skipped and it will just go down the priority list to check which goal should be run and will end up with the random wandering goal if there's nothing else with higher priority to do.
- Brains are structured as (roughly speaking, I still have to look into them) a list of activities that contain their own list of behaviours associated with that activity.
- E.g. hoglins have idling and avoiding activities. I don't know too much beyond this, but it still allows them to move away from things or randomly walk around. Just described in slightly more structured way in groups of activities, so more complex behaviours could be modeled more easily as well.
- With java, I was mostly concerned with how exactly do these 2 systems function because we need to understand both to fully understand the bahaviour of all mobs.
Whereas bedrock could very well just have one mob ai system that's already good enough that they didn't find the need to create another system, whether it's called "brain", "goal", "ai", it's still independent of the brain vs goal distinction on java. WaterGenie3 (talk) 03:50, 2 October 2025 (UTC)
- The AI Goal link is helpful, but doesn’t necessarily only include “Goal AI” actions — that is, AI actions that do not require Brain AI. At least some of them seem to fall under the “Tasks” section of Brain AI. DKRap064 () 02:38, 2 October 2025 (UTC)
- I’ve spent a while going down the list, but I wonder if we should add actions like breaking down doors to the Goal list. Breeding might fall under Brain, since the mob must detect (sensor action?) another mob of the same kind who is in love mode to breed. Breaking down doors isn’t a Goal in Bedrock (more like certain mobs have a parameter that says they can break down doors), so this is purely for Java. DKRap064 () 12:04, 2 October 2025 (UTC)