Zombidle: REMONSTERED

Zombidle: REMONSTERED

46 ratings
Mathematical Analysis & Strategic Optimization
By MarioVX
In this guide, Zombidle's game mechanics are mathematically analyzed to determine optimal solutions to the various choices the game challenges players to, from skull allocation over Hell build order and chest loot selection to the vast field of crafting.
2
   
Award
Favorite
Favorited
Unfavorite
Version History
guide version date and time (UTC+1) - game version - description
  1. 2017-10-14_2:10 - v1.03.047 - Initial release
Introduction
The main purpose of this guide is to establish a profound theoretical foundation for the Zombidle community upon which any arising strategy problem in the broadest sense can be at least tackled and hopefully often solved.

The guide is mostly addressed to players who are already acquainted with the game mechanics and are interested in theorycrafting, and using math to solve problems.

There is an excellent, informative post here[www.kongregate.com] written by IceWeaselX explaining all game mechanics. It's a prerequisite for this guide, even if you already know it I encourage re-reading at least the chapters on Damage, Orbs and Skulls. IceWeaselX's guide examines the game mechanics, mine examines their implications - they go hand in hand.

The guide starts abstractly with the translation between quantities of interest, then gradually works towards practical applications, adding more specific theory when it is needed. As the primary example I've chosen Item Crafting Efficiency Caps, i.e. which items one should craft and how many of them. If you're only interested in results, just skip to these sections.

The provided foundation enables solving a lot more questions that come up in Zombidle than just the examples I picked (which I did so mostly because 1. they were the most difficult yet relevant ones I could think of right away to demonstrate suitable methods and 2. they can be covered adequately in the format of a written guide, as opposed to necessitating an interactive spreadsheet), some of which are mentioned in the prospect that concludes the guide.

I'm aware that my explanations are not self-sufficient in regards to how the mathematical methods are to be applied, but focus mostly on why they are applied at any point. This is deliberate since the text is already rather long, and diluting it with general math education that can just be found better anywhere else would make it annoying to those that don't need it. As a consequence some readers may find it helpful and are hereby encouraged to consult Wikipedia or a math textbook on these methods whenever they find themselves struggling to follow the calculations.

Without further ado, lets get into it!
Translation of Skulls to Damage
We'll start by examining quantity translations to achieve universal comparability of bonuses.

To allow comparing skull value bonuses to damage bonuses, we need to inspect how skulls translate to damage through reinvestment.

Monster Levels to Damage
A single non-tap monster level increases damage by
d_m(l_m) = bd_m * 1.035^(l_m - 1)
The total damage of this monster is thus the sum over this function from level 1 to the current level l_m, which is a geometric series that can be simplified.
D_m(l_m) = sum_{i=1}^{l_m}(b_m * 1.035^(i-1)) = b_m * sum_{i=0}^{l_m - 1}(1.035^i) = b_m * (1.035^l_m - 1)/(1.035 - 1) = b_m * 200/7 * (1.035^l_m -1)
Note that for large l_m, this can be well approximated with increasing relative precision as
D_m(l_m) ~= b_m * 200/7 * 1.035^l_m
Which allows valuable simplifications later on.

For Carl the Monolith's damage multiplier, we get the much simpler expression:
D_C(l_C) = 3.1^l_C

This assumes the player has the Strange Diamond from The Land of Turtles event.

Monster Levels to Skull Costs
This behaves equivalent to damage, however the grow rate is +5% per level rather than +3.5%. Furthermore, there are cost reduction items we need to include. Hence we get (skipping intermediate steps):
s(l_m) = bs_m * (1 - cr) * 1.05^(l_m - 1) S(l_m) ~= bs_m * (1 - cr) * 20 * 1.05^l_m

And for Carl the Monolith, whose level cost is grows with a factor 25 and whose first level is free assuming the player has the Empty Turtle Shell from The Land of Turtles event:
S_C(l_C) ~= bs_C * (1 - cr_C) /24 * 25^(l_C-1) = bs_C *(1 - cr_C) /600 * 25^l_C

Skulls to Monster Levels
To see how many levels a given amount of skulls can buy us, we need to invert the cumulative cost functions.
z_a := bs_m * (1 - cr) * 20 z_a * 1.05^l_m(S) = S 1.05^l_m(S) = S/z_a l_m(S) = log_{1.05}(S/z_a)
The result is to be rounded down since one can't buy fractional levels.

For Carl, we have similarly:
z_b := bs_C * (1 - cr_C) /600 z_b * 25^l_C(S) = S 25^l_C(S) = S/z_b l_C(S) = log_{25}(S/z_b)

Skulls to Damage
Finally to obtain the skulls to damage translation we just plug those skull -> level functions as levels into our level -> damage functions and simplify the resulting expressions as much as possible.
z_c := b_m * 200/7 z_d := z_c /(z_a)^log_{1.05}(1.035) D_m(S) = z_c * 1.035^l_m(S) = z_c * 1.035^log_{1.05}(S/z_a) = z_c * (1.05^log_{1.05}(1.035))^log_{1.05}(S/z_a) = z_c * 1.05^(log_{1.05}(1.035) * log_{1.05}(S/z_a)) = z_c * (S/z_a)^log_{1.05}(1.035) = z_c /(z_a)^log_{1.05}(1.035) * S^log_{1.05}(1.035) = z_d * S^log_{1.05}(1.035) ~= z_d * S^0.70509

And homologuously for Carl:
z_e := 1/(z_b)^log_{25}(3.1) D_C(S) = 3.1^log_{25}(S/z_b) = 1/(z_b)^log_{25}(3.1) * S^log_{25}(3.1) = z_e * S^log_{25}(3.1) ~= z_e * S^0.35149

