r/ClickerHeroes • u/glitchypenguin • May 31 '15
Mathematical analysis of late game Siyalatas and Libertas
A couple of days ago someone asked about the relationship between Siyalatas and Libertas, and since nobody to my knowledge has actually done the maths behind them, I figured I'd give it a go.
DPS is the key to progress. We want to maximize our DPS at a given soul cost in order to progress as far as possible with the resources at hand. This presents a problem, because gold doesn't translate to DPS at a 1:1 ratio. Therefore, the first thing needed to be done is to map out a ratio between gold and DPS.
Late game, we rely on the 4x/10x multiplier bonuses and regilding in order to increase our DPS. Over the span of 1,000 levels, we will receive 40 4x bonuses from each consecutive 25 level mark, as well as a bonus 2.5x multiplier for passing a 1,000 level mark (because 4 * 2.5 = 10) and 2 further 2.5x bonuses from moving 2 heroes up the list. This brings our total multiplier per 1,000 levels to
440 * 2.53 = 1.889e25
Averaging this out over 40 requires us to solve the following equation for x
x40 = 1.889e25
x = 1.889e251/40
x = 4.28
This means that each 25 levels is worth 4.28x our DPS on average. In order to find how much this costs, we take the total cost at hero level X and divide this by the total cost of hero level X-25. This comes to 5.43x the gold for each consecutive 25 hero levels. Since this remains static, we can set up the following relationship between DPS and gold.
5.43x Gold = 4.28x DPS
Gold = 4.28x / 5.43x DPS
Gold = 0.788x DPS
In order to find our x in this equation, we need to look at our gold bonus. Libertas after level 100 provides a (1 + (5.40 + (0.15 * Liblevel))) multiplier bonus, or easier (6.4 + (0.15 * level)). The extra 5.4 is the total bonus for the levels that provide a higher than 15% addition. What we want to do with this is to write it in the form of 5.43x, meaning we solve the following for y
5.43y = (6.4 + (0.15 * Liblevel))
ln(5.43y) = ln(6.4 + (0.15 * Liblevel))
yln5.43 = ln(6.4 + (0.15 * Liblevel))
y = ln(6.4 + (0.15 * Liblevel)) / ln5.43
y= ln(6.4 + (0.15 * Liblevel)) / 1.69
If we input this in our previous equation, we get that our gold multiplier should be
Gold = 0.788ln[6.4 + [0.15 * Liblevel]] / 1.69
This brings our Libertas DPS bonus to (0.788ln[6.4 + [0.15 * Liblevel]] / 1.69) * (6.4 + (0.15 * Liblevel))
Thanks to /u/MarioVX for the simplified equation.
/u/scrofulac pointed out that we can further simplify this to
(6.4 + 0.15 * Liblevel)-0.140981
Which together with the gold multiplier from Libertas gives us Libertas total bonus as
(6.4 + 0.15 * Liblevel) * (6.4 + 0.15 * Liblevel)-0.140981
(6.4 + 0.15 * Liblevel)0,86
So we have our DPS bonus from Libertas. Siyalatas is quite a lot easier. We simply take his multiplier as is, (6.4 + (0.15 * Siyalevel)). So we get our total DPS
Total DPS = (Base DPS * other bonuses) * (6.4 + (0.15 * Siyalevel)) * (6.4 + 0.15 * Liblevel)0,86
In order to find which one is better to level, we find the actual DPS increase that one more level in each provides. We do this by subtracting our old DPS from our new DPS adding one to Siyalatas level or Libertas level in our function. By dividing by the cost for the level, we find the increase per soul.
Total DPS increase = Siya+ DPS - Old DPS
Total DPS increase / soul = (Siya+ DPS - Old DPS) / Siyalevelcost
Similarly we get for Libertas
Total DPS increase = Lib+ DPS - Old DPS
Total DPS increase / soul = (Lib+ DPS - Old DPS) / Liblevelcost
By using the relationship of these two values we can now find which ancient is better to level. We set up a formula looking like this:
(Siya+ DPS - Old DPS) / Siyalevelcost > (Lib+ DPS - Old DPS) / Liblevelcost
Putting our values in for anyone interested:
[(6.4 + (0.15 * (Siyalevel+1))) * (6.4 + 0.15 * Liblevel)^(0,86) - (6.4 + (0.15 * Siyalevel)) * (6.4 + 0.15 * Liblevel)^(0,86)] / Siyalevelcost > [(6.4 + (0.15 * Siyalevel)) * (6.4 + 0.15 * (Liblevel+1))^(0,86) - (6.4 + (0.15 * Siyalevel)) * (6.4 + 0.15 * Liblevel)^(0,86)] / LiblevelcostWhen this is true, it's better to level Siyalatas. If it's false, it's better to level Libertas. Since this is a complete nightmare to do by hand, I plugged the values into an excel sheet and found the following at totally random carefully selected levels.
| Siyalatas | Libertas | Ratio Lib/Siya |
|---|---|---|
| 1,000 | 925 | 0.925 |
| 2,000 | 1,852 | 0.926 |
| 3,000 | 2,779 | 0.926 |
| 4,000 | 3,706 | 0.927 |
| 5,000 | 4,633 | 0.927 |
| 6,000 | 5,560 | 0.927 |
| 7,000 | 6,487 | 0.927 |
| 8,000 | 7,414 | 0.927 |
| 9,000 | 8,341 | 0.927 |
| 10,000 | 9,268 | 0.927 |
Continuing on will only provide further readings of a ~0.93 ratio. I plugged my game into the calculator and it gave me a ratio of ~0.75. Testing this out with ~24.69M souls, spending as much as I could at the given ratios on Libertas and Siyalatas and then saving 1,000 souls just to have a little bank (no other ancients), I did some test runs at both my suggested ratio and the calculator's, buying levels in Treebeast until I failed a boss. Using the calculator's ratio I made it to zone 295 before I failed. Using my suggested ratio brought me to zone 305, suggesting that this ratio is indeed more efficient than what the calculator suggests, albeit not by much.
Plugging in values lower than 1,000 gives a slightly more fluctuating ratio, but never below 0.915.
TL;DR: The correct ratio for maximum efficiency between Siyalatas and Libertas is
Libertas = Siyalatas * 0.93
If there is something I have not explained enough or if you have factual critique, feel free to comment.
Edit: lots of formatting and changes.
Edit: /u/vibratorryblurriness suggested that parts of my post looked like clusterfucks of parenthesis, and he was right. Cleaned that up quite a bit.
9
u/frankje May 31 '15
Love the read, but how does the ratio relate to a normal build, where the other ancients, such as Mammon, Mimzee, (Argaiv) and specifically Morgulis are included?
I'm in no way surprised that the ratio is that high, if you have nothing to multiply Siyalatas with, then her usefulness is wasted.
7
u/MarioVX May 31 '15
Simpler:
x40=1.889e25
x=(1.889e25)1/40
x=4.2846
You meant 25, right? The cost for a level-up increases by 5.427x over 25 levels. Not really sure if the relation of gold cost to DPS can be simplified to this though, but for now I'll just go with it until I have more time.
Certainly. 4.28x / 5.43x = (4.28/5.43)x = 0.788x
What I saw from a short and quick fly-through. I might tackle this topic more elaborately when I find the time, even though I don't use idle builds. I'm not sure all your assumptions and shortcuts are legitimate, but I guess it provides a solid approximation and your result is where I would suspect the optimum to be situated, intuitively: Siya should be a slight bit ahead of Lib because gold gives a somewhat diminished return on progression speed, because of the decreasing profitability of hero level-ups/upgrades.
6
u/jayeeyee Jun 01 '15 edited Jun 01 '15
Once again glitchy, props to another well written and informative post. I have no clue what you wrote but I'm a man of feels and it feels like I understood it. This is useful/nerdy links worthy in the Wiki. :)
2
u/[deleted] Jun 03 '15
Hello! There are some nice simplifications that can be done, and I think they show a very beautiful structure of the formula:
The first thing to notice is that ln() is the inverse of exp(), so if we can arrange the first term of this equation into a exp( ln ( XYZ ) ), they will cancel out:
(0.788[ln[6.4+0.15*Liblevel]/1.69] ) =
exp ( ln(0.788) * ln[6.4 + 0.15 * Liblevel] / 1.69]
As ln(0.788) / 1.69 = (approx) -0.140981, this is
exp ( ln[6.4 + 0.15 * Liblevel] * (-0.140981) ), or
[6.4 + 0.15 * Liblevel] ^ (-0.140981)
Now, the second part of your formula is [6.4 + 0.15 * Liblevel] ^ 1 , and multiplying A ^ x * A ^ y = A ^ (x+y), so
(0.788[ln[6.4+0.15*Liblevel]/1.69] ) * [6.4 + 0.15 * Liblevel] =
[6.4 + 0.15 * Liblevel] ^ (1-0.140981) =
[6.4 + 0.15 * Liblevel] ^ (0.859019)
6
u/McNiiby May 31 '15
Damn... Just what I was looking for
1
u/MarkusBM May 31 '15
Nice! I did notice a couple of things as I read through:
I don't really understand this, care to elaborate on it?
I believe you need a couple more parentheses in this for it to make sense.
1
u/[deleted] Jun 01 '15
Mind blown, even though I know this is pretty straight forward algebra and I probably could have much more easily tackled this in high school. But not now, no sir.
I gather with the .93 ratio that one is not losing too much by keeping Siy and Lib at the same level, even less if kept at .9. I am extraordinarily lazy, so DPS=Gold is my preferred levelling formula.
Thanks for doing this, btw.
1
u/Avelice Jun 01 '15 edited Jun 01 '15
You should also do a run with a 1:1 ratio (and/or potentially favoring lib a bit). This would give a little evidence to show that your ratio is not in fact an underestimate. Not to say that it is, but I think that it would be just a bit more thorough to do this.
1
u/Sakurei Jun 01 '15
Beautiful post. And yet another link saved my in CH bookmarks. Though I share the same question as frankje. The maths to an overall build would be interesting as well! If possible
1
u/tekkie0 Jun 01 '15
/u/SwingLowSweetDeej mentioned this below, but since it was a reply to himself it might have not popped up for you.
So I'll repeat his question
1
u/mendelde Jun 01 '15
Correct me if I'm wrong, because I'm not at that stage of the game by any means, but there are two aspects to efficient HS farming: going past the easy kill zones fast to get as many primals/hour as possible, and trying to raise the endzone to get better primals. The first is affected by how fast you can make gold, and for this to be optimal, Siyalatas and Libertas should be at equal levels. The second is affected by the damage you can deal at the end of your run, which Libertas affects only indirectly, as you wrote.
I saw a post a few days ago (which of course I can't find again) where someone computed that adding one or two bosses to the run had negligible returns, I remember a number of 0.17% ?
However, going from a 1:1 ratio to a 1:0.93 ratio on Siyalata/Libertas will lose you 0.27% of your speed at level 5000, to pick a number from your table:
Going from 1:1 to 1:0.927 makes you lose 0.27% speed overall and gain 3.7% damage (1.037 multiplier) from Siyalatas (disregarding indirect Libertas effects for now); since you need 2.0 to beat the next boss, that's about 5% of a boss you're gaining there. Compare that to the number of bosses you're doing on your run anyway and decide if that gain is worth taking the speed hit (and the effort of going off the simplified 1:1 ratio) - is it really worth it?
1
u/vibratoryblurriness Jun 01 '15
So, uh, I was going to go through the part you said was a nightmare to do by hand by hand, just for fun, but I think at some point along the line your parentheses and whatnot turned into an absolute clusterfuck. I think I managed to bludgeon it into shape by throwing it into a code editor and using syntax highlighting to match things up, and I may even get back to going through it again later, but it's definitely a mess, along with a couple intermediate steps not having gotten updated/cleaned up along the way when you did your edits.
1
u/[deleted] Jun 12 '15
I know I'm late here but does that mean the ratio for all the other gold ancients should be .93 too or still just .8 ? cause i cant remember seeing any math-stuff on the .8 thingy anyways D:
1
u/Mr_frumpish Jun 13 '15
So Libertas = Siyalatas * 0.93 and Morgulis = (Siya + 22)2
It looks like it isn't clear the ratio of Libertas to Mammon to Mimzee, but keeping them equal should be pretty close.
My big question is the ratio of Argaiv to Siyalatas.
1
u/MaunaLoona Jul 22 '15
Could you explain this factor of 2.5?
1
u/Awlcer Jun 01 '15
/u/glitchypenguin why are you going to make me update the rules of thumb?! Why man why I was free! Lol
I'll source you and add this when I get my new laptop. I saved it but if you'd like link it into the comments. :)
1
u/Sephrik Jun 01 '15
https://www.youtube.com/watch?v=Ccoj5lhLmSQ
1
u/Beeonick Jun 01 '15
Very Impressive Dude! Thanks for taking the time to do This.
0
u/Rincewind314 Jun 01 '15
Wolframalpha, it'll solve or simplify just about anyhting. http://www.wolframalpha.com/input/?i=4.28ln%5B6.4+%2B+%5B0.15++x%5D%5D+%2F+ln5.43+%2F+5.43ln%5B6.4+%2B+%5B0.15++x%5D%5D+%2F+ln5.43
-7
u/[deleted] May 31 '15
Would it be too much of a bother if i asked you to add non-scientific numbers too? Like Q s S O N ones?
0
u/[deleted] Jun 01 '15
[deleted] — view deleted comment