*One clarification:* With pillagers (or any mob who holds their weapon) the extra XP for holding a weapon is not added if they dropped that weapon when killed, so if a pillager drops their crossbow they drop only 5 XP. The video simplifies it a bit, in the actual game 8.5% of the time pillagers drop only 5 XP (3,1,1) which makes the average orb size calculation more complicated than I decided to include in the video. All of these dynamics also apply to armor also (the armor bonus is on/off, not additive).
There is a video by cubicmetre from about a year ago called "The Quest for Minecrafts God Particle" where he explains a possible reason why those numbers where chosen for XP. He starts explaining it at 5:17 in the video. The reason that he gives is that with this set of numbers you can access every number possible, while from a game design standpoint it still looks natural.
@@AnimilesYT Yeah you're right actually, so in the pillager farm it is undesirable. It's not such a small impact though so it's probably not like.. that big a deal.
@@N0ark.I guess it matters. Outside the dragon or wither I guess a ravager with 10 xp per orb average, no penalty or gain for over-absorption rate farms, 360,000 XP/hr.
I wonder if there's a reason they didn't just literally merge xp orbs. It just seems so weird to me to have so much going on behind the scenes that at first glance only seem to serve as limits to the player.
They don't seem to like fun. Notice how desperately they try to nerf update suppression and light suppression, even though it's a bug that no one will ever run into accidentally, and is only done as _extreme_ endgame content.
@@fireninja8250 Yeah, but they skipped the worst parts of the game...if you want to try getting certain enchants you now have to hunt down a biome that could very well not have a village and usually is hundreds of thousands of blocks away depending on rarity. If you hadn't gone for an Elytra AND already had Mending on it, it's a PITA.
Agreed, in my 2000+ day world I still haven't come across a swamp and I don't look forward to either dragging villagers to one once I break down and use chunkbase, or else going fishing in minecraft for another 2000+ days. They could at least up it's chances with fishing/looting chests, by the time I get enough ancient debris all my godtier equipment is busted, it's undoubtedly a pain in the gluteus region.
The sheer under the hood madness to build this helps explain why Minecraft accumulates so many bugs over the years, especially trying to adapt to other platforms. "OK, now to rewrite the xp system as similarly as possible.... _you did what?! Why?_ "
certified 'the gods must be crazy' moment this feels like lifting up the veil to see a carrot on a stick that powers minecraft to run i have seen botch-jobs in the minecraft code before but this made me realise these duct-taped walls may hold up more of the game than i had previously thought
I understood nothing in this video except, "make good enderman farm or place down a cactus". But I will say this, I felt very smart while listening to Nico explaining everything. Once the video ended, I forget everything except for "cactus stops orb clustering".
The xp you get when you kill a mob is split in orbs based on a mathematical formula, where you can get low value xp orb or higher value xp orb. Mobs with a weapon/armor will drop more low value orbs. After a while, orbs will despawn if not picked up by a player. When there is a lot of orbs, to prevent lag the orbs have a chance to merge into a stack of orbs. The "age" of the stack of orbs is set by the latest orb added, so the stack will never despawn if it keeps merging with other orbs. This is important because the player can only absorb a maximum amount of orb/hour, regardless of the orb value. As I understand it, a stack does not count as one orb, each orb of the stack is still counted as individual orbs. Therefore, to be efficient, you want to absorb higher orb value instead of lower orb value. If your farm produces a lot of low value orbs (like a pillager farms), they will merge and you will get a lot of low values xp orb that won't despawn. Thus, to optimize this kind of farm you either need to lower the orb production rate to reduce merging, or delete the orbs stacks with a cactus, fire or lava.
Exp merging on an enderman farm makes it more likely to pick higher valued orbs, merging on a pillager farm makes it more likely to pick lower valued orbs. So, merging exp on enderman good, merging on pillager farm bad
Another UA-camr named CubicMetre does a pretty cool deep dive on a lot of technical stuff like this. One of his most recent endeavors, is looking at how to get the most XP per hour in a theoretically achievable way. So he created a system using furnaces and update suppression, to constantly get "God Particles" or the TOP amount of XP you can get in a single orb. Because it is using update suppression, inherently a bug, it is hard for the average player to grasp how it works, or to recreate it themselves. It also will probably get patched or fixed in future updates as time goes on, but other methods will arise.
I thought this too, but it doesn't hold up. For instance: 149 * 2 + 1 = 299, nearest primes: 293 (-6), 307 (=8), They picked 307. My anal retentiveness really wanted to find a set pattern but failed :-P
@@NicoisLOSTdid you run your python script over these "corrected" sets of primes? (for either rule) maybe something weird happens with different orb size choices
It would be interesting if we could manipulate the exp orbs, effectively filtering out lower value orbs, but I'm guessing that the hitbox of orbs doesn't increase in size with the size/value of the orb?
I'd be interested in whether we can use the grouping mechanic to pull out orbs of a certain size. That's assuming that the orbs will snap into stacks the same way items do
Maybe something where you spawn the first bunch of xp "manually" until you have the orbs where you want them and then activate the farm so they fill up the stacks where you want them
For the 2n+1 formula for orb sizes. I remember from algorithms class I had there is an algorithm that finds the minimal number of coins a1, a2, ... required to return a value N. Lets say we have N = 7, a1 =1, a2 = 3, then the minimal number of coins to do 7 is: 2*a2 + 1*a1 (3 coins). The algorithm is complex and requires dynamic optimization I'm not going to in depth, but the interesting thing is that if 2*a1 < a2 and 2*a2 < a3 etc. there is a greedy algorithm (no brainer algorithm) to calculate how many of which coins to return. I suspect that is the reason why 2*a1 +1 ~ a2 and so on. On the reason why they are prime I suspect that we want the orbs to be relatively prime. I'm not 100% sure why, but may be some kind of optimization of the number of orbs to be used. This is not a complete answer but rather insights why those numbers could be picked.
This is one of the most interesting videos I've ever seen. Such a small topic, never encountered anywhere except maybe in scicraft, but just so well explained with exactly the right level of detail and research!
Now that I think of it technical servers mass enslave villagers and other mobs, destroy giant areas just for better farm rates and produce enough emissions and waste to destroy an entire climate
2:23 I'm no mathematician but an observation I made with the strangeness of 73 as the given number instead of 79; What if the number was the closest prime number, but if the difference is equal, the higher number is chosen over the smaller counter part? 15: 13,17 (-2/+2, so pick the higher 17) 35: 31,37 (-4/+2, so the closer one is 37) 75: 73,79 (-2/+4, so the closer one is 73) 147: 139,149 (-8/+2, so the closer one is 149) Etc.
I clicked to understand XP, stayed for the very clean graphical design used to explain your results! Simple, pleasant to watch and gets the idea across well. Thanks!
It never fails to surprise me how a game mechanic that appears so simple on the surface can have such strange and complicated systems behind it. Cool video.
the fact that there is someone who is willing to make a video explanation on Minecraft XP-orb mechanics fully visualising all utilized algebra astonishes me
When I hear XP I just wish they would rework the Enchanting System. It is stupid that it cost Flat Level when any Level requieres more XP. WHat means that the amount of XP it costs to play 3 Level is much lower when you are low level.
well but there is also an entity limit for overlapping on a coörd, spawning more mobs means they vannish quicker and so you have less time to kill them. just a tought
What are you telling me in this video is that you happen to be able to tune real life industrial processes to make a decent living and this knowledge is relevant to XP farms too lol
It's wild to me that a game that most of us started playing as children is now a common discussion for complex ideas, not just with just optimizing certain functions based on how the game is designed but also building complex machines that do some truly amazing things. What seems like such a simple game can have so much to offer, it can appeal to nearly everyone at some level for some reason.
@cubicmetre did a very good breakdown of xp orbs and mechanics in his God Particle series. If I recall the content of that video correctly, one of the explanations for the prime nature of xp orbs is that you can create any number using prime components, which fits nice with xp as the value which has to be turned into orbs is variable.
2:40 Any integer can be represented as a product of primes. If I had to guess, they wanted the number of XP orbs dropped to be relatively consistent regardless of how much XP is being awarded. They could just always make it drop one big orb with all the XP at once, but collecting XP is more satisfying when you have several orbs to pick up. Dividing the XP drops down into primes means that for most XP drops, there will always be a similar number of orbs. Your graph around 4:30 shows that to be mostly true, of course when you graph it out for values much higher than what occur naturally in the game it, it seems like the method is wildly inconsistent 4:40. Compare this to a different method, say we divide an XP dropped into powers of of 2 (2, 4, 8, 16, ect). Aside from being limited to even numbers, the XP orbs dropped between two different similar payouts might be wildly different, and smaller XP drops might give the impression of more XP being collected. For example: A mob dropping 54 XP in our power of 2 system would drop: a 32XP orb, a 16XP orb, a 4XP orb, and a 2 XP orb Meanwhile, a mob dropping 56 XP would drop: a 32XP orb, a 16XP orb, and an 8XP orb Obtaining 2 MORE XP nets you one less orb, and this effect would probably be more exaggerated in other scenarios, for example getting 64XP would of course only give 1 orb. This can still happen with the prime factor system , but I beleive it's much less pronounced for numbers that are closer together. Not perfect by any means, there's a dozen different ways to accomplish the same result more consistently, but it's just one of those quirky Minecraft things I suppose. In the prime system: the prime factorization of 54 is: 2 x 3 x 3 x 3 the prime factorization of 56 is: 2 x 2 x 2 x 7 Both would create the same number of orbs.
I don't get why they don't make sculk useful via xp orb size. I would happily take a percentage reduction of the exp from a farm if it meant having a 7 exp orb guaranteed every time I break a sculk block. That would speed up exp gain and make sculk's features actually useful instead of being a dead mechanic. Not to mess up game progression, naturally generated sculk could still give less exp just like natural shriekers and placed shriekers are different.
For what it's worth, I went and asked GPT4 the same question and it found the pattern you mentioned of 'next prime +1' but said it couldn't be right because of 73. then it found some 7-term polynomial that supposedly intersected all the points, but i didn't check it and was skeptical
Technically, there is a way to mathematically calculate how many orbs you get from a given xp value, but it includes a lot of floors and modulos, and isn't pretty.
prob 73 is the closest prime to given number. 15 is right between 13 and 17, so i guess it is just kind of rounding to 17, like 0.5 rounding to 1, when it is right in the middle
It is weird. In all but 1 case they either picked the closer number OR they picked the number that was higher if they were equally distanced. Except for 307! It is 8 higher than 299, whereas 293 (which wasn't picked) was only 6 lower
Nico is Lost mentioning White Stone Jazz... The niche Minecraft sphere is so niche it is self referencing. Great video as always. You always do such a good job of covering a topic!
I swear to god you channel deserve million. If a was a UA-cam staff member I would have pushed to algorithm to promote you. Seriously you're awfully underrated compared to your level
This is basically 'work smarter, not harder'. So, from how I understand it, the better the obsorbtion, the more xp per minute. Don't let the wrong orbs build up, and build the right farm for it
The fact that I was completely unaware of these game mechanics is a good indication that I am a moron, and have absolutely no idea how to make an XP farm that doesn't involve manually jamming stacks of meat into a furnace.
that graph of average xp/orb vs total xp dropped kinda looks like a fractal to me I wonder what it's dimentionaly is. could be a good value to include into "minecraft iceberg" sort of video :) love your stuff
@@abyssaljam441 dimensionality is kinda weird on non continuous sets. what dimension does the set {1,2,3,4} have? now map each of the elements onto another set of 4 elements and you have a structure thats similar to what is shown (just with more elements per set).
@@nikolasscholz7983 I guess, you can always double it, and get a really continious-looking graph in the end then, we should define what our object actually is. I propose it being a set of rectangles, kinda like histogram then, you can measure how it's area changes, when you double it's length. my guess it that it will be between 2 and 4-times increase, and thus this structure would have fractional dimentionality although, the more I think about it, the more I feel like it will still be just 2 :sad:
@@nikolasscholz7983 yeah, about {1,2,3,4} set - I meant geometric dimentionality as I understand it, so we need to define some sort of geometric object to compute it
Damn, i thought this was a SoME3 submission at first, but then i realized it was posted in october. The detail and explaination in this video is amazing
Great Video it was really entertaining and is well made. Keep up the good work. One more thing to add about maximizing the value of orbs to pick up. XP Orbs are created highest first. So the highest value orb gets created first in the game code. This means that in theory you could use entity age seperation to split the orbs. In case of Ravagers they will always drop 2 orbs since they dont have equiptment. This means that if you were to seperate the different sized orbs the theoretical max rate Ravager XP farm is 612k xp/hr since that would be the maximum speed a player could pick up value 17 orbs.
Yeah, XP is weird... I wonder why Mojang wants to stick with this orb mechanic, if it is only a legacy thing or if there is an intended design reason. Aren't mass amounts XP orbs one of the reasons for lags too?
xp in minecraft needs a reform everything should just drop 1 orb, like endermen dropping an orb of 5xp orbs of the same size should be able to merge, like a stack of items, like 3 endermen should be 3 merged orbs of 5xp (15xp total) the maximum orbs picked up by a player should stay the same, it could start picking up orbs from these stacks by either xp size, orb stack size or start with the oldest orb first this would greatly reduce the amount of orbs that will exist and will improve performance in huge farms
Would mending change the xp absorption? For example does excess orbs go straight to the sword or take up the player absorption rate and then to the sword?
0:40 As a Computer Maths student, this hurts. Do you know why? 1:24 for the 1, 3 and 7, those can be binary limits. You have to remember computers start counting from 0, so: 2^1 has 2 states: 0(min), 1(max). 2^2 has 4 states: 0(min), 1, 2, 3(max) 2^3 has 8 states: 0(min), 1, 2, 3, 4, 5, 6, 7(max) Maybe is just using the larger binary number aviable to set the size.
Kinda reminds me of all the math Zedaph had to have someone figure out for his _I XP'd Myself_ zedvancement. Also interesting that a Tactical Tickle farm gives higher rates than enderman farms...
I love weird math in video games, its usually a pretty solid analog for real life woth how the systems unintentionally built on top of eachother interact so weirdly.
Very interesting video, thanks for sharing. It's actually possible to sort xp orbs by size using the merging mechanic. Jonas paladin has a video showing the proof of concept. Essentially you use the fact that the border of the lazy chunks acts as a one-way barrier to xp merging (orbs can merge into lazy chunks but can't get out) in order to filter the orbs. It does require a constant stream of orbs of a known size, he uses creepers to filter the orbs of size 3 from a stream of guardian xp, leaving only the size 7 orbs.
2:39 it’s because 73 is the best number in the universe. It’s a prime number, and 37 which is 73 backwards is also a prime number. 7*3 is 21, which is the position in the prime numbers list of 73. But, hold on, 21 backwards is 12, and guess what position 37 is in the prime number list? Yeah, 12.
The Minecraft dev might have been a big bang theory because in one Episode Sheldon calls 73 His favorite number. I think 73 is also called the Sheldonprimenumber or somthing Like that
I wonder if the merging mechanic could somehow be used for filtering the orbs. Like, maybe with a little bit of setup before running the farm, it's possible to isolate groups of orbs and then have a stream of orbs out of which the desired (or maybe the undesired) ones get absorbed.
I feel like having slightly over max absorbtion is good for mending, but maybe each spawning layer above max absorption should have dispensers with water buckets to disable them.
Honestly, Mojang needs to introduce nearby exp orb merging like they did with drop stack merging (Way back in 1.4 beta in late 2012) as an anti lag measure. Thing is they would need to change how orbs work to be more like base 2 where the orbs are 1/2/4/8/16/32/64/128/256/etc where 2 of the same orb can merge into a larger orb. Mojang may have done it the way it is because they felt it would result in few orbs but that was a long ass time ago and they have added a ton of mobs. But the ultimate reason why they will never fix this problem is that they hate mob grinders. Its the reason why mobs that are too far from the player who can't engage the player don't move much. Its an anti grinder measure they fronted as an anti lag measure.
I think the deviation in the climbing of the primes is about roundness. So like if I remember correctly drawing circles with squares like pixel art strangely divide into prime bits. Making a quarter of the full circle image. Size 1 is 2^2 • • 3 • •• •• • 7 ••• •••• •••• ••• to save time I used the margin to act as the symmetry line.
Earlier when I was at my enderman farm I was just wondering if we couldn't maximize the absorption of the xp given. If I understood correctly, we can't do more than with our sword?
Bit late, but I can tell you why 73 was chosen. It's because it makes it very fast to create orbs for numbers around 100, which are basically very common in design. It's just a small optimization. 79's really awkward to use, so...
I love the fact that this was coded to be so complex. Everything from the 2x+1 to that chaotic graph... the complexity of this system shows the brilliance of Mojang at its peak. Minecraft is a game written by number nerds. I wish they went in these kinds of directions more for different mechanics..
don't know if it was already said but for the exp orb size, to know which prime number is chosen, it looks like it does do the (last size * 2 + 1) then looks at both nearest prime numbers and takes the closest. If there is a tie in the difference, they picked the one above, this would explain 73 instead of 79, a difference of 2 as opposed to a difference of 4.
Would there be a way to filter out/sort/separate out the higher level xp orbs using the merging mechanic and let the small orbs go into lava? Perhaps you could first prepare some high level orbs, and cycle them on a conveyor belt with ice and let them go around past the player at max absorbption rate while those orbs get replenished by a farm producing those high orbs. The high orbs will stack, but the low value orbs will fall through and get killed. Personally I don't have much skill setting such thing up, perhaps you could explore this concept?
I believe the value of orbs has vern the same since xp was introduced so my theory is that Notch understood that the numbers should be roughly double so that there would be a small number of sprites, but wanted to allow duplicates so didn’t want to just use binary values and so randomly chose some primes by doubling his previous value with no particular rhyme or reason. No one’s ever messed with it cause there’s no reason to. I’d be willing to bet it’s something very similar to that and yet it still bugs me that there isn’t a pattern.
Huh, I never even considered the possibility of popping xp orbs on a cactus, much less the idea that it could grant you faster xp somehow. But it all makes sense now!
I was puzzling over the numbers a bit again because the logic for the formula doesn't really feel right to me, and I came to realize that every number after 1 can be made of a simple combination of preceding numbers, i.e. 3+3+1 = 7, 7+7+3 = 14, 17+17+3 = 37, etc. In fact, 73 is still an unusual outlier, because all of the other numbers barring 1 and 3 follow a pattern of [x]*2+3. I have to wonder if the reason 73 doesn't fit in cleanly to either calculation is because it was just a mistake.
While in orb group saturation, will the player ever collect ungrouped orbs? If so, wouldn't making the farm larger then required for group saturation result in a lower XP as there are more orbs that are ungrouped then neccesary to achieve the saturation. If this is the case, wouldn't it be optimal to design are farm that runs at full capacity to spool up to saturation and then reduces spawn rates to maintain saturation with minimial excess orb generation?
Ya know. Even outside of all the niche mechanic weirdness, Minecraft probably shouldn't have xp at all. There are a few ways you could replace it, I would just make enchanting cost lapis only (but more of it), make anvil repair not increase in cost and cost lapis for combining, and make the mending enchantment somehow buff anvil repair
I asked bing chat ( now copilot ) about the significance of the numbers and one section of the response was correct. "Tell me significance of the numbers 1,3,7,17,37,73,149,307,617,1237,2477" "Mathematics: Mathematics is the study of numbers, patterns, shapes, and structures. Some numbers have special properties or significance in mathematics, such as being prime, perfect, Fibonacci, or transcendental. For example, the numbers 1,3,7,17,37,73,149,307,617,1237,2477 are all prime numbers, meaning they have only two positive divisors: 1 and themselves. Prime numbers are important in many areas of mathematics, such as cryptography, number theory, and combinatorics." Not really sure why you asked the AI to do math, because that's the thing it is the worst at when you could just ask about the numbers directly.
*One clarification:* With pillagers (or any mob who holds their weapon) the extra XP for holding a weapon is not added if they dropped that weapon when killed, so if a pillager drops their crossbow they drop only 5 XP.
The video simplifies it a bit, in the actual game 8.5% of the time pillagers drop only 5 XP (3,1,1) which makes the average orb size calculation more complicated than I decided to include in the video. All of these dynamics also apply to armor also (the armor bonus is on/off, not additive).
hey Nico! one question, do you happen to know the theoretical best mob for grinding XP with this in mind? one that is farmable that is.
So a looting sword is not desirable for pillager farms?
There is a video by cubicmetre from about a year ago called "The Quest for Minecrafts God Particle" where he explains a possible reason why those numbers where chosen for XP. He starts explaining it at 5:17 in the video.
The reason that he gives is that with this set of numbers you can access every number possible, while from a game design standpoint it still looks natural.
@@AnimilesYT Yeah you're right actually, so in the pillager farm it is undesirable. It's not such a small impact though so it's probably not like.. that big a deal.
@@N0ark.I guess it matters. Outside the dragon or wither I guess a ravager with 10 xp per orb average, no penalty or gain for over-absorption rate farms, 360,000 XP/hr.
I now have a PHD in Minecraft XP orbs, thank you!
It's something we never thought we needed
I wonder if there's a reason they didn't just literally merge xp orbs. It just seems so weird to me to have so much going on behind the scenes that at first glance only seem to serve as limits to the player.
They don't seem to like fun. Notice how desperately they try to nerf update suppression and light suppression, even though it's a bug that no one will ever run into accidentally, and is only done as _extreme_ endgame content.
Look at how they slaughtered villagers
@@xxthelinkxx3296 I feel that was justified though
Villagers skipped 90% of the game, and after that there was nothing to do to progress
@@fireninja8250 Yeah, but they skipped the worst parts of the game...if you want to try getting certain enchants you now have to hunt down a biome that could very well not have a village and usually is hundreds of thousands of blocks away depending on rarity. If you hadn't gone for an Elytra AND already had Mending on it, it's a PITA.
Agreed, in my 2000+ day world I still haven't come across a swamp and I don't look forward to either dragging villagers to one once I break down and use chunkbase, or else going fishing in minecraft for another 2000+ days. They could at least up it's chances with fishing/looting chests, by the time I get enough ancient debris all my godtier equipment is busted, it's undoubtedly a pain in the gluteus region.
The sheer under the hood madness to build this helps explain why Minecraft accumulates so many bugs over the years, especially trying to adapt to other platforms.
"OK, now to rewrite the xp system as similarly as possible.... _you did what?! Why?_ "
certified 'the gods must be crazy' moment
this feels like lifting up the veil to see a carrot on a stick that powers minecraft to run
i have seen botch-jobs in the minecraft code before but this made me realise these duct-taped walls may hold up more of the game than i had previously thought
I understood nothing in this video except, "make good enderman farm or place down a cactus".
But I will say this, I felt very smart while listening to Nico explaining everything. Once the video ended, I forget everything except for "cactus stops orb clustering".
The xp you get when you kill a mob is split in orbs based on a mathematical formula, where you can get low value xp orb or higher value xp orb. Mobs with a weapon/armor will drop more low value orbs.
After a while, orbs will despawn if not picked up by a player. When there is a lot of orbs, to prevent lag the orbs have a chance to merge into a stack of orbs. The "age" of the stack of orbs is set by the latest orb added, so the stack will never despawn if it keeps merging with other orbs.
This is important because the player can only absorb a maximum amount of orb/hour, regardless of the orb value. As I understand it, a stack does not count as one orb, each orb of the stack is still counted as individual orbs. Therefore, to be efficient, you want to absorb higher orb value instead of lower orb value.
If your farm produces a lot of low value orbs (like a pillager farms), they will merge and you will get a lot of low values xp orb that won't despawn. Thus, to optimize this kind of farm you either need to lower the orb production rate to reduce merging, or delete the orbs stacks with a cactus, fire or lava.
Exp merging on an enderman farm makes it more likely to pick higher valued orbs, merging on a pillager farm makes it more likely to pick lower valued orbs.
So, merging exp on enderman good, merging on pillager farm bad
Bro it’s was basic math for the most part. Elementary school level or I guess middle school level in some red states
Pillager -> merge bad -> place cactus
Enderman -> merge good -> do nothing
I've played minecraft for almost 10 years of my life and I had no idea you could literally burn XP orbs, like, what did I miss?!
I learned pretty early around 2013
Brother didn't you know that xp also despawns since counts as entities!
I learned that when I thought I was clever for just burning down one of those houses in the forest and ended up burning half the forest and myself
Xp orbs often fall in lava, they do be kinda funny lol
@@AdawaShiwanithis sounds like it comes with a sad story involving lots of experience and a form of fire based death. 👀
im loving this really awesome math approach to tmc concepts! good stuff 👍👍👍
Wait Crafty!
You have excellent taste in content
Glad you're enjoying it :-]
@@NicoisLOST 6:09 *Vsauce music plays*
Yes I did notice it
Another UA-camr named CubicMetre does a pretty cool deep dive on a lot of technical stuff like this. One of his most recent endeavors, is looking at how to get the most XP per hour in a theoretically achievable way. So he created a system using furnaces and update suppression, to constantly get "God Particles" or the TOP amount of XP you can get in a single orb. Because it is using update suppression, inherently a bug, it is hard for the average player to grasp how it works, or to recreate it themselves. It also will probably get patched or fixed in future updates as time goes on, but other methods will arise.
I think zedaph did this in hermit craft with no "cheats". pure vanilla. I think it was smelting then 1 TNT if I remember correctly
It got fixed like month ago in 1.20.2 snapshot
@@willparkin cubic did it in vanilla too
when the fastest xp farm has to literally throw xp in the trash in order to keep up its speed
2:31 it just takes the closest prime with a priority for the higher prime if they are at the same distance.
I thought this too, but it doesn't hold up. For instance: 149 * 2 + 1 = 299, nearest primes: 293 (-6), 307 (=8), They picked 307. My anal retentiveness really wanted to find a set pattern but failed :-P
@@NicoisLOST "anal retentiveness"? D:
@@NicoisLOST >My anal retentiveness
Your what now?
@@NicoisLOSTdid you run your python script over these "corrected" sets of primes? (for either rule)
maybe something weird happens with different orb size choices
Is 13 a prime number? It chooses 17 over 13 despite 13 being closer.
i love how minecraft just feels the need to make every other mechanic randomly complicated when it absolutely does not need to be
It would be interesting if we could manipulate the exp orbs, effectively filtering out lower value orbs, but I'm guessing that the hitbox of orbs doesn't increase in size with the size/value of the orb?
I'd be interested in whether we can use the grouping mechanic to pull out orbs of a certain size. That's assuming that the orbs will snap into stacks the same way items do
Maybe something where you spawn the first bunch of xp "manually" until you have the orbs where you want them and then activate the farm so they fill up the stacks where you want them
For the 2n+1 formula for orb sizes. I remember from algorithms class I had there is an algorithm that finds the minimal number of coins a1, a2, ... required to return a value N. Lets say we have N = 7, a1 =1, a2 = 3, then the minimal number of coins to do 7 is: 2*a2 + 1*a1 (3 coins). The algorithm is complex and requires dynamic optimization I'm not going to in depth, but the interesting thing is that if 2*a1 < a2 and 2*a2 < a3 etc. there is a greedy algorithm (no brainer algorithm) to calculate how many of which coins to return. I suspect that is the reason why 2*a1 +1 ~ a2 and so on. On the reason why they are prime I suspect that we want the orbs to be relatively prime. I'm not 100% sure why, but may be some kind of optimization of the number of orbs to be used. This is not a complete answer but rather insights why those numbers could be picked.
This is one of the most interesting videos I've ever seen. Such a small topic, never encountered anywhere except maybe in scicraft, but just so well explained with exactly the right level of detail and research!
"There are a bunch of ways to get XP: Production of goods, murder, exploitation, and destruction are the main ways." So basically capitalism.
Colonialism 2 Electric Boogaloo
Sounds like more of the effect of communism.
Opposed to communism which is murder, exploitation, and destruction.
Now that I think of it technical servers mass enslave villagers and other mobs, destroy giant areas just for better farm rates and produce enough emissions and waste to destroy an entire climate
"so i asked ChatGPT, which just lied to me again and again. so i asked someone known for being good at math."
something about that is so hilarious
Kind of hilarious that to optimize xp gain, you must destroy xp so as to prevent merging
2:23 I'm no mathematician but an observation I made with the strangeness of 73 as the given number instead of 79; What if the number was the closest prime number, but if the difference is equal, the higher number is chosen over the smaller counter part?
15: 13,17 (-2/+2, so pick the higher 17)
35: 31,37 (-4/+2, so the closer one is 37)
75: 73,79 (-2/+4, so the closer one is 73)
147: 139,149 (-8/+2, so the closer one is 149)
Etc.
Yes.. but go just one more ;-)
@@NicoisLOST Nevermind then! Yeah there probably isn't a pattern to this... lol
Bro put a RuneScape reference in the video and didn’t figure out what’s so special about 73
I clicked to understand XP, stayed for the very clean graphical design used to explain your results! Simple, pleasant to watch and gets the idea across well. Thanks!
"So I asked someone I knew was good at math"
Dream???
"WhiteStoneJazz"
Ohh... 😟
It never fails to surprise me how a game mechanic that appears so simple on the surface can have such strange and complicated systems behind it. Cool video.
2:41, it's because 73 is 21st prime number and if you write it backwards, you get 37 wich is the 12nd prime number.
21st and 37 hmmm
/Laughs in Polish/
This is harder than quantum physics.
as a 3rd year student, I can assure you - it's not, unfortunately
@@dzuchun as a non-student, anyone can assure that
@@danisob3633as anyone, I assure you that math isnt real
@@milesdsyas a single peice of you, i can say youre wrong, but only mostly
@@jc_art_as a single carbon atom in that piece, na he's right
the fact that there is someone who is willing to make a video explanation on Minecraft XP-orb mechanics fully visualising all utilized algebra astonishes me
When I hear XP I just wish they would rework the Enchanting System.
It is stupid that it cost Flat Level when any Level requieres more XP. WHat means that the amount of XP it costs to play 3 Level is much lower when you are low level.
well but there is also an entity limit for overlapping on a coörd, spawning more mobs means they vannish quicker and so you have less time to kill them. just a tought
This deep dive explanation of minecraft mechanics are amazing, wishing this blows up
What are you telling me in this video is that you happen to be able to tune real life industrial processes to make a decent living and this knowledge is relevant to XP farms too lol
It's wild to me that a game that most of us started playing as children is now a common discussion for complex ideas, not just with just optimizing certain functions based on how the game is designed but also building complex machines that do some truly amazing things. What seems like such a simple game can have so much to offer, it can appeal to nearly everyone at some level for some reason.
@cubicmetre did a very good breakdown of xp orbs and mechanics in his God Particle series. If I recall the content of that video correctly, one of the explanations for the prime nature of xp orbs is that you can create any number using prime components, which fits nice with xp as the value which has to be turned into orbs is variable.
2:40 Any integer can be represented as a product of primes. If I had to guess, they wanted the number of XP orbs dropped to be relatively consistent regardless of how much XP is being awarded. They could just always make it drop one big orb with all the XP at once, but collecting XP is more satisfying when you have several orbs to pick up. Dividing the XP drops down into primes means that for most XP drops, there will always be a similar number of orbs. Your graph around 4:30 shows that to be mostly true, of course when you graph it out for values much higher than what occur naturally in the game it, it seems like the method is wildly inconsistent 4:40.
Compare this to a different method, say we divide an XP dropped into powers of of 2 (2, 4, 8, 16, ect). Aside from being limited to even numbers, the XP orbs dropped between two different similar payouts might be wildly different, and smaller XP drops might give the impression of more XP being collected.
For example:
A mob dropping 54 XP in our power of 2 system would drop: a 32XP orb, a 16XP orb, a 4XP orb, and a 2 XP orb
Meanwhile, a mob dropping 56 XP would drop: a 32XP orb, a 16XP orb, and an 8XP orb
Obtaining 2 MORE XP nets you one less orb, and this effect would probably be more exaggerated in other scenarios, for example getting 64XP would of course only give 1 orb.
This can still happen with the prime factor system
, but I beleive it's much less pronounced for numbers that are closer together. Not perfect by any means, there's a dozen different ways to accomplish the same result more consistently, but it's just one of those quirky Minecraft things I suppose.
In the prime system:
the prime factorization of 54 is: 2 x 3 x 3 x 3
the prime factorization of 56 is: 2 x 2 x 2 x 7
Both would create the same number of orbs.
I don't get why they don't make sculk useful via xp orb size. I would happily take a percentage reduction of the exp from a farm if it meant having a 7 exp orb guaranteed every time I break a sculk block. That would speed up exp gain and make sculk's features actually useful instead of being a dead mechanic.
Not to mess up game progression, naturally generated sculk could still give less exp just like natural shriekers and placed shriekers are different.
For what it's worth, I went and asked GPT4 the same question and it found the pattern you mentioned of 'next prime +1' but said it couldn't be right because of 73. then it found some 7-term polynomial that supposedly intersected all the points, but i didn't check it and was skeptical
I loved the 3blue1brown esque editing. Super high quality stuff man :D
Technically, there is a way to mathematically calculate how many orbs you get from a given xp value, but it includes a lot of floors and modulos, and isn't pretty.
prob 73 is the closest prime to given number. 15 is right between 13 and 17, so i guess it is just kind of rounding to 17, like 0.5 rounding to 1, when it is right in the middle
I'm sure they picked 73 because it's Sheldon's prime (there's a wiki page about it for the curious)
1:38 "ChatGPT kept lying to me, 7*2+1 isn't 17"
2:18 "7*2+1 is 15 so we pick 17"
Crazy that it got the correct answer with the wrong method
the whole 73 prime thing is probably so that 100 is more easily do-able
It is weird. In all but 1 case they either picked the closer number OR they picked the number that was higher if they were equally distanced.
Except for 307! It is 8 higher than 299, whereas 293 (which wasn't picked) was only 6 lower
Nico is Lost mentioning White Stone Jazz... The niche Minecraft sphere is so niche it is self referencing.
Great video as always. You always do such a good job of covering a topic!
I swear to god you channel deserve million. If a was a UA-cam staff member I would have pushed to algorithm to promote you. Seriously you're awfully underrated compared to your level
This is basically 'work smarter, not harder'. So, from how I understand it, the better the obsorbtion, the more xp per minute. Don't let the wrong orbs build up, and build the right farm for it
The fact that I was completely unaware of these game mechanics is a good indication that I am a moron, and have absolutely no idea how to make an XP farm that doesn't involve manually jamming stacks of meat into a furnace.
that graph of average xp/orb vs total xp dropped kinda looks like a fractal to me
I wonder what it's dimentionaly is. could be a good value to include into "minecraft iceberg" sort of video :)
love your stuff
its not fractional, its discrete.
@@nikolasscholz7983wouldn't it still have a dimensionality though, just of a line? So 1?
@@abyssaljam441 dimensionality is kinda weird on non continuous sets. what dimension does the set {1,2,3,4} have? now map each of the elements onto another set of 4 elements and you have a structure thats similar to what is shown (just with more elements per set).
@@nikolasscholz7983 I guess, you can always double it, and get a really continious-looking graph in the end
then, we should define what our object actually is. I propose it being a set of rectangles, kinda like histogram
then, you can measure how it's area changes, when you double it's length. my guess it that it will be between 2 and 4-times increase, and thus this structure would have fractional dimentionality
although, the more I think about it, the more I feel like it will still be just 2 :sad:
@@nikolasscholz7983 yeah, about {1,2,3,4} set - I meant geometric dimentionality as I understand it, so we need to define some sort of geometric object to compute it
Damn, i thought this was a SoME3 submission at first, but then i realized it was posted in october. The detail and explaination in this video is amazing
This video is actually helpful especially in a modpack that makes XP essential for like using anything.
Great Video it was really entertaining and is well made. Keep up the good work.
One more thing to add about maximizing the value of orbs to pick up. XP Orbs are created highest first. So the highest value orb gets created first in the game code. This means that in theory you could use entity age seperation to split the orbs. In case of Ravagers they will always drop 2 orbs since they dont have equiptment. This means that if you were to seperate the different sized orbs the theoretical max rate Ravager XP farm is 612k xp/hr since that would be the maximum speed a player could pick up value 17 orbs.
Yeah, XP is weird... I wonder why Mojang wants to stick with this orb mechanic, if it is only a legacy thing or if there is an intended design reason. Aren't mass amounts XP orbs one of the reasons for lags too?
Part of The end Dragon fight.
Kill the Dragon, the "hardest Fight", you Get a Big flashy Reward of XP, raining Down on You.
xp in minecraft needs a reform
everything should just drop 1 orb, like endermen dropping an orb of 5xp
orbs of the same size should be able to merge, like a stack of items, like 3 endermen should be 3 merged orbs of 5xp (15xp total)
the maximum orbs picked up by a player should stay the same, it could start picking up orbs from these stacks by either xp size, orb stack size or start with the oldest orb first
this would greatly reduce the amount of orbs that will exist and will improve performance in huge farms
Would mending change the xp absorption?
For example does excess orbs go straight to the sword or take up the player absorption rate and then to the sword?
Wait, does this mean that if you could sort the pillagers into weapon holders/non-holders, you could kill only the holders and produce more XP?
that's not possible but yes
0:40 As a Computer Maths student, this hurts. Do you know why?
1:24 for the 1, 3 and 7, those can be binary limits. You have to remember computers start counting from 0, so:
2^1 has 2 states: 0(min), 1(max).
2^2 has 4 states: 0(min), 1, 2, 3(max)
2^3 has 8 states: 0(min), 1, 2, 3, 4, 5, 6, 7(max)
Maybe is just using the larger binary number aviable to set the size.
Interesting! The rest of the set doesn't fit though :-(
What i watch at 4 a.m. in the morning:
I'm feeling a bit called out right now
Kinda reminds me of all the math Zedaph had to have someone figure out for his _I XP'd Myself_ zedvancement. Also interesting that a Tactical Tickle farm gives higher rates than enderman farms...
I love weird math in video games, its usually a pretty solid analog for real life woth how the systems unintentionally built on top of eachother interact so weirdly.
That endermite farm clip was one of the most cursed things i have ever seen
Cool explanation! Never knew mob farming with saturated xp orbs would be a thing
great vid! cubicmetre did a video about the exp farms once, that covered the first part of the video, but most of this video was completely new!
Dude could cure cancer but he is playing minecraft.
Very interesting video, thanks for sharing. It's actually possible to sort xp orbs by size using the merging mechanic. Jonas paladin has a video showing the proof of concept. Essentially you use the fact that the border of the lazy chunks acts as a one-way barrier to xp merging (orbs can merge into lazy chunks but can't get out) in order to filter the orbs. It does require a constant stream of orbs of a known size, he uses creepers to filter the orbs of size 3 from a stream of guardian xp, leaving only the size 7 orbs.
If anyone is curious, the song in the beginning of the video is Joe Stapp - Another New Years Day
2:39 it’s because 73 is the best number in the universe. It’s a prime number, and 37 which is 73 backwards is also a prime number. 7*3 is 21, which is the position in the prime numbers list of 73. But, hold on, 21 backwards is 12, and guess what position 37 is in the prime number list? Yeah, 12.
The amount of XP you need to advance a level doesn't really increase exponentially; a better word would be quadratically
Is there a way to separate xp orbs by size? If you could make only the large orbs reach the player that would be useful.
a carpet
@Gomitasd How can you use a carpet to filter by orb size?
@@danielrhouck small orbs get stuck big orbs don't
@@danielrhouck maybe snow layers work too
The Minecraft dev might have been a big bang theory because in one Episode Sheldon calls 73 His favorite number. I think 73 is also called the Sheldonprimenumber or somthing Like that
it would be nice if xp merging will add the values, if only there was a mod to do it 👀
I wonder if the merging mechanic could somehow be used for filtering the orbs. Like, maybe with a little bit of setup before running the farm, it's possible to isolate groups of orbs and then have a stream of orbs out of which the desired (or maybe the undesired) ones get absorbed.
I feel like having slightly over max absorbtion is good for mending, but maybe each spawning layer above max absorption should have dispensers with water buckets to disable them.
Consider renaming your channel to Quantum Minecraft
Honestly, Mojang needs to introduce nearby exp orb merging like they did with drop stack merging (Way back in 1.4 beta in late 2012) as an anti lag measure.
Thing is they would need to change how orbs work to be more like base 2 where the orbs are 1/2/4/8/16/32/64/128/256/etc where 2 of the same orb can merge into a larger orb. Mojang may have done it the way it is because they felt it would result in few orbs but that was a long ass time ago and they have added a ton of mobs.
But the ultimate reason why they will never fix this problem is that they hate mob grinders. Its the reason why mobs that are too far from the player who can't engage the player don't move much. Its an anti grinder measure they fronted as an anti lag measure.
I couldn't fall asleep last night, your video helped.
Thank you!
This guy really ponders the orbs
I think the deviation in the climbing of the primes is about roundness.
So like if I remember correctly drawing circles with squares like pixel art strangely divide into prime bits. Making a quarter of the full circle image. Size 1 is 2^2
•
•
3
•
••
••
•
7
•••
••••
••••
•••
to save time I used the margin to act as the symmetry line.
Earlier when I was at my enderman farm I was just wondering if we couldn't maximize the absorption of the xp given. If I understood correctly, we can't do more than with our sword?
Bit late, but I can tell you why 73 was chosen. It's because it makes it very fast to create orbs for numbers around 100, which are basically very common in design. It's just a small optimization. 79's really awkward to use, so...
I love the fact that this was coded to be so complex. Everything from the 2x+1 to that chaotic graph... the complexity of this system shows the brilliance of Mojang at its peak. Minecraft is a game written by number nerds. I wish they went in these kinds of directions more for different mechanics..
don't know if it was already said but for the exp orb size, to know which prime number is chosen, it looks like it does do the (last size * 2 + 1) then looks at both nearest prime numbers and takes the closest. If there is a tie in the difference, they picked the one above, this would explain 73 instead of 79, a difference of 2 as opposed to a difference of 4.
It doesn't check out for the entire series. Most of the series, yes, but not the entire thing ;-)
Would there be a way to filter out/sort/separate out the higher level xp orbs using the merging mechanic and let the small orbs go into lava?
Perhaps you could first prepare some high level orbs, and cycle them on a conveyor belt with ice and let them go around past the player at max absorbption rate while those orbs get replenished by a farm producing those high orbs. The high orbs will stack, but the low value orbs will fall through and get killed.
Personally I don't have much skill setting such thing up, perhaps you could explore this concept?
2:35 I guess someone really liked the number 73. After all Sheldon Cooper says it is "the best number".
I believe the value of orbs has vern the same since xp was introduced so my theory is that Notch understood that the numbers should be roughly double so that there would be a small number of sprites, but wanted to allow duplicates so didn’t want to just use binary values and so randomly chose some primes by doubling his previous value with no particular rhyme or reason. No one’s ever messed with it cause there’s no reason to.
I’d be willing to bet it’s something very similar to that and yet it still bugs me that there isn’t a pattern.
Huh, I never even considered the possibility of popping xp orbs on a cactus, much less the idea that it could grant you faster xp somehow. But it all makes sense now!
73 is special, its prime number 21 and both its digits are prime, when multiplying its digits you get 21, that’s why it is sheldon’s favorite number
I feel like anytime i watch this channel i realize how much minecraft is just spaghetti code
That orb grouping mechanic is wierd... wonder why they chose that over just merging the orbs. Maybe a performance reason?
4:55 That is (I think) the first fractal I have ever recognized as one without it being labeled as such.
That _sweet sensation_ when ya get the Large XP Orb... that sound, man
Additionaly querks of xp are its iregegular scaling and the fact that it burns. why is xp destryable?
Is there gonna be a tutorial or scematic for that 130k pillagers oer hour farm?
fortunately there's at least one mod out there that clumps XP together as you'd think it would
73 is the Sheldon Cooper favorite number, it has some nice properties.
This video is truly excellent. Very nice visuals and clearly explained :)
I was puzzling over the numbers a bit again because the logic for the formula doesn't really feel right to me, and I came to realize that every number after 1 can be made of a simple combination of preceding numbers, i.e. 3+3+1 = 7, 7+7+3 = 14, 17+17+3 = 37, etc. In fact, 73 is still an unusual outlier, because all of the other numbers barring 1 and 3 follow a pattern of [x]*2+3. I have to wonder if the reason 73 doesn't fit in cleanly to either calculation is because it was just a mistake.
whats the name of the song at the first part ( the one that goes bo bo bow)
Ah yes, destruction, my personal favorite way of gaining xp.
While in orb group saturation, will the player ever collect ungrouped orbs? If so, wouldn't making the farm larger then required for group saturation result in a lower XP as there are more orbs that are ungrouped then neccesary to achieve the saturation.
If this is the case, wouldn't it be optimal to design are farm that runs at full capacity to spool up to saturation and then reduces spawn rates to maintain saturation with minimial excess orb generation?
Ya know. Even outside of all the niche mechanic weirdness, Minecraft probably shouldn't have xp at all. There are a few ways you could replace it, I would just make enchanting cost lapis only (but more of it), make anvil repair not increase in cost and cost lapis for combining, and make the mending enchantment somehow buff anvil repair
With enchantment books, and worse, villagers selling these books, xp became a little useless. Using only lapis would be nice
amazing video (the video was posted 20s ago)
lol
I asked bing chat ( now copilot ) about the significance of the numbers and one section of the response was correct. "Tell me significance of the numbers 1,3,7,17,37,73,149,307,617,1237,2477" "Mathematics: Mathematics is the study of numbers, patterns, shapes, and structures. Some numbers have special properties or significance in mathematics, such as being prime, perfect, Fibonacci, or transcendental. For example, the numbers 1,3,7,17,37,73,149,307,617,1237,2477 are all prime numbers, meaning they have only two positive divisors: 1 and themselves. Prime numbers are important in many areas of mathematics, such as cryptography, number theory, and combinatorics." Not really sure why you asked the AI to do math, because that's the thing it is the worst at when you could just ask about the numbers directly.