To conclude, the overall damage is the product of the two, since Carl's damage bonus is multiplicative with monster damage, so we get for the total damage:
D(S) = D_m(S) * D_C(S) = z_d * z_e * S^log_{1.05}(1.035) * S^log_{25}(3.1) = z_d * z_e * S^(log_{1.05}(1.035) + log_{25}(3.1)) ~= z_d * z_e * S^1.05658
This exponent, ~1.05658, is extremely important, because it allows us to immediately translate skull bonuses to damage bonuses in the following manner:
z_f := log_{1.05}(1.035) + log_{25}(3.1) ~= 1.05658 dm * D(S) = D(S*sm) dm * z_d * z_e * S^z_f = z_d * z_e * (S*sm)^z_f dm * S^z_f = S^z_f * sm^z_f dm = sm^z_f
For example, a 2x skull multiplier (Greed Shard) is equivalent to a ~2.08x damage multiplier, 2 raised to the power of z_f.

I have omitted the effect of the +2% damage per level passive skill. Strictly speaking, with this included, damage becomes proportional to:
D(S) ~ S^z_f * log(S)
The logarithmic factor hardly changes anymore for large amounts of skulls, so it has little influence on relative increases, and omitting it allows the previously shown simple power translation of skulls to damage.

The combined damage assumes allocating skulls to Carl vs normal monsters at roughly a fixed ratio, which determines another constant factor in that equation. For the sake of translating skull to damage bonuses, this constant factor is of no interest, as it cancels out just like z_d and z_e do.
Translation of Orbs to Damage
For the sake of completeness and allow comparing all item effects there are, we also want to translate orb income bonuses to damage bonuses. As it stands, white orbs affect your damage in three ways:
  • They are an immediate damage multiplier.
  • They can be used to craft War and Greed Shards instead of Splinters in the Shards crafting slot.
  • They unlock Death Medal Achievements.

Death Medals
Death Medals provide large bonuses, however there is only finitely many of them. Therefore, while unlocking them is a high priority in the early game, they do not contribute to the further value of orbs once they are reached, leaving only the other two mechanisms to be considered in the long term.

Immediate Damage Multiplier
This one is straightforward, the multiplier scales linearly with the amount of White Orbs collected. Hence, a given relative increase in White Orb income may be approximately translated to an equal relative increase in damage, in the long term - under the condition that this income increase applies to the difficulty dependent base orbs of uncommon bosses. Since this part will grow with the difficulty the player is able to farm, a relative income increase associated with the flat bonus amount instead will become ever smaller than it was at the time it was applied, so in this case the relative increase is an upper bound rather than a central approximation. Nonetheless, it remains generally valid that through this way by itself, damage and orb increases are equivalent:
Dm * D_I(O) = D_I(O * Om) Dm * D_I(O) = D_I(O) * Om Dm = Om

Shard Crafting
With the crafting times of Shards and Splinters in the Shard Crafting slot all capping equally at three days, the increased effect of a Shard compared to a Splinter will occasionally make them superior to the Greed Splinter despite the high White Orb cost, namely once said increased effect exceeds the inverse damage loss from payed orb cost, which happens once the accumulated amount of white orbs is sufficiently large to offset this cost such that it constitutes a small enough relative cost. We can determine this threshold for War Shards and Greed Shards, respectively:
2 / 1.1^z_f * (1 - rC_w) > 1 1 - rC_w > 1.1^z_f / 2 rC_w < 1 - 1.1^z_f / 2 ~= 0.44703 = 44.703% =: t_w
(2 / 1.1)^z_f * (1 - rC_g) > 1 1 - rC_g > (1.1 / 2)^z_f rC_g < 1 - (1.1 / 2)^z_f ~= 0.46829 = 46.829% =: t_g
So once one has collected enough orbs such that the cost of the next shard is a lower percentage of the collected orbs than the respective threshold, it should be crafted.

Going forward, we ultimately want to see how the accumulated bonuses of shards crafted this way depend on accumulated orbs, but solving this requires some more considerations.

The accumulated bonuses based on the total number of crafted shards of each type is given by:
D_S = (2 / 1.1)^(z_f * n_g) * (2 / 1.1^z_f)^n_w

We also need the costs of the shards, both incremental and accumulated, and a relation between these:
c_w = 5 * 10^n_w C_w = sum_{i=1}^{n_w}(5 * 10^i) = 50 * sum_{i=0}^{n_w -1}(10^i) = 50/9 * (10^n_w - 1) ~= 50/9 * 10^n_w = 10/9 * c_w
c_g = 7.5 * 10^n_g C_g = sum_{i=1}^{n_g}(7.5 * 10^i) = 75 * sum_{i=0}^{n_g -1}(10^i) = 75/9 * (10^n_g -1) ~= 75/9 * 10^n_g = 10/9 * c_g

Furthermore, we need to distinguish Orbs anterior and posterior. Anterior Orbs is the total lifetime amount collected up to the point in question, which is the principal input variable we'd like to ultimately substitute into our damage expression, whereas posterior Orbs is the amount the player has at the point in question, i.e. after expended costs have been subtracted, which is relevant for the decision of crafting further shards and hence for the number of shards crafted at a given point.
O_p = O_a - C_w - C_g

