ExetaRes LogoExetaRes

User:Alip Aldo

Hi from Ab'Dendriel! I am a half-elf, half-human who spent most of his life either sleeping or studying on the Isle of the Kings. Husband to a half-dwarf, half-gnome.

In RL I am a Computer Scientist, playing Tibia from time to time due to childhood nostalgia. This account was created in 2006, but I remember playing since I had access to the Internet. It was probably between 7.1 and 7.4 (~2002-2003), certainly before wands were introduced and scary red skulls were already present!

My drafts

This is a list of new pages, that I'm slowly working on. Some people may find them useful:


---

Blog pages are not enabled on this pages, therefore I will write my thoughts in this section.

Robust statistics

Fansites performing original research usually resort to estimating various parameters (armor value, breakage rate, max damage, etc.) from collected empirical in-game data employing statistical learning methods. Even if done naïvely, the estimated value is usually the maximum likelihood estimation given the collected data. What is missing, however, is specifying our certainty of estimation of the actual underlying parameter.

In Tibia, we most likely work only with Bernoulli trials (random(0, 1) < p%) and Discreet Uniform Distribution (random_int_inclusive(a, b)) as RNG-primitives. Due to the Central Limit Theorem, if we face an aggregation of multiple such distributions, it may look like a normal distribution.

For instance, when we attempt to estimate a breakage of thrown weapons, we face such a challenge. We could start with two hypotheses: either each spear has predetermined number of uses (probably following a uniform distribution) or they have a (fixed) percentage of breaking with each throw – i.e., they have no memory. For stackable items, we may conservatively assume that the first one is not the case. But, unless the predetermined number follows geometric distribution – "as in pre-simulating n throws", we can tell those two apart. If we assume the memory-less character of these spears, estimating the simplifies a lot, since the tries may be seen as a Wikipedia:Beroulli process – a sequence of 0 (retain) and 1-s (break), each independent from each other. What is more, for estimating of we don't need the spacing between successive breaks – it may even introduce a misunderstanding. If we say "the spear breaks after 5-10 throws (average = 7)" that would suggest the the spear is as likely to break after 5 and after 10 throws (hence uniform distribution). That is not the case for (the assumed) independent Bernoulli trials. The maximum likelihood estimation is very simple and intuitive: if n is the total number of tries and r is the total number of failures, we can estimate (that is from Binomial distribution. This is not the only possible estimation, as other methods could included the bias in the collected data – in essence, it is good for large number of samples. If we set r (e.g. 100 spears to break) and measure n, the unbiased estimation for such settings is (from Pascal distribution). The bias comes from the fact that we stop our experiments upon the final break – this is why we should remove the last try from the data.

Those estimations have one mayor issue: although it is the best estimation from the data, we could have been very lucky when collecting it. An obvious solution is to collect more data. But how many is enough? Well, in principle, it's never enough unless we accept some inaccuracy and risk of being wrong. Wikipedia:Confidence Intervals let use answer another question: given a 5% chance (or 1%, or 0.1%) that we were just lucky and the answer would be wrong, what are possible values? One simple approach to this question is looking at percentiles of the studied distributions. If for a given luck chance a distribution parameterized by would on yield smaller or larger values than collected from the data, we can disregard such p-s. Alternatively, with a more standard and less conservative approach, include only p-s, such that our estimated value lies in the central of the distribution. We can reformulate this question as "how many tries we need to perform in order to estimate p with accuracy of 1% and 95% confidence?". The answer is not simple, as it depends on both p, c and accuracy, but it is very important. In our example, if p is close to 50%, required n (number of tries) is at the very least 10,000. Read the following sections for details and being able to answer such questions yourself.

TODO:

  • write about MLE estimators vs unbiased ones
  • include a table with formulas
  • include examples: breakage rate as Binomial Distribution/Pascal distribution
  • uniform: boss spawn date
  • confidence interval
  • make the language more accessible

Zero-stats character

It may be useful to eliminate the confounding factor of character defensive/offensive attributes during combat. We may achieve this by:

  • engineering an effective 0/0 attack/defense weapon – in contrast to bare fists which are around 7/5,
  • being naked to have zero armor value.

In such situation our character page should look like:

  • attack value:
  • defense value: 0
  • armor: 0
  • mitigation: m%

Because the attack value is just our base damage, the character will always deal the same amount of damage. This simplifies a lot estimation of creature's armor/defense. Because we have no shielding and armor, we will receive the raw dealt damage reduced only by our mitigation value (rounded down).

If one does not need to attack, an even simpler approach is to equip just a bow. Without any ammunition, the character won't attack at all, and will have 0/0 attack/defense stats. The interesting side effect is that the character cannot damage weak creatures, but the summons will attack the selected target. This might be useful to, for instance, skill the summons.