Victor Baker
- VictorBakvis
- victorbakvis
- Europe/Stockholm
- Yes
- No
Victor Baker: There's nothing new with your results. All of the stats of your horses were below average, so an increase is expected. The bug/misfeature isn't about breeding a perfect horse, it's about wanting any kind of increase in stats for breeding above-average parents. There isn't any point in breeding below-average horses like you did when literally 50% of horses are above-average. This isn't about 0.01m/s increases, you can't get anywhere near the best stats as it is. Breeding isn't fun when your expected outcome is bad horses. (Bad being defined as worse than the parents.)
See these three images for the distribution of the stats. Your breeding results are somewhat good but nothing stellar and likely you aren't going to get anything better. 28 hp is good, but hp has a different distribution and is thus easier to get up.
http://i.imgur.com/M7HpUcJ.png | http://i.imgur.com/ie1n9uR.png | http://i.imgur.com/QoeRpFc.png
Jump strength is relevant in the minecraft world. It is the upwards speed at the base of the jump. The total jump height is then affected by gravity so the relation between them isn't linear.
Since it's buried in the comments now, here's my current suggestion for a more fun mechanism which is compatible with current stats and allows to get an increase in stats while still being competitive in the upper range (you can't get perfect).
Victor Baker: They are the distributions of wild horses and thus also distributions of the random factor (the infamous "third horse"). The problem is that the random noise is centered on the average of all horses instead of the parents' average and the fact that the random noise has the same distribution as the horses, making a drop towards average even more likely.
From this picture showing the expected increase in stats you can check your progression:

Your best horse's stat average is now ~0.68 according to this chart, which makes sense if you bred 170 horses (at a cost of 150 gold). To take you to an average of 0.8 (which would mean 27 hp, a 4.5 high jump and a speed of 12.6 m/s, still far from the maximum) would take you well over 1000 breedings. For most of us that doesn't sound fun.
Victor Baker: That would actually make things arguably worse, because it would reduce the variance and getting an increase in stats would be even more difficult. Trust me, it won't be that simple - the whole third horse concept is flawed.
My suggestion isn't complicated - it's just a mapping of an infinite range of "goodness" into the finite stat range with a logistic function and giving an increase or decrease in stat a fair 50% chance. Plus selecting each stats randomly from one parent to get some sort of likeness more apparent.
Victor Baker: I think there is a misunderstanding here. If you take my suggestion to the extreme, giving the random part a multiplier of 0, you would actually always inherit each stat from one of the parents without randomness which is exactly what you describe, making finding a good exceptional stat important. What the mapping would do is give a slight variation to the stat while at the same time making perfection impossible. In your suggestion the foal's stats would still be at the average of the parents' stats, so it wouldn't do any good to breed horses with different exceptional stats.
Edit: This discussion has given me an idea that I tested and I might change my suggestion to as follows:
newStat = (statRandomlyFromEitherParent + 1.65*randomNumber(minStat, maxStat))/2.65
So instead of both parents use one, the "third horse" is uniformly distributed instead of using the wild horse generation (no amount of multipliers can make that give the same distribution). The chosen multiplier seems to do a good job at keeping a randomly breeding populations' stat distribution same as for wild horses
Scratch that, absolutely too much variance. I'll stick to my previous suggestion.
Victor Baker: I know changing the system is necessary. The current system doesn't work even in principle because if you happen to lose high-stat horses you can't overcome your loss. The formula you mentioned won't work for reasons mentioned before. The system I mentioned is actually the exact opposite of a completely new system - it's essentially using the same formula for wild horses and bred horses. The only thing changed is that the values used to generate a horse are kept and inherited instead of discarded.
Jump strength isn't the same as jump height because gravity affects jump height. If you are an op, you can already get the exact stats with the entitydata command.
Victor Baker: I can't see any point in rounding the stats, the game can handle the numbers and for the player it's precise enough to keep track of the jump height. Anyway, calculating the stat values that correspond to a certain jump heights (simulating gravity) is much more work / code than the suggested breeding formula change. I just can't see any benefit to it. Even health isn't rounded internally.
Victor Baker: I think your wanting to quantize the stats because you are bothered by not having perfect information is besides the point of this bug report and perhaps should go to the suggestions subreddit. The method you mention seems completely ad-hoc without any statistical basis.
I might add that if you saw my last post, in the example I gave two horses that jumped 2.64 and 2.81 blocks managed to give birth to a horse that jumps 3.96 blocks. The difference can thus be notable without resorting to quantization, if only the breeding formula wasn't wrong.
Victor Baker: The code might look scary, but conceptually it's the easiest thing one could ever think of and there is already working code for Mojang to copypaste. What we were just talking about is a way to create the values for old horses that have lost the needed information, which would be nice but in the end is optional. Think of it as creating fairly three dice rolls that have a certain sum.
Yes, the New is calculated with three random variables and no, even calculating the "New" with just one variable wouldn't work. It came up before here
I might have to make a picture tutorial of the suggested system to make the concept more clear.
Victor Baker: Previously generated horses can be given a default U-value of 0.5 if backwards compability isn't needed, given three equal U values corresponding to their stat or creating new correct values what is what the algorithm jonathan2520 posted today does and is what we have discussed today. Here I have dwelled on the issue of why it's more relevant to look what the formula does on an arbitrary horse rather than check one set of known parents. I just wanted to show the limit but what matters more is the drop from generation 0 to generation 1. The limit is what you get if your horses have regular accidents.
The graph shows that using one random variable loses variance. I can mention that it would work if the one random variable was given a multiplier of 2.5 and the parents 1 both. But this would mean that bred horses are essentially completely generated anew, which would discourage exploration and make foals look a lot less their parents.
I'll just add that if we look at just a fixed breeding, that variance doesn't really matter - it's always the same since it comes from the fixed random part. What matters there is the expected value that is dependent on the chosen parents and whether it is too bad or too good. The problem is that you can't easily tell what that expected value should be because it depends on the chosen parents. Variance is just a mathematical tool that tells the expected (squared) difference from the mean and it's simple to calculate. If the variance after the breeding doesn't match with the variance before the breeding, we can tell that the formula overall gives values that are too near to or far from the mean.
Victor Baker: We can prove it in a similar manner than we can prove the current system doesn't preserve variance.
Horse breeding seems to be much more functional than as described here. I've bred some 170 horses, starting out with two fairly crappy wild specimens (the best one had 22 HP, 2.5 jump and 8.6 m/s speed). Presently, my best horse has 28 HP, 3.750 jump and 10.4 m/s speed (as measured in vanilla, without third party software). It's far from perfect, but there is definite progress. If the basic formula still averages stats of both parents + random factor, I see nothing wrong with that. It will become progressively harder as the horses get better, as it should. Furthermore, I don't believe that it should be possible to breed the ''perfect horse'' without having to hunt down the exceptional wild specimens in the process. Inbreeding should not be rewarded! That said, if you were to change anything, then consider calculating the jump stat in a similar manner as the health stat. If the jumping stat were expressed in discrete values that make different values actually relevant in the minecraft world, then it would be possible to achieve the maximum of 5.5 through breeding. If, say, the jumping stat were rounded to the nearest 0.125 multiple (the height of a layer of snow), then a ''perfect'' horse would only need a jumping stat larger than 5.43625 (5.375+0.06125). Rounding would only affect the actual jumping height and the un-rounded value would still apply to breeding. This way, your 5.49999999999 horse actually gets to jump that extra half slab. As for speed, it really doesn't affect the horse quality much if a horse is 0.01 m/s slower than maximum.
@ Meri Diana. Ethics aside, inbreeding limits the gene pool and, consequently, it reduces variety (here: in the three stats). If you breed with only two horses, you rely solely on mutations for improvement. Mutations are very slow to come to expression (especially in an already sophisticated creature). That's what I meant with "inbreeding shouldn't be rewarded''. If, on the other hand, you have a large gene pool to work with, favorable traits are much quicker to come to expression as natural selection/selective breeding weeds out the inferior specimens. The simple formula of averaging the parents stats + random factor (mutations) is an elegant representation of these mechanics. Furthermore, if a parent is superior in something, it is likely that the offspring is also good - but worse - at that thing. This is also nicely captured by the formula. The fact of the matter is, genetics are quite randomly assigned to the individual offspring and not - as you suggest - willfully assigned based on what parent can bring more to the mix. It is only the killing off of the weaker specimens that creates progression over time. I do agree that horse breeding should be rewarding, but honestly: how easy should it be to breed the perfect horse? I've bred horses for a couple of days now, and the stats have increased tremendously. I will keep on trying to breed better horses, but I don't expect I'll ever reach perfection. And that's ok
@Altti Tammi
As long as the ''random'' factor isn't biased, Then I see no reason why selective breeding couldn't continue to improve stats. Yes, breeding gets harder the higher your stats are, but that's supposed to be the case. What are these distributions representing precisely? The distribution of the random factor?
If the random distribution is truly as such, then I'm inclined to agree with you. However, wouldn't it be easily fixed by fiddling with the distribution of the random factor? For my part, I'd have the probability of each possible value equally distributed. In fact, I assumed this was the case already. Where did the data for those distributions come from?
If equal distribution is too rich for mojang, they could at least soften the bell to rebalance breeding. There is really no need for complicated formulas and selective assignment of genes.
Then, perhaps, wild horses need to be rebalanced instead? I suggest to randomize three sets of stats per horse and take the average of that. That is much more likely to produce average wild horses. Though, personally, I like the idea of horses with one extremely good stat. They're just as likely to have have horrible ones and they are probably not decent in all three stats That's where breeding comes in handy.
I do get what you're saying. There may be an argument for reducing the random factor altogether. That way, though, breeding below-average horses will be more tedious and you'd pretty much have to search for wild horses with good stats to breed with. I don't think it'd be fair to have it both ways (more influence of random factor when the stats are below average, and less when the stats are above). However, there really is no need for complicated formulas to rebalance the system. Just refactor the impact of the random horse vs. parent horses. Don't remove the randomness of genetics though. So, maybe. a weight of 0.5 for the random horse and 1 for each parent?
To elaborate: reducing the influence of the random horse will allow for more targeted breeding with less ''noise'', while still being essentially random. It will be harder to breed good horses from mediocre ones, but horses with excellent stats can more steadily transfer those stats to their offspring. As the stats get higher, the impact of the noise gradually increases, but you'll be able to get a lot more out of selective breeding. Actually, perhaps a random weight of 0.5 is too low, but there should be a balance somewhere.
It's not that fair though. You want a nice and steady increase in stats, but that's not very realistic nor is it challenging. Reducing randomness would make finding horses with one exceptional stat all the more important, but you'd be set if you find all three of them. Even without all three, you could still max out each individual stat through breeding, and breed the results with each other (individual stat breeding is so much easier). Anyway, it quite resembles real breeding if it's set up like this. The current system is also representative, but it is too tedious (as many have complained).
It'd be easier to transfer already good stats to new generations of horses, which is not to say that developing new stats would be any easier. You are completely right on that account. The process of breeding would get more difficult as horses get higher stats, as it should. Anyway, I do think a slightly better edge would be a good thing, but it really shouldn't be too easy to get into the 90 percentile.
I still think that's it's not realistic to be able to breed your way beyond the 90 percentile without incredible effort / luck. However,I do get the compulsion. I'm not much of a mathematician, but I've been trying to come up with a suitable formula that doesn't over complicate things but still does the trick:
(pA+pB+pR)/3 + F/(2*pMAX - (pA+pB)) where F is a random error with a small interval around 0. The whole second term is random mutation that is likely to be larger as pA and pB approach their maximum values.
I agree with you that it's not realistic, nor it is of much practical use. Still, some people would like to breed towards perfection. Not being able to see any progress for a couple of thousand of breeds at some point, seems, somehow, kind of mean.
@Altti Tammi. Are you sure that a completely new system is really necessary? In principle, the current system works, despite the fact that breeding higher quality horses becomes unreasonably difficult at some point. How about leaving the basic system as it is and introduce a small mutation that increases as the parent's stats get higher? That way, things will be kept simple and tweakable for mojang, breeding higher end horses will be doable (by the grace of mojang), and the system would only significantly affect the high end horses. Here's my suggestion for such a sytem:
(pA+pB+pR)/3 + F/(2*pMAX - (pA+pB)) where F is a random error with a small interval around 0. The whole second term is random mutation that is likely to be larger as pA and pB approach their maximum values.
Also, as for being able to track progress in vanilla, I suggest rounding the jump statistic to the nearest 0.125 multiple (a layer of snow). That will enable people to accurately check the horses jump statistic by jumping over obstacles. Speed is already easily recorded with a redstone racing track (the longer the track, the most accurate the statistic) so it really does not need to change. Health also seems pretty straightforward and not in need of a change.
@Allti
Seems to me that your formula has become measurably more complicated than the ''old'' one, but perhaps I'm just ignorant. Still, don't expect mojang to fix this problem if it can't be done so with just a few lines of code. As for the jumping height/strength difference: then round jump strength statistic to the nearest statistic that corresponds with a 0.125 multiple of jump height. Is that a better resolution?
@Altti
Well it's really not though. In vanilla, there's only the jump-over-obstacle method to determine jumping height. The most precise reading involves jumping over snow layers, which are 0.125 in height. If minecraft were to let players have an accurate measurement without having to resort to mods, rounding the jump height would be a way to do it. Also, if calculating the correponding values is too much, then just disconnect the gravity for upward movement all together.
@ Patrick I hadn't thought about potions of leaping, I stand corrected! Oh and carpets only get you so far as they need to be placed on a full block. Anyway, I guess that makes measurements accurate to the point that rounding is not really needed.
@ Jonathan You've inspired me to think of another way to measure jump height, and I think I've come up with something pretty neat.
I want to revisit the idea of rounding the statistics. If the statistics were to be rounded (the actual values, that is), then it could benefit the breeding process in two major ways: First, horses are noticeably different from (or equal to) each other. This means we don't need mods to be effective breeders (yes having to resort to mods is a bad thing) and we also don't need to be jumping over enderportals and cacti while splashing our horses with potions. Second, the probability of breeding better offspring increases at every level. Also, the probability of breeding equally good offspring increases.
Breeding example with two identical horses:
with rounding to multiples of 1
80 80 0-100 odds of improving stats --> 0.185^3 + 0.185^2*0.03*3 +0.185*0.03^2*3
80 80 0-100
80 80 0-100
= 0.006331625 + 0.00308025 + 0.0004995 = 0.009911375
Chance of equal stats 0.03^3 = 0.000027
Equal or better= 0.009938375
with rounding to multiples of 2
80 80 0-100 odds of improving stats --> 0.17^3 + 0.17^2*0.06*3 +0.17*0.06^2*3
80 80 0-100
80 80 0-100
= 0.004913 + 0.005202 + 0.001836 = 0.011951
Chance of equal stats 0.06^3 = 0.000216
Equal or better= 0.012167
with rounding to multiples of 10
80 80 0-100 odds of improving stats --> 0.05^3 + 0.05^2*0.3*3 +0.05*0.3^2*3
80 80 0-100
80 80 0-100
= 0.000125 + 0.00225 + 0.0135 = 0.015875
Chance of equal stats = 0.027
Equal or better = 0.027+ 0.015875 = 0.042875
without rounding
80 80 0-100 odds of improving stats --> 0.2^3 + 0.2^2*0.03*3 +0.185*0.03^2*3 = 0.008
80 80 0-100
80 80 0-100
odds of improving any of the stats by at least 1 --> 0.18^3 + 0.18^2*0.02*3 + 0.18*0.02^2*3
= 0.005832 + 0.001944 + 0.000216 = 0.007992
Chance of equal stats: n/a
-
The odds improve as the chance to retain the parent's statistics increases. New horses will be more significantly better or worse compared to the current system. With rounding to multiples of 10 (just for illustration purposes), breeding two 80% horses gives a 1.6% chance of producing a foal that is at least 83.33%. The larger the multiple becomes though, the larger the gap between breedable values and the perfect ones. Perfection can then only be achieved by finding the perfect stats in the wild. Still, breeding should become more rewarding and less tedious if the statistics were rounded.
And for all this, the ''old'' formula does not need to be changed.
@Allti
From a mod post:
"The algorithm should be simple, both for performance and so they can understand it, and therefore tweak it as desired.
It should be possible for children to be both better and worse than their parents.
But children should probably be similar to their parents, rather than weighted towards average values.
They're probably not expecting players to breed horses hundreds to times to get decent results.
Most players aren't going to have any way of getting hard numbers about their horses' stats, and will have to rely on their perceptions."
It seems that being able to notice stat difference is a preferable outcome to changing the formula. Furthermore, since this bug report does not technically describe a bug in the first place, offering suggestions for changing the method is appropriate here. Rounding would be so enormously easy compared to your suggestion, and beneficial to breeders that don't use mods and breeders in general.
@Jonathan&Allti
Don't you worry about my breeding experience, everything is going just dandy. All I'm trying to do is help figure out a reasonable solution to this barely significant problem. I'm obviously not as well into the material as you guys, but I can tell you one thing: your solutions are likely to be too complicated for mojang to bother with. Anyway, I've been reading some of the previous posts and I've come across something that I've possibly completely misunderstood: In the breeding formula (Pa+Pb+New)/3 , is the ''New'' variable actually calculated using three random variables (i.e. the same way a wild horse in generated)? If so, what is the logic behind that and wouldn't the strong tendency towards the average be offset if the ''New'' variable were to be calculated using only one random variable?
@Allti. I understand your alternative, Im just not a fan I'm afraid. Introducing your system might be well possible, but far from practical. For example, how would already generated horses be treated after introducing this new system? Are their ''U'' values retrievable, or should they be assigned new ones? Oh and the graph illustrating why it is ineffective to use one random variable for the ''New'' statistic, does not add up for me. As I understand it, your argument is that, either way, the foal is the result from 2*3 (parents) + 1 or 3 (wild horse) random variables, hence reducing variance. Yet, if you breed, the parents' stats don't get recalculated: they are set and (usually) known. Therefore, comparing foals variance for an indefinite number of breeds seems out of place. Do correct me if I'm wrong, but, for any one breed, the variance of the foal's stats should be the same, right?
Edit: seems like I accidentally stumbled upon an emoticon
@Altti Using one random variable instead of the weighted average of three is supposed to result in less variance, how exactly? Using one random variable and fixing the parent's stats, you'll find that the variance actually triples vis-à-vis the current formula.
Here's the result of a quick simulation. I fixed the parents average stat at 0.5, but any other fixed value won't affect the distribution one bit, obviously. The first variable resembles wild horses, the second variable are bred horses under the current system, the third are bred horses under the alternative.
Descriptive Statistics
________________ N Min Max Mean Std.Dev. Variance
Wild_generation 10000 .17 .84 .4994 .09451 .009
bred_0.5__prnts 10000 .39 .62 .5005 .03213 .001
0.5_prnts_1_rnd 10000 .34 .66 .5008 .05561 .003
Edit: tried to align the table somewhat better.
@Altti. We are making two different points here. I pointed out that, vis-à-vis the current system, using one random variable increases variance. You deduce that, either way, the variance is below that of wild horses. I'd like to ask: so what? It makes perfect sense that the variance would be lower in a system where two-thirds of the weighted average value is fixed. On a different note, I'd like to share my current breeding results to illustrate that breeding, despite popular claims, is rewarding after all. Here are the normalized values of my eight best horses (my entire current stock) after 508 breds:
Normalized Horse*
0.7429
0.7221
0.7221
0.7117
0.7117
0.7155
0.6919
0.7196
*All observed values are rounded down, so these are conservative estimates.
Just to put the breeding mechanics into perspective: You'd have about a one in 150 chance to find a 0.70+ horse in the wild. As for my entire collection, the wild horses you'd have to find would be well over 1000. On my current world, I've explored about 2000 blocks in any direction (excluding a couple of remote locations I've ventured to through nether portals). All in all I've found some 8 horses (two herds, to be exact)... Well, you get the picture.
Edit: I might also mention that my breeding methods are far from efficient horse wise (rather, it's more focused on time/effort efficiency). I usually breed in herds of 4-8 (depending on the quality gap) and about 4 out of 5 horses never make it out of the pen (they fail the health and jump minimum requirements). The other horses get a thorough testing, but everything is done without mods so a certain margin of error remains. The whole process spits out some 20-40 horses per hour.
@Altti. Again, determining how much variance should be retained is completely subjective.It is fair (also subjective, clearly) to look at individual breeding instead of population breeding, since the debate is about whether the current formula is sufficient to allow for improvements through selective breeding. The question is also whether you should be realistically able to improve along the entire range of qualities (should it be possible to approach a normalized value of 1?) Personally, I think that the formula is already effective (see my own results) and that any improvements in the formula are only warranted if the effort to implemented such improvement is very low. I also think that implementing your alternative system is not an example of such low effort. Anyway, all in all, I think I've made all the points I wanted to make in this thread. Any further back and forth will likely be repetitive, so I'll release you of the burden of replying to my clear nonsense. Still, I hope that you'll keep in mind that there is such a thing as over complicated solutions to minor problems and that any change you suggest should weigh of the costs/benefits from a wider Minecraft perspective.