Now we have all the relevant information and only need to piece it together.
c_w = t_w * O_p 9/10 * C_w = t_w * O_p C_w = 10/9 * t_w * O_p
c_g = t_g * O_p 9/10 * C_g = t_g * O_p C_g = 10/9 * t_w * O_p
O_p = O_a - C_w - C_g O_p = O_a - 10/9 * t_w * O_p - 10/9 * t_g * O_p O_p + 10/9 * (t_w + t_g) * O_p = O_a O_p * (1 + 10/9 * (t_w + t_g)) = O_a O_p = O_a / (1 + 10/9 * (t_w + t_g))
5 * 10^n_w = c_w = t_w * O_p 10^n_w = t_w /5 * O_a / (1 + 10/9 * (t_w + t_g)) n_w = log_{10}(t_w /5 * O_a / (1 + 10/9 * (t_w + t_g)))
7.5 * 10^n_g = c_g = t_g * O_p 10^n_g = t_g/7.5 * O_a / (1 + 10/9 * (t_w + t_g)) n_g = log_{10}(t_g/7.5 * O_a / (1 + 10/9 * (t_w + t_g)))
D_S = (2/1.1^z_f)^n_w * (2/1.1)^(z_f * n_g) = (2/1.1^z_f)^log_{10}(t_w /5 * O_a / (1 + 10/9 * (t_w + t_g))) * (2/1.1)^(z_f * log_{10}(t_g/7.5 * O_a / (1 + 10/9 * (t_w + t_g)))) = (t_w /5 * O_a / (1 + 10/9 * (t_w + t_g)))^log_{10}(2/1.1^z_f) * (t_g/7.5 * O_a / (1 + 10/9 * (t_w + t_g)))^(z_f * log_{10}(2/1.1)) = (t_w /5 / (1 + 10/9 * (t_w + t_g)))^log_{10}(2/1.1^z_f) * (t_g/7.5 / (1 + 10/9 * (t_w + t_g)))^(z_f * log_{10}(2/1.1)) * O_a ^(log_{10}(2/1.1^z_f) + z_f * log_{10}(2/1.1)) =: z_g * O_a ^(log_{10}(2/1.1^z_f) + z_f * log_{10}(2/1.1)) = z_g * O_a ^(log_{10}(2) + z_f * log_{10}(2/1.21)) =: z_g * O_a ^z_h ~= z_g * O_a ^0.53162273
So this is the contribution of the shard pathway to orb-to-damage translation:
dm * D_S(O) = D_S(O * Om) dm * z_g * O^z_h = z_g * (O * Om)^z_h dm * O^z_h = O^z_h * Om^z_h dm = Om^z_h ~= Om^0.53162273

Conclusion
Finally, to translate an orb multiplier into an equivalent damage multiplier, we need to combine the damage multipliers due to the orbs' immediate effect and through shards:
dm * D(O) = D(O * Om) dm * D_I(O) * D_S(O) = D_I(O * Om) * D_S(O * Om) dm * O * O^z_h = O * Om * O^z_h * Om^z_h dm = Om * Om^z_h dm = Om^(1+z_h) =: Om^z_i ~= Om^1.53162273

So that's it, an orb multiplier is translated into an equivalent damage multiplier by raising it to the power of ~1.5316. For example, a 2x Orb multiplier is equivalent to a ~2.891x Damage multiplier.
Translation of Damage to Progression & Wrap-Up
Translation to Progression
How many difficulty levels further will a given increase in damage (regardless of whether it was obtained directly or through an equivalent skull or orb increase) actually get you?

The player may progress until the time he needs to kill a boss exceeds a given timer. The relationship to effective player DPS is simply:
t = H / DPS
Where H is the health of the boss. Since the timer is constant (it may be extended through Rings, but this is not the subject here), the progression halt happens when
DPS = H / t
where t is then the critical kill time. One may assume this to be the maximum timer, or if one opts to reset as soon as one fails to instantly kill enemies, the duration of one frame / click - with empowered Sloth's Form, 1/20th of a second, or 0.05 seconds. Either way, this only changes the constant factor.

Boss and village health increases by x1.13 per level, while rewarded skulls only increases by x1.06. This allows us to specify the equation and obtain the level at which the intersection occurs:
DPS = H / t d * (1.06^l)^z_f = h * 1.13^l / t d * (1.06^z_f)^l = h / t * 1.13^l d * t / h = (1.13/1.06^z_f)^l l = log_{1.13/1.06^z_f}(d * t / h) =: log_{z_j}(d * t / h) = log_{z_j}(d) + log_{z_j}(t) - log_{z_j}(h) z_j ~= 1.062529
Note that the values of d and h would be extremely difficult to evaluate, but it's not necessary in order to answer the initial question.
l(d * dm) - l(d) = log_{z_j}(d * dm) + log_{z_j}(t) - log_{z_j}(h) - (log_{z_j}(d) + log_{z_j}(t) - log_{z_j}(h)) = log_{z_j}(dm) + log_{z_j}(d) + log_{z_j}(t) - log_{z_j}(h) - log_{z_j}(d) - log_{z_j}(t) + log_{z_j}(h) = log_{z_j}(dm)
This way, a multiplier to damage, skulls or orbs may conveniently be converted to a summand on the critical level difficulty.

To give an example, here is an overview of the equivalent level increases of all shard types:
War
Greed
Orb
Splinter
1.5714
1.6603
2.4068
T1 Shard
11.4283
12.0749
17.5038
T2 Shard
29.5417
31.2131
45.2467

Translation Wrap-Up
Considering that in general,
a^b = c <==> a = c^(1/b) <==> b = log_{a}(c)
we may translate all these quantities in whatever way we deem it convenient:

Skull Allocation & Monster Item Selection
In this chapter we will investigate two closely related questions:
  1. How to optimally distribute skull investments over the different monsters?
  2. Which monster item to choose from a chest if multiple ones are offered?
I choose to tackle this with calculus as it's a very elegant way to obtain answers here and the results are more universal and smooth than if approached discretely.

