How long should you wait to harvest your crops in Minecraft? -- Optimizing periodic farms

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone today we're going to be answering the question how long should you wait before you harvest your crops in Minecraft if I was to periodically Harvest a crop that is wait a certain amount of time and then Harvest wait a certain amount of time and then Harvest and then wait a certain amount of time then Harvest and so on what is the optimal time that I should wait the answer turns out to be dependent on what crop you are growing and specifically the number of growth stages that crop has in this video I will outline the Minecraft prerequisites followed by the math prerequisites to understand the question I will then show the answer as well as some of the interesting math that arises along the way to understand crop growth in Minecraft we first need to understand how the game processes random events the game updates itself every 1 20th of a second these updates are called ticks in each tick three blocks in every 16 by 16 by 16 area loaded like this pink Cube are chosen to be updated randomly if a block is chosen in this process it is said to have been random ticked random ticks dictate many events in the game if ticked fire can spread ice can melt and for our purposes crops can grow crops in Minecraft have growth stages that dictate when a crop's items can be collected for example here we're looking at wheat wheat has eight growth stages labeled zero through seven when planted all crops began on growth stage zero if a crop is random ticked it will advance to the next growth stage if a crop is harvested it will only yield items if it's on its last growth stage so here we'll see only seeds we only got wheat on the last one it is important to recognize that certain crops have more growth stages than may appear for example carrots have eight growth stages but only four visually distinct stages we will care about the true number of growth stages in this video for any specific crops true number of growth stages please refer to the Minecraft Wiki it is also important to recognize that certain crops have an additional probability of a random tick not advancing the crop to the next growth stage for example amethyst shards have four growth stages but only a 20 chance that a random tick will advance the crop to the next growth stage this is by Design as the developers wanted growth to be slower for amethyst clusters than normal crops finally it is also important to recognize that periodically harvesting crops is not always the best option to maximize returns for example a simple observer-based Farm will outpace a periodic form for sugar cane with all other things constant this video only focuses on maximizing periodic forms of course there are still blocks in the game where the best option is a periodic form illmango points out in this video that amethyst clusters are a good candidate for a periodic Farm in fact my initial inspiration for studying this question comes from this video so what can be said about periodic Farms first let's focus on a single block as we assume that the growth of one crop block is independent of another let's also imagine that the block has a number written on it to represent the number of random ticks the block has received it is known that a block is random ticked on average every 68.27 seconds this means that the label on this block will increment by one every 68.27 seconds on average an individual block May increment in 5 seconds or 500 seconds but on average we expect that it'll increment every 68.27 seconds the first question to answer is after we wait T seconds what is the probability that the block has K growth stages for example if we wait a thousand seconds what is the chance that the block now shows that it has received 12 random ticks because we know the expected number of time between ticks we can use a mathematical tool called the poisson distribution to answer this question in our case the expected number of random ticks in a given amount of time T is T over 68.27 if we know the expected number of random ticks in a given time then the probability that the label X on the Block is equal to K is given by the following equation here the left hand side of the equation is notation for the probability that the label X is equal to K growth stages the e in the right hand side of the equation is the base of the natural logarithm and is roughly equal to 2.718 the K exclamation point means to multiply all of the positive integers less than or equal to K together for example 5 exclamation point is 5 times 4 times 3 times 2 times 1 which is 120. this operation is called a factorial for those curious let's use this formula on our example if we waited T is a thousand seconds the chance that the block has received 12 random ticks is so there is a 0.8 percent chance that the block has received 12 random ticks after a thousand seconds notice that for our application we don't care about the block reaching a specific number of random ticks we only care that the block has received at least as many random ticks as there are growth stages this is because once a crop has received at least as many ticks as it has growth stages then harvesting will yield an item I.E it's on its last growth stage let's call the number of growth stages for our crop n therefore we really need to consider the probability that the label is at least n which is given by the following equation here the Greek letter Sigma means summing over the possible labels K from 0 to n minus 1. so for our example we should really care about the probability that the block shows at least 12 random ticks after waiting a thousand seconds that calculation looks like this so there is a 79 percent chance that the block has received at least 12 random ticks after a thousand seconds finally to get an expression for the crop returns per second we would get if we were to harvest our example block at time T we simply divide that function by T let's call our crop returns function f sub n of t this function gives the returns one would expect if the crop we are growing has n growth stages and we wait T seconds the question of when is the best time to wait is now how do we maximize F sub n of T over t for a given n we can more easily study the maximum of f sub n of t with the related function G sub n of T which is defined like this this function has the following relation G sub n of T is useful because if the maximum of G sub n of t is a value we'll call it Lambda n then the maximum of f sub n of T is 68.27 times this Lambda n intuitively G sub n of T represents the crop returns if blocks got updated once per second on average instead of 68.27 seconds so we will focus on G sub n of T to get to the heart of the problem oh the goal of this project was to get some expression for the function Lambda n which again intuitively is the optimal time to wait for a crop with n growth stages to be harvested to maximize returns if blocks got updated once per second on average viewers that know calculus know that one can find the maximum of a function by taking the derivative and setting that equal to zero this is how we get our first expression for Lambda n so we calculate the following Computing this gives the following expression for Lambda n though it's not possible to isolate Lambda n from this equation this relation is plenty fine for root finding algorithms we can compute the first few values of Lambda n easily using these algorithms the first couple values of Lambda n are shown here let's use this table to replicate the calculation that ill mango does in his video for amethyst clusters amethyst clusters have four growth stages and a one in five chance of being updated if random ticked they also grow on the sides of blocks and are only updated if the block that it rests on is random ticked as there are six sides on a cube and the side that receives a possible update is uniform random we get that the optimal time to weight is 68.27 times Lambda 4 times 5 times 6 seconds which if we do the math yields about 10 000 seconds or 167 minutes which is the result ill mango arrives at this means that if we want to wait a certain amount of time to maximize our amethyst Crystal Returns the best time to wait is 167 minutes this means that if we harvest the amethyst clusters then wait 167 minutes and then Harvest them again and then wait 167 minutes and then Harvest them again this is the best possible time to wait to maximize our returns notice that other crops may not have the factor of five or six we saw in the previous calculation as those are both specific to Amethyst growth as an aside the most accurate answer to Ill Mango's question is given in ticks as that's the most accurate clock you could make in the game here is the calculation for ticks where we see that 199 937 ticks is the best time to wait for harvesting amethyst clusters the previous table should be sufficient for answering any questions in Minecraft as of early 2023 as there are no crops currently in the game with a high number of growth stages I was able to calculate this table for n less than or equal to 140 before the root finding algorithms I was using started failing in the previous section we showed a table of values for Lambda n for small n these were estimates generated by computer algorithms of the True Values can anything be said about any of the values of Lambda n exactly it turns out we can write exact expressions for Lambda 2 and Lambda 3. using lagrangian version one can find the following daunting formulas for these two quantities here's the expression for Lambda 2 and here is the expression for Lambda 3. where this is taken into account and s a b is the a beef Sterling number of the second kind these formulas are useful if your application requires more digits of Lambda 2 or Lambda 3 then provided in the table uh for the rest of the video I will discuss an approximation for Lambda n for large n that I arrived at with the help of my advisor Professor Ito benari together we found an asymptotic expansion for Lambda n for viewers not familiar if we have two functions f and g f is asymptotic to G if the limit of their quotient as n goes to Infinity is one set another way the relative error so the limit of the difference of the two functions over the original function as n goes to Infinity goes to zero for example F of n is N squared plus n is asymptotic to G of n is N squared even though the absolute error this strict difference between the two functions goes to Infinity let's look at the asymptotic expansion of Lambda n the formula Professor Ben re and I found isn't immediately relevant for Minecraft as there are no crops with a very large number of growth stages regardless I was curious to see how Lambda n grew an n and Professor benaree was more than willing to help me out so how do you get an asymptotic expansion for Lambda n first we use this alternative definition for Lambda n that I found this definition is useful because we can use laplace's method to approximate the integral on the right hand side of this equation this gave us a way to find the leading terms of Lambda n which we determined to be this expression we also found the more accurate but uglier expansion here these formulas may be used in the future in Minecraft if Mo Yang introduces a crop that has a very large number of growth stages otherwise the table of values shown earlier should suffice for optimizing any periodic Farms as of early 2023 foreign so in this video we found a function Lambda n that is critical in finding the optimal wait time for harvesting crops in Minecraft we calculated 16 values of Lambda using a computer we then showed that Lambda 2 and Lambda 3 can be written exactly finally we gave an asymptotic expansion for Lambda n which is good for large n it may be possible to write an exact expression for Lambda n but I was unable to find one I'd like to thank Professor Ito bennettry for helping me arrive at the asymptotic expansion for Lambda n his enthusiasm for my work has always been a main motivator in my mathematics Journey finally I'd like to thank you all for watching if you enjoyed the video feel free to leave a like or a comment have a nice day
Info
Channel: Jack Hanke
Views: 12,560
Rating: undefined out of 5
Keywords:
Id: p9B3f4fpmwc
Channel Id: undefined
Length: 14min 20sec (860 seconds)
Published: Wed Apr 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.