Lorem ipsum dolor sit amet, elit eget consectetuer adipiscing aenean dolor

Trying to find the average tribute

I’ve been trying to add an average tribute calculation to the Task Analyzer tool since I have the data on the user’s kingdom power from GowDB. And I can’t make it match my empirical data.

What I basically do is find out the tribute chance and multiplier, multiply them with each kingdom’s base tribute values and add everything up. The trouble is, if I compare the results with actual values (so far about 70 data points total which seems lime it should be sufficient to confirm this), there is a clear discrepancy: I get significantly more resources than expected. It’s about 60% more for gold (although most of this is due to the “income” being added in, so gold is problematic anyway) and 10-20% more for glory/souls/gems, which I can’t explain.

I’m stumped since I can verify the individual kingdom tribute amounts and chances being correct and the summing/averaging code is very strightforward. I include the guild statue bonuses for levels 100+. I do ignore the home kingdom setting for the moment, but I know it has a very small effect (and can only affect glory with Whitehelm). So basically it looks like there might be some non-obvious logical/statistical thing that I’m missing.

I know it has been confirmed (see this thread: Tribute statistics) that the game doesn’t cheat on tribute chances. So it looks like it’s either my (quadruple-checked) code or my data (another contributing player sees the same differences) but the differences seem way too big to be explained by having too few samples.

Has any one been successful in calculating the correct averages?

1 Like

It’s possible the tribute calculations are wrong. For years we were getting way more glory than we should have, and it wasn’t fixed until someone noted they got more glory than possible from tribute.

1 Like

I’ll start paying attention after the weekly reset. I don’t understand how kingdoms could be firing off at the correct rates but gems are coming in 10-20% high.

1 Like

FWIW, I just reimplemented the calculation as a Monte Carlo simulation and the results are the same. Here is the JavaScript code in case anyone is interested:

function getTributeChance(powerLevel) {
      const tributeChance = powerLevel < 4 ? .1 : powerLevel < 9 ? .2 : powerLevel < 12 ? .3
        : powerLevel < 14 ? .325 : powerLevel < 17 ? .35 : powerLevel < 19 ? .375 : .4;
      return tributeChance + GUILD_TRIBUTE_CHANCE_BONUS;

function getTributeMultiplier(powerLevel) {
  const tributeMultiplier = powerLevel < 2 ? 1 : powerLevel < 7 ? 2 : powerLevel < 11 ? 3
    : powerLevel < 13 ? 3.25 : powerLevel < 16 ? 3.5 : powerLevel < 18 ? 3.75 : 4;
  return tributeMultiplier * GUILD_TRIBUTE_AMOUNT_BONUS;

function simulateTributes() {
  const iterations = 100000;
  let goldTribute = 0;
  let soulsTribute = 0;
  let gloryTribute = 0;
  let gemsTribute = 0;
  for (i = 0; i < iterations; i++) {
    for (let kingdom of kingdoms) {
      const tributeChance = getTributeChance(kingdom.powerLevel);
      const tributeMultiplier = getTributeMultiplier(kingdom.powerLevel);
      const roll = Math.random();
      if (roll < tributeChance) {
        goldTribute += KINGDOM_INFO[kingdom.id][1] * tributeMultiplier;
        gloryTribute += KINGDOM_INFO[kingdom.id][2] * tributeMultiplier;
        soulsTribute += KINGDOM_INFO[kingdom.id][3] * tributeMultiplier;
    if (gemsTribute > 0) gemsTribute--; // You get (tributes -1) gems
  return "Gold: " + Math.round(goldTribute / iterations) + ", Souls: " + Math.round(soulsTribute / iterations)
    + ", Glory: " + Math.round(gloryTribute / iterations) + ", Gems: " + Math.round(gemsTribute / iterations * 100) / 100;

The only inputs are the power levels and the base tribute values (in KINGDOM_INFO), which I can provide if needed. Again, I verified every individual kingdom’s tribute chance and values to be correct.

I’m really at a loss how this does not produce the averages I see in-game.

10-20% is not much from only 70 data points. 34 kingdoms all with different payouts and roughly only 1/3 triggering each tribute leaves a lot of room for the average to fluctuate.

Sure, it’s by no means certain yet and I don’t have the statistics skill to estimate if the deviation is significant at this point. Although my intuition is that since we’re just looking to verify the averages, the origin of the numbers is irrelevant. The average should stabilize after some number of iterations no matter the source.
I sure hope it’s just about collecting more data, but I still suspect that there’s someting else.

Are individual kingdoms triggering at the right rates? When they do trigger, does the payout match what you see in the kingdom info screen? Does the kingdom screen match what you expect based on the base values?

This is difficult to prove and requires a lot of data that I don’t have yet. The thread I mentioned in the OP seems to confirm that at least the total number of triggered kingdoms is correct.

The values match, yes.

This appears to be the case, too.

With 70 tributes and a record of which kingdoms triggered in each tribute, you can start examining the actual rates compared against expectations. Theoretically, half the kingdoms should be below the claimed rate in the kingdom info screen. If the split is very different from that, then you have a case that the kingdoms are triggering too often.

I only have per-kingdom data from about 10 tributes since it’s significantly more cumbersome to collect. But yeah, with a few more samples one could start to make first observations of the individual rates and draw conclusions. I’ll keep collecting data.

1 Like

I’ve recorded three collections since reset. You’re right that it’s cumbersome. I’ll keep doing it and post here when I have a semi-decent sample.

1 Like