Skull Allocation - Monster vs Monster
The player's total damage output is comprised of passive DPS from non-tap monsters and tap damage done by clicking/tapping and Sloth's Form. Tap damage itself is comprised of two components, Bob's base damage and damage from Golden Shower of Deathness, which is a portion of total passive DPS. Let CM = (1 + cc * (cd-1)) denote the average crit multiplier with crit chance cc and crit damage multiplier cd, CS the click speed in clicks per second, D_i the DPS of i, BD_bob the base click damage of Bob at this current level, and GSD the level of the Golden Shower of Deathness. Then we have:
D_total = D_clicks + D_passive = CS * CM * (BD_bob + GSD * 0.05 * D_passive) + D_passive = CS * CM * BD_bob + CS * CM * GSD /20 * D_passive + D_passive = CS * CM * BD_bob + D_passive * (CS * CM * GSD/20 + 1)
With Bob's base damage scaling much worse than the DPS of non-tap monsters, this portion becomes negligible rather quickly and in fact vanishes completely eventually (due to the limited accuracy of floating point arithmetic), so total DPS is essentially a multiple of passive DPS.
Let's have a closer look at the passive DPS. It's the sum of the DPS of all non-tap monsters, including all buffs, both specific for individual monsters and generic. Generic buffs, however, may be factored out. Specific buffs are comprised of Skill damage multipliers (Spectral Reposession, Pastafury, King's Presence as affected by Son of the Lich) and monster item damage multipliers.
D_passive = sum_{i € ntm}(D_i * B_i * B_g) = B_g * sum_{i € ntm}(D_i * I_i * S_i)
At this point, to specify D_i, we need to remember how exactly levels (and by extension, skulls) factor into this. This time, we'd like to include the linear factor from the passive skill, but we can factor out and hence drop any factor that is not monster-specific.
D_m = bd_m * (1.035^l_m -1) * (50 + l_m) S_m = bs_m * (1-cr) * 20 * (1.05^l_m -1) l_m = log_{1.05}(1 + S_m / (20 * bs_m * (1-cr))) D_m = bd_m * ((1 + S_m / (20 * bs_m * (1-cr)))^log_{1.05}(1.035) - 1) * (50 + log_{1.05}(1 + S_m / (20 * bs_m * (1-cr))))
Now, we'd like to analyze the rate at which damage changes with invested skulls, so we need to take the derivative of the damage D_m in respect to skulls S_m. It's just proportional, but we will see later on that any general factors which we've omitted will not matter for the sake of comparisons. For clarity, the index m will be omitted in the following transformations. And in its final form, even though it's the derivative in respect to skulls, we want it expressed in terms of levels rather than skulls since that's the information immediately visible in the game.
dD/dl = bd * ((1.035^l -1)' * (50+l) + (1.035^l -1) * (50+l)') = bd * (ln(1.035) * 1.035^l * (50+l) + 1.035^l - 1) = bd * 1.035^l * (ln(1.035) * (50+l) + 1 - 1.035^(-l)) dl/dS = 1/ln(1.05) * (ln(1 + S / (20 * bs * (1-cr))))' = 1/ln(1.05) * 1/(1 + S / (20 * bs * (1-cr))) * 1/(20 * bs * (1-cr)) = 1/ln(1.05) * 1/1.05^l * 1/(20 * bs * (1-cr)) = 1/(ln(1.05) * 1.05^l * 20 * bs * (1-cr)) dD/dS = dD/dl * dl/dS = bd/bs * (1.035/1.05)^l * (ln(1.035) * (50+l) + 1 - 1.035^(-l)) /(1-cr)
This is multiplied with I_m and S_m to include active skill and item bonuses. As of now, the cost reduction factor can be omitted, since all non-tap DPS monsters have equal cost reduction, but this may change in the future.
Inspecting this derivative function reveals that it is declining, so for each monster it is true that the more skulls we've already invested in it, the less damage per further skull invested is gained (diminished returns). As such, we can conceive the optimal skull allocation strategy as a flow equilibrium where skulls are invested into the different monsters such that their damage derivative to skulls is equal at all times. We can even attempt to express this equilibrium state by equating two such derivatives representing arbitrary monsters and simplify it approximately to a general, simple rule:
res(lx) = ln(1.035) * (50+lx) + 1 - 1.035^(-lx) dD1/dS1 = dD2/dS2 bd1/bs1 * S1 * I1 * (1.035/1.05)^l1 * res(l1) = bd2/bs2 * S2 * I2 * (1.035/1.05)^l2 * res(l2) (1.05/1.035)^(l2-l1) = bd2/bd1 * bs1/bs2 * S2/S1 * I2/I1 * res(l2)/res(l1) l2 - l1 = log_{210/207}(bd2/bd1 * bs1/bs2 * S2/S1 * I2/I1 * res(l2)/res(l1))
Since the residual ratio within the logarithm changes very little for larger levels with what is otherwise a constant difference, one obtains this handy rule of thumb:
eff = bd * S * I /bs l2 - l1 = log_{210/207}(eff2 / eff1)
Furthermore, the developers have chosen to give all non-tap monsters the same base damage to base cost ratio. As long as this is true, the rule simplifies further as for the sake of these efficiencies only the item factor I and active skill factor S of each monster need to be considered, other than that all monsters ought to be kept at the same level.
Before monster-specific items come into play, the only monsters that differ from the rest in this regard are Blue Specter through Spectral Reposession and Flying Squid through Pastafury. Assuming for simplicity the permanent uptime of all relevant skills, the multiplier is 11 for Blue Specter, 17 for Flying Squid, and 3 for everyone else. Therefore, before different stocks of monster-specific items come into play, they should be kept this many levels above the other non-tap monsters:
Blue Specter : log_{210/207}(11/3) ~= +90.299 Flying Squid: log_{210/207}(17/3) ~= +120.553

Monster Item Selection
When it comes to selecting one of multiple monster items from a chest, we want to choose the one that provides the most damage increase. That is, the one that holds the largest damage proportion after its item damage multiplier is factored out.
The base damage values grow by a factor of 10 for each successive slot up to including the Black Lich, then by a factor of 1000. For the extra damage of Squid and Specter due to their special skills , we need to consider both the direct damage bonus and the indirect one due to keeping them on a higher level. Their overall bonus factors therefore are:
X: B * 1.035^log_{210/207}(B) = B * B^log_{210/207}(1.035) = B^(1+log_{210/207}(1.035)) Blue Specter: (11/3)^3.390858 = 81.915 Flying Squid: (17/3)^3.390858 = 358.449
This means Blue Specter overtakes one but not quite two spots at his place in the hierarchy, between Swarm of Bats and The Big Plague, whereas Flying Squid stays where he is since he cannot quite reach the Tomb King, who still has ~2.79x as much damage.
To conclude, this establishes the following hierarchy for selecting monster items from chests:
Rank
Monster
1
The Tomb King
2
Flying Squid
3
The Black Lich
4
The Big Plague
5
Blue Specter
6
Swarm of Bats
7
Red Knight
8
Giant Zombie
9
Zombie Horde

While the direct effect of items does not come into consideration for the monster item selection, their indirect effect (through warranting a higher level) does. This leads to further cementing this hierarchy, the gaps in damage will get larger over time.

As a result, in the long run, Tomb King will deal almost and practically the entirety of the total damage.
Skull Allocation to Carl
We now know that in the long run, practically all skulls invested into non-tap monsters should and will go into one of them, Tomb King. But we still need to balance Tomb King against Carl the Monolith. Since Carl's damage bonus is multiplicative with everything else, we are looking to optimize a product, which gets much easier by looking at and comparing the respective log-derivatives.
For the Tomb King, we get:
D(l) = (1.035^l -1) * (50 + l) * c ln(D(l)) = ln(1.035^l -1) + ln(50 + l) + ln(c) dln(D)/dl = ln(1.035) * 1.035^l /(1.035^l -1) + 1/(50 + l) = ln(1.035) /(1 - 1.035^(-l)) + 1/(50 + l) lim_{l -> +inf}(dln(D)/dl) = ln(1.035)/(1 - 0) + 0 = ln(1.035) dl/dS = 1/(ln(1.05) * 20 * bs * (1-cr) * 1.05^l) dln(D)/dS ~= log_{1.05}(1.035) /(20 * bs * (1-cr) * 1.05^l)
The last approximation (taken from the limit) gets increasingly relatively accurate the larger the level becomes, and will allow us to phrase a solid rule of thumb later on.
For Carl, it is (with Strange Diamond and Empty Turtle Shell):
D(l) = 3.1^l ln(D(l)) = l * ln(3.1) dln(D)/dl = ln(3.1) S(l) = bs * (1-crC) /24 * (25^(l - 1) - 1) l(S) = 1 + log_{25}(1 + 24 * S /(bs * (1-crC))) dl/dS = 1/ln(25) * 1/(1 + 24 * S /(bs * (1-crC))) * 24 /(bs * (1-crC)) = 24 /(ln(25) * 25^(l - 1) * bs * (1-crC)) = 600 / (ln(25) * 25^l * bs * (1-crC)) dln(D)/dS = 600 * log_{25}(3.1) /(bs * (1-crC) * 25^l)
Finally, we can determine the equilibrium state by equating the two log-derivatives.
dln(DT)/dST = dln(DC)/dSC log_{1.05}(1.035) /(20 * bsT * (1-cr) * 1.05^lT) = 600 * log_{25}(3.1) /(bsC * (1-crC) * 25^lC) 25^lC * (bsC * (1-crC) * log_{1.05}(1.035)) / (12,000 * bsT * (1-cr) * log_{25}(3.1)) = 1.05^lT lT = log_{1.05}(25) * lC + log_{1.05}((bsC * (1-crC) * log_{1.05}(1.035))/(12,000 * bsT * (1-cr) * log_{25}(3.1)))
With the current maximum monster cost reduction of 0.3 for all and 0.43 for Carl, and the base Skull Cost of 5 * 10^13 for Tomb King and 10^18 for Carl, we finally obtain:
l_T ~= 65.9739 * l_C + 20.5272
In theory this gives the optimal level for Tomb King to a given level of Carl and vice versa, but keep in mind this falsely assumes the possibility of fractional levels. Since this isn't the case and the forced jumps especially for Carl levels are actually quite large, it's best taken as a guideline, a rule of thumb. For the actual Tomb King levels at which to save up to increment Carl one needs to compare the level increments' benefits individually and exactly, using an adequate efficiency metric (not related to the one that will be introduced later for the sake of comparing item crafting efficiencies, these are two separate problems).
Crafting Efficiency - Introduction
In this chapter we will examine the crafting options for the ordinary item crafting slots of the Arcane Laboratory in order to identify the optimal crafting strategy.

Assumptions regarding Time vs Ingredients
This analysis assumes that crafting ingredients are generally readily available, so that the bottleneck is the time needed to actually craft the items, not the time needed to obtain the ingredients in the first place. The assumption is reasonable since it matches most active players' consensus that the ingredients can be obtained through fast resets and clicking villagers faster than they can be consumed through crafting them into higher tier items. Therefore, optimization ought to be concerned with efficiency regarding craft time, not ingredient materials.

Finding an adequate efficiency metric
Almost all craftable items in Zombidle have their effects stacking additively with copies of themselves, causing the incremental relative gain of successive copies to be affected by diminished returns. The outstanding exception to this are Shards, which can be crafted from Ectoplasm Prisms and Death Mason Jars / Elixirs of Madness and stack multiplicatively with themselves.

Since that means we can, as a baseline, multiply our damage for every constant added craft time, our damage potential is generally an exponential function of total invested craft time. To accurately compare various crafting options across different time and effect scales, we need an efficiency measure that is scale invariant in this context.

An approach that is often attempted here is measuring by effect per craft time. Here is a visual representation why this doesn't satisfy the criterion:
Efficiency in this sense is the slope of the curve here. As you can see, crafting the same shard twice in a row is supposedly more efficient than crafting it just once, and crafting it later (or with simply more factors not factored out despite them not being affected by the new item) is more efficient than the others combined - this notion of efficiency makes no sense.

Now on to a better approach that solves theses problems and is actually scale invariant:
Note this is still the same function, but the effect-axis has been subjected to logarithmic scaling - the slope in this graph now corresponds to logarithmic effect per craft time, and that slope is now always the same regardless of where on the graph or across which width we choose to measure it. Furthermore, note that this is equivalent to level progression potential increase per craft time, so this efficiency metric makes sense both conceptually and mathematically. Therefore, it will be used from now on for the sake of all efficiency comparisons.

There are other equally valid metrics, like taking the "craft time"-th root of the effect or logarithms of any basis, but it doesn't matter which of the valid ones is taken; when applied to an item comparison, all will yield the same translated results.

Finding the optimal baseline
Since Splinters and Shards are the only craftable items not subjected to diminished returns as previously stated, they're the only ones suitable to serve as a baseline for all further comparisons. But which one is the best?

Orb shards can be ruled out because they aren't craftable from unlimitedly available ingredients. Between War and Greed shards, both have equal craft time and nominal effects, but we know that skull multipliers translate to larger equivalent damage multipliers, so the optimal choice can only be in the Greed line. Let's see which of the three has the greatest efficiency (levels per total craft time in weeks):
Type
Levels
Craft Time
Efficiency
Greed Splinter
1.6603
152
1.8351
Greed Shard
12.0749
457
4.4389
Fortune Shard
31.2131
1002
5.2333
Fortune Shard wins and will henceforth serve as the baseline benchmark.

However, to keep calculations as simple as possible, let's choose a simple unit by phrasing this baseline as
log(6)/1002h
, not bothering with the logarithm's base as it cancels out in any comparison anyways. Note that this means we are comparing in terms of log(skulls) per craft time, so any damage or orb bonuses have to be translated to skulls first.

Item comparisons in general
All items belonging to an additive stack will eventually intercept the baseline efficiency threshold once their stack has become sufficiently large. Let "m" be the multiplier the item will provide, "c" the translation expontent (0.946451 for damage effects, 1.449605 for orb effects), "t" its total craft time in hours, "e" the nominal additive effect of the item and "a" the value of the additive stack this effect is applied to. In any case, we have
log(m^c) / t > log(6) / 1002 c * log(m) > t * log(6^(1/1002)) log(m) > log(6^(t/1002)) / c log(m) > log(6^(t/c/1002)) m > 6^(t/c/1002)
For ordinarily stacking items, this can be further specified to
(a+e)/a > 6^(t/c/1002) 1 + e/a > 6^(t/c/1002) e/a > 6^(t/c/1002) - 1 a < e /(6^(t/c/1002) - 1)
If one chooses to assume the additive stack to be almost exclusively comprised of copies of that most efficient item, the number of items associated with that threshold intercept is:
a = 1 + e * n <==> n = (a-1)/e 1 + e * n < e/(6^(t/c/1002) - 1) e * n < e/(6^(t/c/1002) - 1) - 1 n < 1/(6^(t/c/1002) - 1) - 1/e
Note that this assumption, even when questioning its validity, gives at least very solid upper bounds for the maximum number of copies of these items to be crafted that may still be efficient.

Note also that this corresponds to the number of items at which crafting another one just stops being efficient. This means that to obtain a final stock cap of that item, a fractional result ought to be rounded up to the next integer value at all times.

Lastly, to identify the most efficient option within one stack, it is sufficient to compare the ratio of effect and craft time.
Crafting Efficiency - Simple Cases
Skull's value
Assuming uncommon Death Chalices are used as ingredients, and granting the conditional items that their conditions (Pastafury active, Bob sleeping) are always met.
Item
Effect
Time
Ratio
Rank
Death Mug
1.2
8
0.15
#2
Death Mason Jar
7.1
48
0.1479
#3
Teeth of Doom
0.5
5
0.1
#4
Squidstone
49.7
72
0.6903
#1
Squidstone wins if Pastafury is used, Death Mug if it's not.
Their attributes yield the following thresholds:
Squidstone: a < 49.7/(6^(72/1002) -1) ~= 361.70 n < 7.26
For a total stock cap of 8.
Death Mug: a < 83.29 n < 68.57
for a total stock cap of 69.

Spectral Scimitars
These constitute a separate stack. Their effective benefit depends on how actively the player clicks villagers, and how many skulls they hold on average relative to the village of the same difficulty they originated from (some constant set by the developers which is not publically known). We can combine these two influences into one parameter, "p", the portion that villager skulls make up of total skull income for the player by default (i.e., before the Spectral Scimitar bonus is taken into account). Under this condition we can specify the average increase in skull income due to the scimitars, and how it increases marginally through another scimitar:
S_t = S_d + S_v S_t = (1-p) * 1 + p * (1 + 0.5 * n) = 1 - p + p + 0.5 * p * n = 1 + 0.5 * p * n
S(n+1) / S(n) = (1 + 0.5 * p * (n+1))/(1 + 0.5 * p * n) = (1+ 0.5 * p * n + 0.5 * p)/(1 + 0.5 * p * n) = 1 + 0.5 * p /(1 + 0.5 * p * n)
At which point we can equate our previous effect parameter "e" with "p/2".

With a craft time of only 2h, this leads to the following cap:
n < 1/(6^(2/1002) - 1) - 2/p ~= 279.1137 - 2/p

"p" still needs to be estimated on the interval (0 , 1), but as such the upper bound of this intercept is 277.1137, resulting in a maximum stock cap of 278.

Total DPS per white orb
These items affect damage and their stack as a base value of 5%. For this to be standardized to 1, all items' nominal effect values need to be divided by 5%. We assume uncommon Stone Tablets to be the primary crafting ingredient.
Again, starting by selecting the most additively efficient within the stack:
Item
Effect
Time
Ratio
Rank
Power Cube Piece
2.1
1
2.1
#2
Power Cube
7.3
4
1.825
#3
Mega Cube
91.9
36
2.5528
#1

The Mega Cube wins here. Its efficiency cap is:
n < 1/(6^(36*z_f/1002) - 1) - 1/91.9 ~= 14.20
Or +6,428.55% DPS per Orb, for a total stock cap of 15.

Monster Damage
The competitors here are King's Collars of any craftable rarity and star rating, Magic Axe, Ultima Potion and Elixir of Madness. Again, comparing additive efficiency first to identify the best among them (assuming common ingredients where apllicable, and King's Collar ingredients from other monsters):
King's Collars
**
***
****
common
1.5
3.3333
10.0
uncommon
1.8
4.0909
13.2353
rare
2.1429
5.7692
19.7368
R4 King's Collar: 19.7368 Magic Axe: 0.1 Ultima Potion: 0.55 Elixir of Madness: 1.0042
There is nothing getting anywhere near R4 King's Collars, so we can go ahead and calculate the threshold for them.
a < 62.5/(6^(z_f*(3+1/6)/1002) -1) ~= 10,415.11 n < 1/(6^(z_f*(3+1/6)/1002) -1) - 1/62.5 ~= 166.63
This leads to a maximum stock cap of 167 R4 King's Collars. However, in the case of King's Collars, the growth of this additive stack simply through found items is significant. This means that the "a" cap is more expressive than the "n" cap, or that the n cap is supposed to include for example U4 King's Collars as half an R4 King's Collar, etc. One could even argue that it's in the long term unreasonable to craft any King's Collars at all, due to their decent availability from chests. In that sense especially this one ought to be taken more as an upper bound.
Crafting Efficiency - Pearl Necklaces
With the uptime ratios of abilities linearly approaching the hard cap of 1 and the shorter cooldown of Sloth's Form interfering with overlap patterns, the total average multiplier from all skills that has to be considered to determine the efficiency of Pearl Necklaces is only a piecewise defined function that cannot be expressed generally for any number of necklaces.
One may apply the arguably reasonable restriction to demand permanent Sloth's Form + Son of the Lich for a permanent maximum level traversal speed due to 20 clicks per second. This requires a total of 84 Pearl Necklaces at the time of the writing of this guide where the only skill cooldown reduction item available is Crunchy Candy Cookie, reducing the cooldown of Son of the Lich by 5% to 9:30. In this case, one may start by inspecting whether the step from these demanded 84 Pearl Necklaces to the 85th is still above the threshold.

