Villagers are not the brightest mob in the world. Watched several just fall into a cave they had absolutely no chance to climb up out of on their own and just get mauled. They know nothing about caves being a danger.
For some reason I thought 1.14 had updated their AI.
This is probably referring to the general changes to villagers and villages in 1.14, such as how they now recognize "houses" using beds instead of doors and have "job site" blocks, I don't think there were any actual changes to the general pathfinding algorithm and (at least in 1.6.4) there isn't any code that specifically makes mobs avoid areas like caves, only certain blocks like lava (passive mobs do prefer pathfinding to grass blocks and higher light levels but this still doesn't prevent them from going into caves, and as long as a drop is no more than 3 blocks mobs will jump down even if they can't get back up. They also do not avoid running into each other, with the result that they can be pushed off a cliff/into a cave/lava/etc).
No, Villager AI is some of the worst in the game, they will never even try to avoid hazards, except run away from zombies, but even then they corner themselves into a house that ends up having its door broken down on hard difficulty, and then they get wrecked.
I wouldn't even call it AI, since there's no intelligence in them at all. They expect you, the player to do everything for them.
I've seen them go in and seen them avoid, idek anymore
They don't avoid caves, every time I've been on a world my villagers have fallen into nearby cave systems and ended up being mauled by zombies.
They've always been idiots, and for some reason Mojang seems content on keeping mob AI like this, even though they will give hostile mob every advantage under the sun, by contrast.
Villager AI is no better than animal AI, animals end up putting themselves into dangerous situations too, I've seen rabbits constantly take fall damage after hopping over cliffs, oblivious to the clear hazard in front of them, sheep randomly walk into sweet berry bushes and die, cats will sometimes go underwater and trap themselves underneath a solid block and so on.
Features like this may make kids laugh, but for us grown ups it's an absolute pain in the rear, and causes us to waste more time than we have to just because Mojang is bad at programming game AI, or they simply find amusement out of passive mobs killing themselves because their casual base have simple minds.
if they were naturally respawning mobs I'd find it funny too, but unfortunately they're not.
villagers need to be bred in order to spawn more in survival.
I could forgive their lemming AI a little more if they did respawn naturally,
I mean I do find it funny when Piglin's push each other off cliffs in the Nether,
But the fact that villagers have the potential to wipe themselves out without
your input just for your village being next to a ravine, takes the fun out of it imo.
Villagers are too hard to breed and too fragile, protecting them is always my first move when finding a village.
I usually lock them or board them up in their homes, fence off caves or the perimeter of buildings, and then build defenses, before letting them in. Sieges and raids make this all the more important from 1.12/14 onwards.
They still go into caves. Even zombies and zombie villagers are smarter than them.
That's actually quite ironic, since the main zombie motif for decades has been 'need brains, am dumb'. Villagers become smarter by zombifying, sounds like quite an ego blow (or ego death, haha).
That's actually quite ironic, since the main zombie motif for decades has been 'need brains, am dumb'. Villagers become smarter by zombifying, sounds like quite an ego blow (or ego death, haha).
I wouldn't expect the AI to be any better in bedrock edition, in fact it is likely to be much worse because Mojang hasn't patched many of the other glitches that have persisted for so long in that iteration of the game.
When worlds function normally it is more optimized, performance wise,
but it is also less stable, blocks keep disappearing at random, this has been mentioned both on bug tracker and these forums.
Giving mobs smarter AI won't resolve these problems, but it would make the game less annoying and less of a stress producer.
no, they just wander about wherever they want to go
Rollback Post to RevisionRollBack
The world's fate is in our hands, it's our responsibility to ensure that it's going in the right direction. We decide what to do now, and what we do now will affect everyone that comes after us. Our actions ripple through time, will we risk a worse future for everyone through pettiness, selfishness, and foolishness, or will we push for a better society for all? What I ask, do we peril, or do we prevail? Will we build this world from the ashes, will we further send it into ruins, or does fate have other plans for us?
no, they just wander about wherever they want to go
They do that because they have no path finding, Mojang evidently either forgot to or didn't care to add in code that forces Villagers to evade hazards or holes they cannot escape from. It's artificial difficulty, something players have absolutely no control over. Cheapness like this has no place in any game, let alone Minecraft.
They do that because they have no path finding, Mojang evidently either forgot to or didn't care to add in code that forces Villagers to evade hazards or holes they cannot escape from. It's artificial difficulty, something players have absolutely no control over. Cheapness like this has no place in any game, let alone Minecraft.
Villagers and zombies use the exact same pathfinding code, as do all other mobs, except for "old AI" mobs prior to 1.8, which were truly dumb - in fact, in 1.6.4 zombie pigmen won't even pathfind around a simple 2 block high barrier that is only one block wide with a clear path to either side since they only attempt to take a straight line path towards a target. Nor do they avoid falls of more than 3 blocks, which zombies and villagers do; however, they will still take 2-3 block drops even if that means they can't get out, unless they point they are pathfinding to is on the other side of the hole (that is to say, if the AI chooses a destination inside a hole it will pathfind to it, but if it is on the other side then they go around since there is no valid path out of it).
That said, I've made some changes that attempt to reduce the chance of villages pathfinding into caves; they will avoid any locations below sea level, preferring higher locations instead, as well as areas with a light level of at least 8:
// Discourages villagers from pathfinding to areas below sea level (Overworld only) and dark areas (7 or less)
public float getBlockPathWeight(int x, int y, int z)
{
x = Math.min(8, this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)));
if (this.dimension == 0) y -= ChunkProviderTMCW.getSeaLevel();
return (float)(y >= 0 ? x : y);
}
This still doesn't fix the case where mobs can push each other down cliffs; quite often when I'm exploring a ravine open to the surface mobs will fall to their death even though they would never willingly drop down (often this is due to mobs dropping down onto a ledge 2-3 blocks below the surface, then when another mob joins them one gets pushed off). One possible fix is to check if a path can be taken in reverse and if not cancel it.
Just wondering because I am making builds nearby and do not want to board the caves up, nor do I want them injured.
Nope, they go freely if the cave is in their normal wander radius.
Try to fence them or spawnproof the part of cave in their wander radius.
This article on the wiki is a good starter on the subject: https://minecraft.gamepedia.com/Villager#Behavior
Villagers are not the brightest mob in the world. Watched several just fall into a cave they had absolutely no chance to climb up out of on their own and just get mauled. They know nothing about caves being a danger.
Dumb Lame Selfie Insta: @SadGirl.owo
Well I mean I asked that like a year ago but yeah it's still true, their AI is scuffed.
It actually doesn't mention that but yeah, thanks.
For some reason I thought 1.14 had updated their AI.
This is probably referring to the general changes to villagers and villages in 1.14, such as how they now recognize "houses" using beds instead of doors and have "job site" blocks, I don't think there were any actual changes to the general pathfinding algorithm and (at least in 1.6.4) there isn't any code that specifically makes mobs avoid areas like caves, only certain blocks like lava (passive mobs do prefer pathfinding to grass blocks and higher light levels but this still doesn't prevent them from going into caves, and as long as a drop is no more than 3 blocks mobs will jump down even if they can't get back up. They also do not avoid running into each other, with the result that they can be pushed off a cliff/into a cave/lava/etc).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
No they always tend to get in trouble
No, Villager AI is some of the worst in the game, they will never even try to avoid hazards, except run away from zombies, but even then they corner themselves into a house that ends up having its door broken down on hard difficulty, and then they get wrecked.
I wouldn't even call it AI, since there's no intelligence in them at all. They expect you, the player to do everything for them.
I have never seen them do that. If they were pretty near a cave then there is a small chance but I don't think they are that stupid.
Wobbler2010
Gaming Amigos: https://www.youtube.com/channel/UCqTg1VgY9V5Huz21SvGUV9Q
How To: https://www.youtube.com/channel/UCemWuCKsbK-uYxczy2Vu9Lw
I've seen them go in and seen them avoid, idek anymore
They don't avoid caves, every time I've been on a world my villagers have fallen into nearby cave systems and ended up being mauled by zombies.
They've always been idiots, and for some reason Mojang seems content on keeping mob AI like this, even though they will give hostile mob every advantage under the sun, by contrast.
Villager AI is no better than animal AI, animals end up putting themselves into dangerous situations too, I've seen rabbits constantly take fall damage after hopping over cliffs, oblivious to the clear hazard in front of them, sheep randomly walk into sweet berry bushes and die, cats will sometimes go underwater and trap themselves underneath a solid block and so on.
Features like this may make kids laugh, but for us grown ups it's an absolute pain in the rear, and causes us to waste more time than we have to just because Mojang is bad at programming game AI, or they simply find amusement out of passive mobs killing themselves because their casual base have simple minds.
if they were naturally respawning mobs I'd find it funny too, but unfortunately they're not.
villagers need to be bred in order to spawn more in survival.
I could forgive their lemming AI a little more if they did respawn naturally,
I mean I do find it funny when Piglin's push each other off cliffs in the Nether,
But the fact that villagers have the potential to wipe themselves out without
your input just for your village being next to a ravine, takes the fun out of it imo.
Looks like the person I was quoting deleted their post.
Villagers are too hard to breed and too fragile, protecting them is always my first move when finding a village.
I usually lock them or board them up in their homes, fence off caves or the perimeter of buildings, and then build defenses, before letting them in. Sieges and raids make this all the more important from 1.12/14 onwards.
You weren't near a ravine, but one villager near your building site jumped in a ravine...okay?
How were you spawning villagers, was this creative mode? Or did you find a way to farm their breeding patterns somehow??
They still go into caves. Even zombies and zombie villagers are smarter than them.
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
https://minecraftnoobtest.com/test.php
That's actually quite ironic, since the main zombie motif for decades has been 'need brains, am dumb'. Villagers become smarter by zombifying, sounds like quite an ego blow (or ego death, haha).
I wouldn't expect the AI to be any better in bedrock edition, in fact it is likely to be much worse because Mojang hasn't patched many of the other glitches that have persisted for so long in that iteration of the game.
When worlds function normally it is more optimized, performance wise,
but it is also less stable, blocks keep disappearing at random, this has been mentioned both on bug tracker and these forums.
Giving mobs smarter AI won't resolve these problems, but it would make the game less annoying and less of a stress producer.
no, they just wander about wherever they want to go
The world's fate is in our hands, it's our responsibility to ensure that it's going in the right direction. We decide what to do now, and what we do now will affect everyone that comes after us. Our actions ripple through time, will we risk a worse future for everyone through pettiness, selfishness, and foolishness, or will we push for a better society for all? What I ask, do we peril, or do we prevail? Will we build this world from the ashes, will we further send it into ruins, or does fate have other plans for us?
Go try out my server, Andromedacraft!
They do that because they have no path finding, Mojang evidently either forgot to or didn't care to add in code that forces Villagers to evade hazards or holes they cannot escape from. It's artificial difficulty, something players have absolutely no control over. Cheapness like this has no place in any game, let alone Minecraft.
Villagers and zombies use the exact same pathfinding code, as do all other mobs, except for "old AI" mobs prior to 1.8, which were truly dumb - in fact, in 1.6.4 zombie pigmen won't even pathfind around a simple 2 block high barrier that is only one block wide with a clear path to either side since they only attempt to take a straight line path towards a target. Nor do they avoid falls of more than 3 blocks, which zombies and villagers do; however, they will still take 2-3 block drops even if that means they can't get out, unless they point they are pathfinding to is on the other side of the hole (that is to say, if the AI chooses a destination inside a hole it will pathfind to it, but if it is on the other side then they go around since there is no valid path out of it).
That said, I've made some changes that attempt to reduce the chance of villages pathfinding into caves; they will avoid any locations below sea level, preferring higher locations instead, as well as areas with a light level of at least 8:
This still doesn't fix the case where mobs can push each other down cliffs; quite often when I'm exploring a ravine open to the surface mobs will fall to their death even though they would never willingly drop down (often this is due to mobs dropping down onto a ledge 2-3 blocks below the surface, then when another mob joins them one gets pushed off). One possible fix is to check if a path can be taken in reverse and if not cancel it.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Looks like it's hard to 'fix' villagers.
Boarding up the cave it is.