mojira.dev
MC-16533

Horse Breeding never exceeds egg/spawn horse attributes

Foal stats (health points, speed and jump strength) doesn't seem to ever exceed all stats of the parental horses.
If you breed two exceptional, high-stat horses, it rarely happens that the foal will have slightly better stats than its parents, so far, in 4 years of breeding tests, this only ever occurs in one single stat, if you take 2 high level stat parents to breed with.

This happens because a third horse with stats varying in range from the lowest to the highest is added into the equation.
While this is very useful for Donkeys and low-stat horses, this makes it apparently close to impossible to breed out a high-stat foal that can surpass its high-stat parents in all categories.

[media]

In the comments of this bugpost are many suggestions how to improve on the breeding formula, a comparably simple approach would be to go by real life, where high-stat parental mobs produce also high-stat offspring (e.g. see high-priced bulls/milk cows, but also horses, keyphrase: "selective breeding"/"artificial selection").

If the "ominous third horse" as random factor shall remain in the formula, it could be adjusted in that way that high-stat parents could also have a high-stat "ominous third horse" being used for the equation, basically a higher range that excludes the very lowest stats, but still includes slightly worse/lower stats than the parental horses, to account for the possibility of a negative mutation like in real life.

Similarly then for low stat parental horses, here excluding the highest stats, but the range being still slightly above the parents' stats to account for positive mutations like in real life ("evolutionary/genetical improvement", "natural selection").

As a result of this issue, it's basically not really worth it to breed regular horses.
You are usually better off hunting wild/naturally spawned horses and hope for one with higher stats than those you've already obtained or bred.


Old bugpost with additional information:

I have noticed after extensive testing that foal stats do not exceed spawned horse stats. As a result the only way to obtain a horse with exceptional stats is for it to be caught in the wild/spawned. After multiple breedings I was not able to reproduce or produce a foal with stats better than the best stat parents, while the foal can be born with stats slightly better than one, it was never able to be as good or better than both parents.

Two horses I had spawned from eggs both had exceeded stats in run speed and hp/jump ability, foals from these parents never matched or exceeded their stats. (on spreadsheet refer to column 17-10, all breedings after 17 involve offspring from these two parents being crossbred with other breeds with favoured stats)

I thought this would be worth noting as a possible bug as many are under the impression that breeding is supposed to have a chance that the foal born is to be as good or better than the parent. This is obviously not the case and may be a cause for review.

Please refer to the attached spreadsheet of breeding results.

Additional notes:
Speed was measured on a Redstone track that is 40 blocks in length which takes a normal player 10 seconds to complete at the current running speed in the latest snapshot.

Edit 27/05/2013

As suggested in comments I did another round of tests, this time by breeding horses with identical data, the following data in

[media]

reveal there is the possibility of a foal being born with matching stats and on a very rare chance be slightly better, the chance for better stats was higher with jumping ability, speed has a much lower chance to be on par and a higher chance to be worse, and hp is a medium chance to get matching stats, but very low to get better.

It is confirmed that likeliness of stats is increased if two horses match, however this poses the problem that you would need to rely on data-mining in order to ensure you are breeding matching horses to improve horse stats and would be impossible to manage in multiplayer games unless a mod was made to reveal horse statistics. This would still cause the issue that spawned horses may always be better as people would give up breeding due to horse stats not improving when the breeding pair stats do not match.

I removed personal studies within the game due to speed inconsistencies which happen when mounting/dismounting and leading (refer MC-16421) and have left the hard numbers extracted from NBTExplorer on the spreadsheet.

Edit 19/07/2013

Attached a new image of breeding results as of 1.6.2 with colour coding to show how the current breeding methodology is working.

Linked issues

Attachments

Comments 179

After breeding several horses for hearts I've gotten new horses with higher stats than both parents, but only in cases where both parents had the same number of hearts. I.e. I've bred two horses with 11 hearts and gotten a foal with 12, but haven't been able to get a foal with 12 hearts by breeding a horse with 10 and one with 11. So I believe at least for hearts (haven't tested speed or jump height yet) it is possible to breed up to a high quality horse from lower quality horses, but you have to get up to having two horses of the same hearts and then advance 1 heart at a time till you get to the maximum.

I will test this theory and upload a second spreadsheet once I have finished.

Can you upload your results to pastebin or something instead of an Excel sheet?

Also, I've double-checked the math and I don't see any errors. The offspring get (Pa+Pb+New)/3 in its attributes. Should be able to produce both higher and lower values than its parents.

I have attached them as jpg for you as pastebin wasn't able to produce the correct formatting I had in excel (I couldn't figure it out) hopefully this will work. The digits are taken from generic.maxHealth generic.movementSpeed and horse.jumpStrength details within each horses entity file.