With Spectral Repossession only increasing Blue Specter damage which constitutes a negligible fraction of the total, the only skills with effects that get effectively elongated by the 85th necklace are "Pillage and Plunder" and "Blackest of Plagues".
Pillage and Plunder, since Son of the Lich is always up, assuming the player has Smiley Baloney (no other items released that increase its effect at the time of this writing), provides a 4x skull multiplier while it's active.
Blackest of Plagues increases crit chance and thereby buffs damage. The average bonus multiplier critical hits provide to click damage is given by:
(1-cc) * 1 + cc * cd 1 - cc + cc * cd 1 + cc * (cd - 1)
With the items currently available, crit chance gets up to 0.51 or 51% while Blackest of Plagues is off (1% base, 30% from Magic Dagger, 10% from Bats passive skill, and 10% because Son of the Lich allegedly buffs this passive skill despite its tooltip stating it only affects active skills), and it reaches the 1 or 100% cap while Blackest of Plagues is on. Crit damage is 4 with Power Necklace. This results in click damage multipliers of 2.53 without and 4 with Blackest of Plagues. However, strictly speaking, not all the damage output is from click damage, the non-tap monsters also have base DPS. Let cm denote the previously calculated average crit multiplier and GSD be the level of the player's Golden Shower of Deathness (the Hell building boosting click damage by a portion of DPS). Since Bob's base click damage is negligible, at 20 clicks per second from Sloth's Form + Son of the Lich, we get for the total damage multiplier:
dm = 1 + 0.05 * GSD * 20 * cm = 1 + GSD * cm
We can now compute the marginal relative damage increase of activating Blackest of Plagues:
mi = (1 + 4 * GSD)/(1 + 2.53 * GSD)
At the current maximum level 6, this is roughly 1.545117. The simplification to assume that non-click DPS is negligible corresponds to the limit of this value for GSD going to infinity:
(1 + 4 * GSD)/(1 + 2.53 * GSD) | GSD != 0 (1/GSD + 4)/(1/GSD + 2.53) lim_{GSD -> +inf}((1/GSD + 4)/(1/GSD + 2.53)) = (0 + 4)/(0 + 2.53) = 4/2.53 ~= 1.581028
In the anticipation of future updates to the game, this may therefore be considered a more reliable value to calculate an upper bound in the long term. Furthermore, we need to take care not to compare apples and oranges. Since we ultimately want to compare to our benchmark which is a skull multiplier, this damage multiplier should be translated:
(4/2.53)^(1/z_f) ~= 1.542717

