Why animals like walking uphill in Minecraft

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • Just trying to find where exactly my sheep ran off to.
    You can explore this creative world yourself: www.planetmine...

КОМЕНТАРІ • 707

  • @2No2Name
    @2No2Name Рік тому +5111

    13:00 You wrote someone should check the code on this. I did now:
    Animals like to pathfind to grass blocks more than other blocks. Grass blocks have a score of 10. Other blocks have a score of: h = g - 0.5 . g = f / (4 - 3*f) with f = light level / 15 . In the nether: h = g * 0.9 + 0.1 - 0.5
    When pathfinding 10 random positions in the search range are tested and scored. If the position fails the test, it will not be scored. The one with the highest score is chosen as destination (if any position was scored). This probably explains that they prefer surface blocks, because they have a higher light level, and thus the highest score. The position test is:
    Position not outside the world height. Position within some spherical range. Block below is opaque full cube. Position has no pathfinding penalty (cactus, lava, water, etc).
    I am not sure whether there is anything in the code that causes the animals to search upwards from the chosen destination. I did not find that at least.
    I think testing this in the end dimension where there is no skylight might be interesting to avoid this light dependent scoring.
    Edit: found the upwards search.
    After choosing the position using the scoring, the position is modified:
    While the block's material at the position is solid, move the position one up. If the position is outside the world height, exit the loop.
    If the resulting position doesn't have water and doesn't have a pathfinding penalty the animal pathfinds to it, otherwise no pathfinding

    • @whitestonejazz
      @whitestonejazz  Рік тому +1165

      Many thanks for looking into this. This block selection process is extremely interesting. And, if you don't mind the compliment, you are truly a wizard.

    • @alextempletYT
      @alextempletYT Рік тому +187

      So this whole 15 minute video was speculation of this code here?

    • @kimtae858
      @kimtae858 Рік тому +83

      @@alextempletYT Yep

    • @alextempletYT
      @alextempletYT Рік тому +15

      @@kimtae858 definition of overcomplicating things lmao

    • @2No2Name
      @2No2Name Рік тому +368

      @@alextempletYT No. When reading the code it is hard to predict what the end result will be. The code is one big spaghetti mess, and when reading you often have to skip something. The testing actually shows what happens, but since there is so much randomness involved, it often is also hard to tell from testing

  • @darthfastball1150
    @darthfastball1150 Рік тому +8240

    I wonder if the increase in likelihood to walk uphill was purposeful to keep peaceful mobs out of caves and on hills to be more visible

    • @lucaspawprint1888
      @lucaspawprint1888 Рік тому +386

      Imagine they add hawks to Minecraft... 💀

    • @jort93z
      @jort93z Рік тому +656

      Honestly, unlikely imo.
      They already only spawn on grass, and only move if a player is close.
      If this was on purpose, they'd have chosen an easier way to do it. It likely just happened and they were fine with it.

    • @anthonymorris8891
      @anthonymorris8891 Рік тому +149

      Not a bad theory, but if it were true we'd never see passive mobs in caves. The exception is chickens because of jockeys.

    • @s0r03
      @s0r03 Рік тому +93

      Not true necessarily because mobs sometimes spawn on random grass in caves and can't get out but they also fall down ravines and such and similarly can't escape

    • @xiphosura413
      @xiphosura413 Рік тому +62

      That was probably the purpose of their preference for well-lit blocks.

  • @Mogswamp
    @Mogswamp Рік тому +293

    New favorite type of Minecrafter unlocked: cool math substitute teacher

  • @amehwican
    @amehwican Рік тому +5366

    You should do this with sheep and color them depending on their position to make it easier to see who went where

  • @lucaspawprint1888
    @lucaspawprint1888 Рік тому +1334

    I'm making my farms out of glass now, so the animals will STAY PUT!
    I've never seen mobs so controlled and behaved in my entire 8 years of playing. Thank you for this.

    • @ImJustBag
      @ImJustBag Рік тому +9

      Don't mobs like- Not spawn on glass?

    • @lucaspawprint1888
      @lucaspawprint1888 Рік тому +138

      @@ImJustBag Correct. I would just lure them into an elevated platform and multiply them from there.

    • @dsnineteen
      @dsnineteen Рік тому +42

      This was my instinct, too. Stay still damnit, I’m trying to shear you! 😂

    • @onyxtay7246
      @onyxtay7246 Рік тому +75

      You can also play with alternative platforms. Mobs can't pathfind onto carpets which are supported by string.
      This also affects endermen, so you can have a 100% safe enderman farm by just making sure all of the blocks within teleportation range are actually just carpets.

    • @lucaspawprint1888
      @lucaspawprint1888 Рік тому +25

      @@onyxtay7246 Now that you mention alternatives, I think leaves are probably the most efficient for resourceful large quantities.

  • @arcturuslight_
    @arcturuslight_ Рік тому +1611

    When testing the way mobs behave on double-stacked carpet, I learned that information on MC wiki on it is old. As far back as 1.16, mobs are now fine with walking off cliffs as high as 3 blocks, and thus are not scared by the trench under carpets.
    What this means is that if a mob wonders about near a staircase that is more than a block steep, it will be able to randomly walk down the stairs, but will not be able to climb back up. This is a very annoying problem, I have dozens of villagers and iron golems of my village stuck inside a river with steep banks. They just keep replacing their stuck brethren with new ones. And any time I have a 2-block deep hole of any size for any reason within a chunk from a village, it soon begins filling up with villagers. They also keep falling off taller cliffs into a ravine, because they keep jumping onto ledges on the cliff where they can get to, but get stuck, and later the next villager jumps onto them and pushes the other down. I have a bunch of fall-damaged villagers down my ravine.
    I was hoping someone investigates why this self-destructive pathfinding is a thing, and maybe incentivises bugfixing it. If villagers were not trying to end themselves constantly, I would be perfectly fine with not locking them up in 1x1 holding cells.

    • @Solesteam
      @Solesteam Рік тому +1

      So basically you run a Minecraft insane asylum for the mentally disturbed.

    • @Pystro
      @Pystro Рік тому +133

      You as the player can just "toddler-proof" all spots: make sure that any spot is either more than 3 blocks below any neighboring blocks, or that it can be left (make sure that mobs can get out of any holes, or have at least one way up from any cliffs).
      A way to fix mob pathfinding would be to change the code as follows:
      First, mobs pick a solid block in their vicinity and determine the closest surface block to that position (as they do now).
      Then, they check if they can find a path from their current position to that surface block (as they do now).
      Then, they check if they can find a path from that target surface block _back_ to their current position. If they can't get back, it means the new position would get them trapped (or is outside of their current enclosure). In that case they abort trying to pathfind there. (Or maybe they have a 99% chance to abort and a 1% chance to feel adventurous.)
      If the above checks succeed, they actually walk (and possibly drop) to their target (as they do now).
      The disadvantage with this fix would be that mobs stuck on a roof or similar would refuse to jump off. But they could still be pushed off (by the player, other mobs, or redstone contraptions).

    • @wuketuke6601
      @wuketuke6601 Рік тому +24

      Its like those frog buckets at the side of roads. U gotta babyproof everything for them

    • @Sollace
      @Sollace Рік тому +48

      Oh hey, that explains why I had a world where all the villagers had gathered themselves into the same 4x4x2 deep hole!

    • @Nevir202
      @Nevir202 Рік тому +11

      @@Pystro I think you could simplify the process, skip pathfinding from current location to new location, and ONLY try to pathfind from destination back to origin, if that works, take that path in reverse.

  • @jonasl.4810
    @jonasl.4810 Рік тому +376

    I like how you could technically find caves by spawning sheep and seeing where they will go.

    • @bobchipman4473
      @bobchipman4473 Рік тому +122

      Sheep dowsing.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому +1

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

    • @Carbine64
      @Carbine64 5 місяців тому

      Nah ​@@fairykeibani9155

  • @Halal_Gaming
    @Halal_Gaming Рік тому +459

    I once had a small village with a hill in the centre, and for whatever reason all the villagers without fail would immediately gravitate towards that one hill. This video explains why perfectly.

    • @dylanpelo
      @dylanpelo Рік тому +44

      Same, except there was always ONE villager who would walk right in front of me while I was trying to build. He mysteriously lost a fight to lava...

    • @Nate-bd8fg
      @Nate-bd8fg Рік тому +5

      Also depending on the version villagers like to congregate at certain times of day at the "village center"

    • @nightglide_
      @nightglide_ Рік тому +2

      @@Nate-bd8fg that's a special part of villager AI unique to villagers

    • @Nate-bd8fg
      @Nate-bd8fg Рік тому +2

      @@nightglide_ yeah I was explaining why he may have been mistaken

    • @gristen
      @gristen Рік тому +8

      @@Nate-bd8fg the village center is where ever the town bell is placed so its not much of a mystery when they gather around that. villagers will occasionally congregate together to trade things with each other, but if you see an unusually large amount of villagers gathering somewhere where theres no bell its probably due to something weird going on with their ai

  • @jackwoodhead
    @jackwoodhead Рік тому +536

    Finally an answer for this phenomenon! I've seen this occur all the time in 2 scenarios:
    * Animals in my multiplayer survival world constantly get themselves stuck on a cliff face next to our base
    * In the survival map "Drehmal Primordial" if there are any hills near any towns/villages, they are always littered with cats (and often horses and other animals too) while the surrounding terrain is typically empty
    How weird to know that caves, and filling or not filling in terrain when landscaping, actually affects mob pathfinding! Also I never knew that mobs can pathfind across non-solid blocks but they don't pathfind TO said blocks.

    • @grubbinvgm
      @grubbinvgm Рік тому +9

      I wonder if there's any speedrunning applications to this. If you're searching for a stronghold/cave and notice a hillside where some pigs SHOULD be going on top of (usually), but they aren't, that would mean there's something directly under there, no? Although perhaps strongholds are too far down for the pathfinding to notice.

    • @jackwoodhead
      @jackwoodhead Рік тому +17

      @@grubbinvgm Yeah, strongholds are too far down, plus the rng of the pigs' movement is too high to draw immediately conclusions; I'd imagine you'd have to vigorously study them for hours/days/weeks before you could make an estimated guess at the underground terrain

    • @han-huo
      @han-huo Рік тому +3

      @@grubbinvgm No, I don't think speedrunning will find much use for this. The stronghold is way too deep in the ground, and something like a lava pool is too small and animals are too sparse to be able to figure out anything. I suppose if you hear a lava pool, and see animals hanging around the general area of the sound, you can get a good idea of where the pool isn't located.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @ehitlamopi7682
    @ehitlamopi7682 Рік тому +70

    In the first experiment instead of tracking pigs tracking sheep dyed to match the color of the block they're standing on could've given more interesting results, since you could see the original position of a mob easily.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @thegammakat
    @thegammakat Рік тому +166

    My biggest issue with this pathfinding is that it also applies to bees. I'll have bees leaving their hives just to go to the mountian next door where they just get lost. Even when i built a glass roof around the forest, they found small ways to get out and just would go right up the mountain. Kinda werid ams suchs with animals that are more free roam with farming. (Given this is on 1.17, but i still have a degree of this issue on 1.19)

    • @willowleftweeping
      @willowleftweeping Рік тому +12

      Had the same problem except I let the bees win and moved everything to the top of the hills nearby

    • @theapexsurvivor9538
      @theapexsurvivor9538 Рік тому +18

      Bees really need a "return to last hive" loop that runs if they can't find a hive at night. Just check if there's a hive at the coordinates of the last hive they left, then pathfind back, not stopping till they arrive.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @awfulroffle
    @awfulroffle Рік тому +7

    That explains why all of my animals tend to congregate on decorative hay in the farm pens. Still frustrating, wish I could fix that, but at least there's a study explaining it lol

  • @toastywarm5564
    @toastywarm5564 Рік тому +245

    ahhh ive always wondered about this! my personal fav example of this is endermen in warped forests, the goobers will pathfind up to a tiny corner and just make a right mess with their blocks. i like to call them endermen play pens lmao.
    keep up the good work!!

    • @MrMarttivainaa
      @MrMarttivainaa Рік тому +1

      My sides

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @sethcushman5454
    @sethcushman5454 Рік тому +169

    Maybe the reason mobs look up until they find air because that way they will try to swim in water or lava instead of just swimming to the bottom and drowning.

    • @relzyn5545
      @relzyn5545 Рік тому +6

      Most mobs float in water, so it shouldn't matter for them

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @julesrules7
    @julesrules7 Рік тому +44

    Watching pigs pathfind to certain things wasn't the video I expected to watch today, but it's very welcome.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @Cuestrupaster
    @Cuestrupaster Рік тому +20

    Another thing that might go into consideration is that when there's a 3 block fall mobs "don't path find" through it or at least cancel it, because they know it would cause them to take damage, so if they're standing on a hill where there is a 3 block fall it adds even more odds to going up.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @parzingtheasian
    @parzingtheasian Рік тому +15

    i like this guy. simple, to the point, no fancy editing, no "jokes" which are really cringy, he doesn't try to make boring things interesting, but what he did was interesting, and he shows it to us. very nice

  • @crackedmagnet
    @crackedmagnet Рік тому +61

    It's good exercise to reverse engineer something from experiments and observations and I like what you've done here. I primarily work with bedrock which doesn't decompile nearly as well as java does, so creating experiments to reverse engineer behaviour is technique I use often. (Usually supported by fragments of code for specific details like values)

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @snowinjuly4872
    @snowinjuly4872 Рік тому +340

    This is giving me strong Gnembon vibes! I'm not sure if you've seen it, but he has a video about mob wandering for mob farms, including a couple of designs for blaze farms that use it pretty elegantly.

    • @whitestonejazz
      @whitestonejazz  Рік тому +92

      I have not seen it but am very glad to have learned of it now :-] No surprise to see that gnembon was already aware of the pathfinding details and how to use them in farms (it is also quite reassuring to see that the distances I worked out match up with the distances he described). It was one of ilmango's farms (ua-cam.com/video/gibE51sgutg/v-deo.html) that got me interested in pathfinding. I was trying to redesign his farm so that zombies and other hostile mobs were separated from each other using only pathfinding.

  • @LeeSpork
    @LeeSpork Рік тому +60

    Very interesting! I've actually used something like this before to make a blaze farm, since I heard that blazes will apparently pathfind towards filled-in areas significantly more often than the space they can actually walk around, so I designed my farm so that if they tried to pathfind outside the cage they were in (and towards the solid walls of netherrack surrounding it), their path would always take them over trapdoors that they would fall down. Weirdly, it worked extremely well!
    It's nice to see how the concept works in more detail!

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @DoctorPlasmaMC
    @DoctorPlasmaMC Рік тому +95

    I've known this phenomenon for a long time. FINALLY someone did a formal study of it! Thank you!

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @EdgarsLS
    @EdgarsLS Рік тому +7

    This could allow for some fence-less farm designs, tricking the pathfinder to never go outside a perimeter

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @user-tu2qb3fk9t
    @user-tu2qb3fk9t Рік тому +7

    i've been wondering about this ever since i bred a wolf army and whenever i put down my crafting bench they all started jumping up onto it like it was the best thing ever

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @taupi5246
    @taupi5246 Рік тому +7

    I think the checking for air mechanic was implemented specifically to avoid animals going in cave, which in turn makes them more likely to go uphill. That seems to make sense from an immersion point of view, you don't expect to see a pig wandering about when you're going to mine for iron.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @thatmoththoth
    @thatmoththoth Рік тому +14

    I feel like this would actually end up being very useful for moving villagers and other mobs that are a pain in a butt to move

    • @fairykeibani9155
      @fairykeibani9155 Рік тому +1

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @squiddler7731
    @squiddler7731 Рік тому +43

    8:10 Calling it now before I finish the video: the reason you underestimated the likelihood of them going uphill is because you assumed that they're trying to reach the closest available tile to the one they've targeted based on the stair test. But in reality they're only trying to get as close as possible in the X and Z axis; they'll completely ignore height as long as the tile is still within range (which is the real reason they stopped in that stair test, going up one tile put the target tile out of range)

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @ebouwman034
    @ebouwman034 Рік тому +10

    This is the kind of video that keeps me on UA-cam watching long-ish videos instead of Netflix or TV. People like you making content about kind of ridiculous things but in a very serious and thorough way that does make me think. I’ve never watched any of your other videos but thank you for doing what you do because I love it.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @myld_panic4416
    @myld_panic4416 Рік тому +11

    This is so insanely interesting. Also from a rp builder perspective. It helps to plan out where to terraform and place mobs if you need them to act in a certain way.

    • @jakekeltoncrafts
      @jakekeltoncrafts Рік тому

      RP builder?

    • @myld_panic4416
      @myld_panic4416 Рік тому +2

      @@jakekeltoncrafts Roleplay builder. Like builds that one could use for cinematic videos, lore acting or adventure games

    • @jakekeltoncrafts
      @jakekeltoncrafts Рік тому

      @@myld_panic4416 Ah, that sounds awesome.

  • @xarildri1302
    @xarildri1302 Рік тому +9

    i've been wondering about mob pathfinding mechanics (especially villagers) for so long this video is so insanely interesting to me

    • @sufficient4834
      @sufficient4834 Рік тому +2

      Let me guess, your villagers keep taking fall damage and don't want to go where you want them to go?

  • @vintetia
    @vintetia Рік тому +12

    I used to make 3 block deep chicken pits in the dirt years ago, and I would always put little 1×1 holes in the walls, 1 block above the bottom of the pit, which resulted in the chickens almost always climbing into the holes. I thought it made them 'happy', so I kept doing it and they kept behaving that way.
    This I did on Minecraft PE, so bedrock edition, back when that version was enjoyable to play...
    Good times

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @Electriman17
    @Electriman17 Рік тому +22

    I love this kind of content. It's like doing physics

    • @gkk116
      @gkk116 Рік тому +4

      Because it basically is physics, but instead of nature it's about man-made things.

  • @pi314159265358978
    @pi314159265358978 Рік тому +44

    Awesome video. Always love seeing experiments with MC pathfinding.

    • @vibaj16
      @vibaj16 Рік тому

      hey pi, what you up to these days?

    • @pi314159265358978
      @pi314159265358978 Рік тому +1

      @@vibaj16 Hello :-) Well, in general most of my time is dedicated to my job. Other than that these days in particular I'm playing with AI art generators and making an art piece for my friend's birthday.

  • @user-qn3gd4yy4f
    @user-qn3gd4yy4f Рік тому +4

    I think it'd be cool if mobs had different pathfinding, like goats being more likely to climb for example.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @SaltyCrabOfficial
    @SaltyCrabOfficial Рік тому +1

    Ive know minecraft for so long... never stopped playing the game, searcged through forums, through icebergs, through curiosity videos... ive never realized this... this is... amazing

  • @enbyd
    @enbyd Рік тому +67

    Seeing a lot of comments already touching on ideas I had as well, and nice experimentation on your part.
    As a visualization tool, it may be nice to enable the mob pathfinding ai scarpet script (included with carpet mod).

    • @whitestonejazz
      @whitestonejazz  Рік тому +24

      Many thanks for the tip and the compliment. I am sure there are quite a few carpet mod tools that would be worthwhile to learn and mob ai seems a great place to start. And incidently, if you don't mind a tangent being drawn from you comment, it examples the difference between science and magic quite well. Science meaning drawing general laws from observations and magic being the gaining of power from supernatural inquiry (or as it is called in the TMC, "code-digging"). Ironically, some of my creations have been called "wizardry" when I tend to work more by experimentation and, therefore, as a scientist. The true wizards, those who can peer beyond the veil with decompilation or carpet, are players like 2No2Name.

  • @potatoonastick2239
    @potatoonastick2239 Рік тому +6

    This video blew so far past all my expectations, the part where you figured out the theory live on camera was awesome lmao

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @AfonsodelCB
    @AfonsodelCB Рік тому +4

    before watching the video: mobs in minecraft pathfind to full blocks, even if they have a block on top. so it makes sense that if a sheep has to choose between walking towards a 3D cube of blocks (mountain wall) or a plain surface, it'd choose the wall more often

  • @SpaghettiniFiveMillion
    @SpaghettiniFiveMillion Рік тому +2

    Ok, minecraft has existed for about 12 years and only today did I stumble upon a reverse engineering video of minecraft inside of minecraft. The little tests, and the representations of them in glass blocks, graphs and the colored terrain is just fascinating to see.

  • @JSDFEnthusiast
    @JSDFEnthusiast Рік тому +2

    Dude built out his math.... that's a next level of overachieving I respect it

  • @DerpsWithWolves
    @DerpsWithWolves Рік тому +2

    That 5x increase in pathfinding efficiency right at the end is probably why the system works like this, if I had to guess.

  • @dawn-path
    @dawn-path Рік тому +8

    This is fascinating! The second you got to the 2:1 ratio and showed your graph with the horizontal & diagonal line I caught on. Super cool to have an understanding of this oddity in mob behavior!

  • @whitestonejazz
    @whitestonejazz  Рік тому +26

    To those interested, you can edit Litematica schematics yourself with a Python package called "litemapy". I found it surprisingly easy to use. It's available with pip or from here: github.com/SmylerMC/litemapy

  • @zebraagent
    @zebraagent Рік тому +1

    I have never thought that passive mob AI pathfinding would be so interesting to learn! Great video!

  • @totallyrealcat4800
    @totallyrealcat4800 Рік тому +6

    Based on what you said at the end of the video, I think that means that you might be able to find caves by finding spots where the animals like to hang out. What you said at the end of the video also matches with my experience in Minecraft because I remember that it is common to find animals around cave entrances.

  • @michaellaufer_
    @michaellaufer_ Рік тому +6

    Love these videos, between this and the PI day video i'm blown away at how interesting applied math can be in the gaming scene

  • @lemonbread378
    @lemonbread378 Рік тому +1

    some of my favourite youtube experiences are seeing a video and thinking "well this is somethig i have never considered nor craved an answer to, but now i sure am"
    really nice isualisation and experimentation
    this game is trully weird sometimes, and i love it when people have enough skill and knowledge to take advantage of it (i've read many comments about mob farms taking advantage of pathfinding)
    anyways yeah! some cool new info, thanks for it!

  • @cybersilver5816
    @cybersilver5816 Рік тому +2

    The reason they bunch up at the top despite being 2 times as likely to go downhill is that:
    When you can't go any higher, then of course statistically speaking you're more likely to move downhill because it is the only place you can go. That doesn't mean that they will move down, it's just the only elevation change they can make at that point.

  • @vineveer4358
    @vineveer4358 Рік тому +1

    I like that you determined the quirkiness of the airblock thing made your search algorithm faster. That could maybe be why it's coded that way!

  • @Eryph
    @Eryph Рік тому +1

    I have a flock of free-range sheep in a valley on a minecraft server and they're constantly climbing up the valley walls and pushing each other off to their deaths. Good to know I'm not insane and it's the pathfinding making them do it.

  • @JusticeBackstrom
    @JusticeBackstrom Рік тому +1

    I love how you didn't just break open the game's code, and tell us the answer, but instead used in-game experiments to create, and support your hypothesis.

  • @literallymalware
    @literallymalware Рік тому +3

    This is incredibly interesting as I've always noticed how much mobs gravitate towards the tops of mountains

  • @Obi-WanKannabis
    @Obi-WanKannabis Рік тому +1

    It's pretty obvious why it's coded that way, without a bias for going up, mobs ould just slowly get stuck on caves or terrain depressions that are hard to get out of

  • @randomrepairs4676
    @randomrepairs4676 Рік тому +2

    Been trying to figure out how to have goats and llamas in a valley and confused why they kept wandering up to my mountain home, which is super annoying. Small problem but wow I had no idea that so much went into it. Glad to know how it works

  • @Fragger-1
    @Fragger-1 Рік тому

    I love that people are willing to go this in depth to try and explain video game occurrences. It just makes me happy to see how far we've gone from the days of parents telling us that playing video games is a waste of time, to making scientific studies about why the animals in a 10+ year old game always end up in weird places.

  • @crandria2001
    @crandria2001 Рік тому +1

    I've definitely felt this with my villagers climbing up hills and jumping down to their deaths 😔

  • @yourehereforthatarentyou
    @yourehereforthatarentyou Рік тому +2

    the only man with a phd in minecraft pig physics

  • @MCNeko6554
    @MCNeko6554 Рік тому +6

    The part at 14:10 makes complete sense to me since animals in my worlds always seem to find themselves entering caves whenever possible or else going to the top of the hill. Especially chickens lmao.
    Edit: caves that are partially uncovered or a few blocks from the entrances.

  • @marincusman9303
    @marincusman9303 Рік тому +1

    Just found your channel the other day about zombie pi and then this and finally decided to sub. You have such a chill and friendly vibe I really enjoy these videos. Keep it up!

    • @whitestonejazz
      @whitestonejazz  Рік тому +1

      Thanks. I think often about how to give the videos a nice chill vibe, so that's good to hear

  • @migsy1
    @migsy1 Рік тому +12

    That’s really interesting! I think that a video where we follow along with your experiment/discovery process would be fun to watch. Have a good day!

  • @xenathcytrin202
    @xenathcytrin202 Рік тому +2

    This seems to be a way to save on processing power, but it also has the side effect of making animals easier to spot, which i think is neat.

  • @DoNotPutMeInABox
    @DoNotPutMeInABox Рік тому +1

    Yeah, I always wondered why the zombie piglins that spawned in my Nether base would pathfind up the spiral staircases to the highest room.

  • @tachrayonic2982
    @tachrayonic2982 Рік тому +5

    It might be interesting to choose the color based on how many pathfinding choices would lead to that block. I wonder if a logarithmic scale for picking the colors would be useful in this case.

  • @nemo-x
    @nemo-x Рік тому +1

    This sort of digital analysis is absolutely lovely.

  • @Intrafacial86
    @Intrafacial86 Рік тому +2

    The thumbnail had me thinking someone was about to be ☝🏻 presenting to the emergency room.

  • @entirelyriley
    @entirelyriley Рік тому +1

    Honestly I am so here for these kinda videos. Love that so many of the comments are people just adding onto the info and disccusion too :) thank you I highly enjoyed xx

  • @randomuser395
    @randomuser395 Рік тому +1

    Recently was working a building a huge mountain in game, and noticed that all mobs spawning were drifting up the hill. Great video, answered the exact question I had.

  • @TinyDeskEngineer
    @TinyDeskEngineer Рік тому +1

    I find that they also like walking downhill a lot, which is pretty annoying when you find an animal you want to keep in a pen for later and you don't have any way to get it to follow you.

  • @Juicyboi_
    @Juicyboi_ Рік тому +1

    I love how much people will do just to understand how Minecraft works. This is a "simple" experiment compared to something maybe SciCraft would do, but it seems pretty effective. This game is an amazing gateway/exercise for coding, probability and much more.

  • @Meowzipan
    @Meowzipan Рік тому +1

    Hey, this is probably gonna get buried but your channel is exactly what I’ve been looking for for a really long time. Not only is your voice soothing and fun to listen to, but the topics you choose are engaging, too. Not only that, but it’s also VERY easy to relax and fall asleep to! Thank you for creating.

    • @fairykeibani9155
      @fairykeibani9155 Рік тому

      We all must convince whitestonejazz to dye his beard pink! He said he’d do it if everyone was on board!!!

  • @doncomputer5931
    @doncomputer5931 Рік тому +1

    I think it is fascinating to try to break down the complex pathfinding of the game with science. Very impressive.

  • @lordsimpus
    @lordsimpus Рік тому +1

    it makes sense since you don’t really want to have friendly mobs walking down into caves and never resurfacing

  • @IceFireofVoid
    @IceFireofVoid Рік тому +1

    I noticed this when digging around in the nether at a warped forest. The endermen really like going up. Sometimes they would cluster near a cliffside and if I made my staircase tall enough for them, they would all go up. I had a staircase up to a nether fortress and I had blocked off the top block to protect myself from wither skeletons and the top of the staircase was full of endermen that had wandered up the stairs from the forest.

  • @MegaVidFan1
    @MegaVidFan1 Рік тому +2

    This is a fascinating video! It seems like a massive combination of mob behavior. My best guess is that it's largely influenced by the addition of the mechanic that made animals avoid taking fall damage if at all possible. For example, if a zombie aggroed on you across a chasm, it'd just walk off into the chasm instead of going for the bridge. I wonder if animals refusing to take fall damage unless completely necessary leads them to be more likely to jump up 1 block, rather than chance falling 3 blocks like many hills in world design allow for. Cool video and awesome way to visualize the process!

  • @dimensionalchaos8422
    @dimensionalchaos8422 Рік тому +1

    Suggestion: make terrain in an exponential shape, getting steeper yet with paths that can be taken. Then I would rerun this experiment to see if there is a "sweetspot" that they prefer in terrain angle

  • @Nevir202
    @Nevir202 Рік тому +1

    2:22 you should have expected this, as the black area is like the outside border of your simulation, a good number of the pigs wandered off the edge, and here they've essentially done the same, by wandering into an area they are less likely to enter overall, but every time they start to leave it, probability eventually pushed them back towards it.

  • @haiperbus
    @haiperbus Рік тому +1

    maybe the way PaperMC optimizes pathfinding changes this, but I've noticed this in my servers. after a month or so of playing, all the animals have kongregated on the top of random hills and remain there forever

  • @jamesmorrison1308
    @jamesmorrison1308 Рік тому

    Even if there’s a more precise way to calculate this, I love the way you approached the problem!

  • @JenInMinecraft
    @JenInMinecraft Рік тому

    Way back in Minecraft Alpha, players complained that all of the passive mobs would wander out into the water (they would also wander into caves too. They still do, just extremely rarely). At one point, Notch (or Jeb) changed it so that they would rather go uphill (at least to grass), away from the water, rather than downhill, into the water. I think it was more they would ignore sand/gravelstone.

  • @cones914
    @cones914 Рік тому +2

    You should have done this with sheep dyed to the color of their starting location.

  • @NoooiZ
    @NoooiZ Рік тому +1

    Great visualizations, I can see how this might be interesting even to people that aren't math nerds like myself

  • @GibsnRage
    @GibsnRage Рік тому

    I just stumbled across your channel. I don't mess with Minecraft any more, I just love your character. Intelligence is sexy.

  • @carafurry7862
    @carafurry7862 Рік тому +2

    I wonder if this could improve any mob farms out there 🤔

  • @sebastianbass946
    @sebastianbass946 Рік тому +1

    I knew caves affected pathfinding and was wondering why that wasn’t taken into account.

  • @nsomandin5342
    @nsomandin5342 Рік тому +4

    One word: wow. I definitely didn't care about this subject at first lmao, I abandoned Minecraft quite some months ago but just clicked because of title and thumbnail. But the way you explained everything so intriguing and put so much effort into all those test, gave me so much interest. This deserves more, keep up this work man.

  • @katapow99
    @katapow99 Рік тому

    Now I'm just imagining making animal pens with a small square of grass, and a 10 block wide plane of glass ringed around it to keep the mods inside

  • @sharpfang
    @sharpfang Рік тому

    The mechanics is pretty simple. When the animal decides to walk, it picks a *solid* block at random within a cube centered on it, forgot the exact size but something like 16x16x16? and pathfinds as near as possible to that block. On flat terrain the cube is top half air, bottom half solid so all directions are equally probable. On a 45 degree incline, downhill is 3/4 air, uphill is 3/4 solid blocks, so the animal is 3 times as likely to pick a block in the uphill direction than the downhill direction.

  • @lenorelestrange
    @lenorelestrange Рік тому +2

    I always wondered if "bud" interactions effected other things outside Redstone. I'm nearly certain that the pigs on test one were in a state of bud with the wool because when they say "walk to x" they find x at the bud point, the point at witch updates are active yet freeze.

  • @TheIndigoShine
    @TheIndigoShine 2 місяці тому

    Wow... So this video basically dissects the pathfinding mechanics of the entire game!! Very interesting!

  • @valshaped
    @valshaped Рік тому

    It makes sense! All mobs choose a random block within their range to wander towards, and a higher density of blocks in the direction of a hillside would lead to them attempting to climb it!
    And, once they're high enough, the blocks at the bottom of the hill would stop contributing to the wandering direction

  • @clockworkspider0
    @clockworkspider0 Рік тому

    been playing this game for 11 years and i am still learning more thanks for this cool video

  • @hungrygremlin5151
    @hungrygremlin5151 Рік тому +1

    Huh, that means if you're consistently near a hill, you can tell if there's a cave near the surface based on mob behavior. Neat!

  • @GradientAscent_
    @GradientAscent_ Рік тому

    My guess as to why it's a ratio of 2:1 to walk uphill for mobs is that the mobs pathfind to any block within their range and there's twice as many blocks on the side of the clifface; likewise going down, the mobs would also pathfind to flatter, lower surfaces because there's more blocks underneath than to the sides. It can be better explained in a 2D graph where you show a 45° wall and a 0°-10° surface.
    Like they're trying to get out of slopey regions and sometimes get stuck after a 2-block wall but don't on flat ground. This would explain why quite a few pigs stayed down there during the experiment at the start.
    And regarding that 2:1 ratio, it would entirely be subject as to where the mob is at any given moment with respect to the valley.

  • @DexStarrTheManiac
    @DexStarrTheManiac Рік тому

    Omfg this is so cool- i love how the most random questions will eventually get people that answer them

  • @coolnoah8183
    @coolnoah8183 Рік тому

    The reasoning for this could be that on a cliff face, many more blocks for them to randomly pick to pathfind to are inside the mountain in the uphille direction as opposed to the downhill direction which would be mostly air

  • @rmvw
    @rmvw Рік тому +1

    Don't know if someone pointed it out already, but in diagonal staircase case you're not testing a 45 degree slope, you can see it on 9:50. Sure it's 45 degree in both cardinal directions, but the gradient slope is not

  • @geegrant865
    @geegrant865 Рік тому

    I really liked the learning-on-the-fly aspect of this video!

  • @Awesomeplayer98
    @Awesomeplayer98 Рік тому +2

    Finally a video that explains mob AI! Thank you!

  • @qunas101
    @qunas101 Рік тому +1

    I noticed that when I played with my friend. We had our houses in between two hills. Every time we left our horses unattended it's almost like they disappeared and it almost made me furious each time they wondered those hills and got lost it the trees

  • @windywendi
    @windywendi Рік тому

    I have been suspecting this since Gnembon introduced his pathfinding-based blaze farm, where he talked about the mob pathfinding cube

  • @bronzekoala9141
    @bronzekoala9141 Рік тому

    I noticed this when I built a cow farm underground. It was quite extreme how hard they tried to get to the highest point in the cage. I suspected it was more pronounced the deeper the animal is in the world.