Tags

wow (82) real.life (27) mathematics (19) info.tech (13) commerce (10) doomsday (7) runescape (4)

Search This Blog

24 October 2009

The Time-Value of Health

This blog post builds on the concepts suggested in 'Not All Hitpoints are Created Equal', helping to adjust healing for the health level of the recipient.

Experts in finance speak of the time-value of money. Under this concept, the value of a certain quantity of dollars (or other currency) will decrease as time passes. Many attribute this to the fact that people want money now rather than later. Therefore, to keep this time-value the same, interest must be paid on top of this quantity of dollars.

Hitpoints restored by healing also seem to have this time-value, since a heal of the same size will be more valued the sooner it is received (considering that people wish to keep their health at a maximum). How should such heal weighting be done?

It should be noted that any (effective) healing done is in response to damage that has been taken earlier. Therefore, to find the time-value of all heals in response to that damage (or its present value), they are to be discounted to the point in time the damage occurred. This would mean that a hitpoint restored sooner would be worth more than a hitpoint restored later, and their present values would be accordingly different.

There are different ways of calculating interest on health, though the compound interest treatment is best suited for discounting health. Compounding means that interest is paid on both the initial amount and the interest earned up to that point. Compounding seems best suited for valuing heals because of the power of compound interest (a concept in economics):
  • In the case of growth in a bank deposit, the interest already earned is used in earning further interest, such that the bank deposit's total value at a point in time (its future value) increases at an increasing rate (it exponentiates!).
  • In the case of economic growth, some of the goods and services an economy produces are capital equipment (which make it easier for the economy to produce other goods and services). Some of its economic output is used in producing further output, and so it exponentiates as well.
  • In the case of population growth, each head already existing will help in bearing more heads in birth. So, populations would be exponentiating over time as well.
So, can healing that is received be used in generating further healing? The answer to this question must be considered in terms of minimising loss (rather than maximising gain, as per the above three examples). Consider a case where the entire raid (including the healers) is on low health. If a healer were to die (because of a lack of healing), they cannot heal anymore, and so there is more of a healing burden on the remaining healers. If the other healers cannot increase their healing accordingly, this increased burden will cause another healer to die, increasing the burden on the other healers even more. This may eventually snowball into a wipe, which may have been avoided if the first healer received a relatively small heal initially! Therefore, the exponentiation of the future value of health (as associated with compounding) would be appropriate for valuing heals. In this case, instead of dragging the heal forward through time, the reverse needs to be done and the heal needs to be dragged back to the point the damage was taken.

However, there are varying lengths of time (periods)  that interest on money can be compounded through (where the annual rate is divided between each compounding period and each are applied on their corresponding periods). Instead of annually, interest can be compounded semiannually, quarterly, monthly and daily (which are the common compounding frequencies). Which compounding period should be used for heals? Interest on health certainly is not awarded by any particular person, so the compounding period is not arbitrary. The population growth example above is regarded as a form of natural growth, which has an infinitesimally small 'compunding period'. The future value of a heal can be regarded as growing naturally as well, so continuously compounding interest (based on the same exponential growth mathematics) would be appropriate for valuing it.

It would be important to note that:
  • An interest rate under the continuous compounding regime is called the force of interest.
  • Interest rates on money are expressed as an annual percentage compounded however many number of times during the year (that is, it is expressed as a p.a. (per annum) figure). Due to the frenetic nature of NPC encounters, I will express interest rates on health as p.s. (per second) figures.

The following formula calculates the present value (H0) of a heal (H) under a p.s. force of interest r when compounded continuously over t seconds, where e is Euler's number (approximately equal to 2.71828):
H0 = He-rt
Example 1: Orlix casts a Flash Heal for 2600 hitpoints in response to damage that Sidaria took 3 seconds ago. If the force of interest is 7% p.s., what is its present value?
H0 = He-rt
H = 2600, r = 0.07, t = 3
H0 = 2600 × e-0.07 × 3
H0 = 2108 hitpoints
Example 2: Sammy, a Protection Paladin, wants 4600 hitpoints of healing now, but his healer Adriana can only deliver Holy Lights after 4 seconds of delay. Under a force of interest of 11% p.s., by how much must Adriana's Holy Light heal to meet that demand?
Rearranging the formula, H = H0ert
H0 = 4600, r = 0.11, t = 4
H = 4600 × e0.11×4
H = 7142 HP
Heal-over-time (HoT) spells heal for regular-sized ticks distributed evenly over time, much like an annuity in finance. Of course, the present value of the entire HoT is less than the sum of its ticks. The following formula calculates the present value of a HoT with tick size T and number of ticks n under a periodic interest rate of rp:
H0 = T/rp × (1 - (1 + rp)-n)
To use this formula with a p.s. force of interest for p.s. ticks, the force of interest will need to be converted to an effective rate p.s.:
rp = re = er - 1
If the HoT does not tick each second, then the p.s. force of interest would need to be converted into a periodic force of interest. If n is the number of seconds in 1 tick, the periodic force of interest is:
rn = nr. This would then need to be converted into an effective periodic rate using the above formula.
It would be important to note that:
  • Even though the last tick is worth much less that the first tick, it is unwise to rely purely on HoTs anyway.
  • HoTs are usually cast pre-emptively, either to help with healing large future damage, or to mitigate the periodic damage from a DoT. In both these cases, the ticks would not be dragged back to the same point in time, and their present values would accordingly be higher.
Example 3: My Renew ticks for 1750 HP every 3 seconds for 15 seconds. If the force of interest is 8% p.s., what is its present value?

r = 0.08
r3 = 3×0.08
r3 = 0.24
rp = e0.24 - 1
rp = 0.27124915
T = 1750, n = 5
H0 = 1750/0.27124915 × (1 - (1 + 0.27124915)-5)
H0 = 4508 HP.
Example 4: Blizzard has declared that Wild Growth (treat as 206 HP per second for 7 seconds) and Circle of Healing (1008 HP) are equivalent. What force of interest are they implying? (Equation solvers like this one would help!)
Equivalent when present value of Wild Growth healing equals Circle of Healing healing.
T = 206, n = 7, H0 = 1008
206/rp × (1 - (1 + rp)-7) = 1008
Solving for rp, rp = 0.092813671
This is the effective rate, so to convert it into the force of interest, 0.092813671 = er - 1
Solving for r, r = 8.876% p.s.

No comments:

Post a Comment