So now we have multipliers to be applied while their respective skills are active, but in order to evaluate the effect of additional Pearl Necklaces, we need to properly average the presence and absence of these multipliers over time, weighted by their active and cooldown durations respectively, and then calculate the relative marginal increase of this average due to an additional necklace.

Unfortunately, I haven't been able to do this in a universally satisfying manner. It comes down to fulfilling two conditions that seem to be irreconcilable.
Firstly - translating the effects between Skulls, Damage, Orbs and then averaging them should be the same as averaging them in a different of these quantities and then translating them afterwards:
m(a^c,b^c) = m(a,b)^c
The mean that satisfies this condition is the geometric mean:
geom(a^c,b^c) = (a^(c * w_a) * b^(c * w_b))^(1/2) = a^(c * w_a /2) * b^(c * w_b /2) = (a^w_a * b^w_b)^(c/2) = ((a^w_a * b^w_b)^(1/2))^c = geom(a,b)^c
Secondly - we want the effect to behave "linear-ish" in regards to the skill duration in the sense that when computing the relative marginal increase (as the ratio of average new and average old effect) it features diminishing returns, because on the example of Sloth's Form, clearly the first Necklace (doubling the duration of the skill) has greater impact than the 20th etc. The mean that satisfies this condition is the arithmetic mean, and the geometric mean does not - the ratio of the new and old geometric means will always be the same regardless of how many Necklaces there already are, as if the effect scaled exponentially with the number of necklaces / skill duration, when clearly it does not, it's additve instead.
I haven't found a solution to this problem yet, but my guess is that the exponent-shenangigans are far less impactful than the lack of diminishing returns and linearity with duration, so taking the arithmetic mean of the skull effects (since we are comparing to the threshold which is also a skull effect, so we can avoid applying translation exponents to the sum) is probably the better way to go.

