immortalityidle / immortalityidle.github.io

Immortality Idle Game Repo
32 stars 31 forks source link

TrainingSimplify #192

Closed VladFurman closed 10 months ago

VladFurman commented 10 months ago

Avoid a loop by using logarithms to calculate exact day training happens.

getProbUpgradeAfterDay = dailyFail^days

dailyFail = 1 - dailyUpgradeChance : math, static based on age, attribue, power does not change over days

dailyFail^days = standard probability (static probability each day)

chance = dailyFail^days log chance = days * log dailyFail log chance / log dailyFail = days

immortalityidle commented 10 months ago

Very cool simplification.