From the results I produced I found the chance of a horse having better stats (faster horse) was only apparent when breeding extremely slow horses, when you bred fast horses there appeared to be no foals born better or on par with the fastest horse (column 17 breeding1.jpg fastest horse with 0.28 the closest horse was 0.26) If needed I can do another round of testing again and breed the fastest horse with the fastest foal.

If that formula is being rounded to the nearest then that explains the difficulty in getting good horses by breeding. For example if 2 14 heart horses are breed, the maximum hearts the foal could ever have would be 14 ((14+14+15)/3=14.33 which would round to 14). So it is impossible to breed a 15 heart horse without already having one to breed from. Similarly getting higher hearts than the horses you started with gets increasingly less likely when you get higher heart horses. I'm assuming it's intentional for it to be more difficult to get the highest hearts of horses, though I hope the impossibility of breeding the best horses without already having one isn't and will be corrected since it eliminates most of the point of breeding to begin with. This pattern presumably also shows up with the other stats, hearts are just the easiest because they're integers.

169 more comments

@MacchuPicchu the problem is with the math. A way to keep tabs is to decompile MC source code with e.g. DecompilerMC and open file server/net/minecraft/world/entity/animal/horse/AbstractHorse.java

The problem is this part (this is from 1.18.2, but it's the same it has always been):

    protected void setOffspringAttributes(AgeableMob ageableMob, AbstractHorse abstractHorse)

 

         double d = this.getAttributeBaseValue(Attributes.MAX_HEALTH) + ageableMob.getAttributeBaseValue(Attributes.MAX_HEALTH) + (double)this.generateRandomMaxHealth();         abstractHorse.getAttribute(Attributes.MAX_HEALTH).setBaseValue(d / 3.0);         double d2 = this.getAttributeBaseValue(Attributes.JUMP_STRENGTH) + ageableMob.getAttributeBaseValue(Attributes.JUMP_STRENGTH) + this.generateRandomJumpStrength();         abstractHorse.getAttribute(Attributes.JUMP_STRENGTH).setBaseValue(d2 / 3.0);         double d3 = this.getAttributeBaseValue(Attributes.MOVEMENT_SPEED) + ageableMob.getAttributeBaseValue(Attributes.MOVEMENT_SPEED) + this.generateRandomSpeed();         abstractHorse.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(d3 / 3.0);

this is parent A, ageableMod is parent B and generateRandom{_}X{_} is the infamous third horse.

One way to fix this, I guess, is get the average of both parents, and then add a random value of -X through X (eg -3 through 3), and making sure the total value is capped. This basically makes 2 top horses making a just-a-bit-above-average horse impossible, and vice versa.

We did it, it's fixed

F I N A L L Y

I've always been obsessed with MC horse breeding, and this is the moment I've been waiting for. 

Hopefully they will add bedrock parity to donkey stats also, so I can always get the best ass. 

Personally, I see this change (in 1.19.4 - 23w07a) as a net negative. Let me explain:

While some have heralded this as a much-needed buff to equines (horses, donkeys, & mules), amidst the broader problem of transportation alternatives to Elytra, this change does not ultimately improve the competitiveness of horses, but rather takes away an important aspect of their intrigue.

Under the old system, getting a max speed horse of 14.229m/s (top 1%, 0.1%,...) was exceedingly difficult. However, if you simply wanted a 14m/s horse, it was very easily doable. This non-linear difficulty-to-reward made collecting horses something which the average player could be satisfied with within a few minutes, but truly dedicated collectors can choose to sink hours into, for 0.0001m/s incr, with each subsequent improvement giving less reward for more effort. There is a reason many games implement such systems, to cater to a specific audience of collectors/grinders (e.g.: Runescape skill leveling, pokemon collecting, ...)

The new system strips that entire complexity, without actually solving any of the fundamental issues that make horses lose out to Elytra. I've always been a huge fan of horses since they were initially (controversially) added, and I want to see them improved and more widely used. I've seen tons of ideas to actually improve horses, I'll link a few cherry-picked FRs:
https://feedback.minecraft.net/hc/en-us/community/posts/360056915492-Netherite-Horse-Armor
https://feedback.minecraft.net/hc/en-us/community/posts/360011285652-Enchantable-Horse-Armor
https://feedback.minecraft.net/hc/en-us/community/posts/360047223571-Frost-Walker-Horse-armour
https://feedback.minecraft.net/hc/en-us/community/posts/360036335091-Horse-speed-determined-by-breeding-vs-spawned-horses
https://feedback.minecraft.net/hc/en-us/community/posts/20132780596109-Discrete-Horse-Stats
https://feedback.minecraft.net/hc/en-us/community/posts/4415682846093-Preventing-suffocating-when-riding-something (by increasing the movement collision box to include the rider)

Kylie Langton

Meri Diana

mgatland

Community Consensus

Normal

Mob behaviour

attributes, breeding, horse, stats

Snapshot 13w21a, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w02b, ..., 1.15.2, 20w09a, 1.16.4, 1.17.1, 1.18.2

23w07a

Retrieved