At a total crafting time of 5 hours for a Pearl Necklace, we obtain the following comparison values, standardized to level progression potential per week:
ri = (97 * 4 * (4/2.53)^(1/z_f) + 12 * 4 + 5)/(96 * 4 * (4/2.53)^(1/z_f) + 12 * 4 + 6) lpp(ri) = log_{1.13^(1/z_f)/1.06}(ri) ~= 0.1388 eff_PN85 = lpp(ri)/5h ~= 4.6636 levels/week eff_base = lpp(6)/1002h ~= 5.2333 levels/week eff_PN85 < eff_base

Therefore, already the 85th Pearl Necklace appears not to be worth it. This establishes 84 Pearl Necklaces as an upper bound for the efficient stock cap. It could be even lower, but as explained initially the permanent Son of the Lich demand may be considered defensible. On the other end of the spectrum however, it provides pressing evidence that the often encountered "all skills permanently active" doctrine is bad advice.
Crafting Efficiency - Chaos Crests & Gems
Common and Uncommon bosses occur with 65% vs 35% chance, i.e. at a 13 : 7 ratio. That's already enough to tell which of the two is more additively efficient:
Chaos Crest: 7 / 1h = 7 /h Chaos Gem: 13 / 15h = 0.867 /h
But to determine the relative increase in orb income rate due to successive Chaos Crests, their additive stack needs to be evaluated. That is the average orbs dropped by a boss, where all general multipliers may be omitted (since they cancel out when determining the relative increase).
Let "a" denote the total additive stack as previously, F_c the flat bonus drops of common bosses, F_u that of uncommon bosses, M_c the drop multiplier specific to common boss drops, M_u to that of uncommon bosses, "w" the world number / map index, "l" the difficulty level of the boss (which we assume to be 60+), we get:
a = 13 * F_c * M_c + 7 * (F_u + w * ((l / 5) - 10)) * M_u = 13 * F_c * M_c + 7 * (F_u + w/10 * (l - 50)) * M_u to e = 7 * M_u
We can standardize this in the following manner so that e = 1:
a = 13/7 * F_c * M_c / M_u + F_u + w/10 * (l - 50)
This was for one difficulty level. To get the average over an entire area, note that iterating this over l in steps of 5 gives an arithmetic series, from l1 to l2, where n is the number of boss areas traversed:
sum_{l=l1; step 5}^{l2}(a) = n * (13/7 * F_c * M_c / M_u + F_u + w/10 * ((l1+l2)/2 -50))
Note how "l" from the single-level case has simply been substituted with the arithmetic mean of the first and last boss of the area, (l1+l2)/2.
The average income rate across one area is then simply this total divided by n, times some constant that indicates the speed at which levels are traversed (which doesn't matter in the calculation of relative increases since it is constant).
a = 13/7 * F_c * M_c / M_u + F_u + w/10 * (l_mean -50)
To broaden this to an average over an entire world or part of a world which the player is farming, substitue the mean level with the weighted mean of all mean levels of all traversed areas, weighted by the number of bosses in each respective area. So again, the formula doesn't really change.

We can now go ahead and work out a formula for the efficiency threshold (and hence stock cap) of Chaos Crests. As of the time of this writing, the available unique items amount for F_c = 50, +50 for each Divine Energy Bar and +1 for each Chaos Gem, and for F_u = 30, +1 for each Chaos Crest. For M_c / M_u, the only items that contribute to those are Divine Lotion and Divine Conditioner, stacking multiplicatively. A Lotion (boosting common drops) is given first so the ratio is 2 for 750 levels, then Conditioner balances it out to 1 for 3750 levels, infinitely repeating. Since in the long term, level progression is only achieved through crafting shards and hence happening at a constant pace, we can average this ratio simply through:
M_c / M_u = 750/4500 * 2 + 3750/4500 * 1 = 7/6 ~= 1.1667
This gives us all prerequisites to determine the efficiency cap:
a < 1/(6^(z_f/z_i /1002) -1) ~= 810.1583 13/7 * (50 + 50 * DEB + CG) * 7/6 + 30 + CC + w/10 * (l_m -50) < 810.1583 50*13/6 + 50*13/6 * DEB + 13/6 * CG + 30 + CC + w/10 * (l_m -50) < 810.1583 CC < 671.8249 - 108.3333 * DEB - 2.1667 * CG - w/10 * (l_m -50)
With four input variables, this cap isn't quite as catchy as the other ones. An important thing to notice here is that this cap will shrink at a considerable pace as the player progresses. For example, with a single Divine Energy Bar (obtained from The Angel at level 1251), no Chaos Gems, and farming mostly in world #4, the cap falls below zero at an average farmed difficulty level of 1458.73. And it only gets worse for the Chaos Crests as the player keeps progressing further.
With that in mind, players focusing on long-term progression may not want to craft Chaos Crests at all.

This concludes crafting efficiency cap analysis.
Further Applications & Closure
As initially stated, this guide should be a foundation to enable tackling and solving various strategy problems that come up in Zombidle, I chose examples that are difficult to demonstrate advanced methods and fit in the text guide format. There is so much more that can be done with this, here are some things that come to my mind straight away:
  • Optimal Diamond Purchase Order list - the vast majority of stuff that can be bought with diamonds (hell buildings, unique items of past events) contribute to level progression potential (through damage, skulls, orbs, cost reduction, etc.). They can be compared just like item crafting efficiencies, by provided progression potential per diamonds. Since some of the items' effects depend on individual player input, this may be incorporated in a spreadsheet.
  • Exact Monster Level-Up Selection calculator - I alluded to this in the Skull Allocation chapters, assuming continously fractional rather than discrete level-packaged skull investments allowed obtaining elegant rules of thumb, but exactly determining the optimal order of monster level-ups requires more theoretical groundwork and the consideration of the player's individual monster item stocks and cost reduction items in the form of maybe a spreadsheet or small online calculator / script. Whether the effort is worth the gain is questionable though, selecting the level-ups optimally will provide little improvement over just dumping everything into Carl and Tomb King when it can be afforded.
  • Item Collection calculator - At your current item inventory, which of the three items offered to you from the chest you just opened would provide the largest benefit? This is a rather simple spreadsheet application, the groundwork to translations and item efficiency caps already covers more than what's necessary to implement this.


That's it for now! I'm looking forward to any feedback or questions, and encourage others to try and use this foundation to solve other Zombidle strategy problems, be it some of the things I suggested or something completely new - I'm curious what people will come up with! If you want me to review or include your work, you can contact me preferably via reddit, /u/MarioVX , or just post in the Zombidle subreddit.

I'll try to keep this guide updated if any future game updates change anything significant, which shouldn't happen too often.

Enjoy your time with the game and stay curious!
2 Comments
cunk. 3 Jan, 2019 @ 8:34am 
wow very cool guide and seems like its helping me in a small way but helps a lot!
Redbeard 25 Oct, 2017 @ 7:58pm 
I'm not an expert in mathematics, so I can't make an accurate comment on the validity of the work done here.
However, I have to say that it looks very impressive!
Kudos to you for all the work you put into this guide.