Probability
The Great Random - a mysterious force which permeates the very essence of Godville and is treated as a cruel creature that gods hate because it always goes against the god's wishes, and is also often treated as a deity in itself.
The majority of in-game events occur randomly. This is not because we are missing some facts but is a result of the usage of random number generators which control the outcome of these events. Since randomness is the mechanism, we can only understand the game mechanics by the use of probabilities. However, true randomness is hard to produce (True randomness is usually achieved through natural events such as radioactive decay and Brownian motion.); the random number generators of Godville are driven by code and are therefore only pseudorandom. This means certain patterns in numbers produced would be evident should one look for long enough but this is deemed too tedious to be worthwhile and so will not be the focus of the article.
The mechanics of gameplay in the game of Godville rely heavily on probability, which can nicely be defined as the long-run relative frequency. By understanding such things we can therefore calculate the likelihood of certain in-game events occurring. Here is a beginner's guide to applying some basic probability theory to the gameplay of Godville. No prior knowledge of statistics is needed.
Probability of obtaining certain artifacts, pieces of equipment, skills and auras
These things are plentiful and if a list of them can be acquired, it is possible to calculate the probability of obtaining one. We shall use Auras as an example since there is a definite complete list of them on the wiki. First of all, we shall start with the fact that the hero has received a new aura. We would like to know the probability that the aura is a particular one. Here is our first important fact:
- In Godville, all in-game events are equiprobable (i.e. have equal probabilities to occur). It's worth saying here that this doesn't apply to all in-game events because, for example, the probability of receiving a gold brick when a hero has 3000 gold coins is not the same as when they have only 200 coins, but let's define an in-game event as a range of possibilities that can be picked, given a certain condition is fulfilled.
- This leads to the fact that the probability distribution is a discrete uniform distribution. This looks very boring so a picture of its slightly less-boring c.d.f is provided below.
What about rare artifacts then? We shall come to that later. We must now state what we know about auras.
- There are 6 Auras
Note: This was true at the time of writing, but there are now more. Mentally edit this article as appropriate.
Therefore, since all probabilities are equal, the hero has a 1/6 chance of receiving a certain one.
What about the probability of obtaining one aura OR another? We shall call the two auras A & B and P(something) will symbolise the probability of 'something' occurring. Here is our first basic rule of probability:
P(A or B) = P(A) + P(B)
For mutually exclusive events such as those encountered in Godville
Therefore, the probability of obtaining one of two auras is 1/6 + 1/6 = 1/3.
We can apply these rules to anything where there is a list of outcomes which are all equiprobable. We could do this then for artifacts, equipment and skills but since we do not have a definite complete list of any of them, we cannot carry out a full analysis. However, we can easily see why certain types of artifacts are rarer than others:
Why are Activatable Artifacts the rarest type of Artifact a hero can find if all events are equiprobable? The answer is simple: there are hardly any of them (relative to normal artifacts of course). Let us take an example where there are 10 individual artifacts and 3 of them are activatable ones. A hero obtains one of these artifacts. The probability of getting a certain one of them is 1/10. We can then say that the probability of getting an activatable one is 3/10 and the probability of getting one of the normal ones is 7/10.
Probability in Fights between Monsters and Heroes
In a fight against a monster, it is possible to alter the outcome using the Remote Control but what if the hero is left to their own devices? In this case, probabilistic rules come into place. We would like to know the probability that a hero with a certain amount of health will win against a monster who has a certain amount of health. The health of a hero is decided by their level so we will set the level of the hero to an arbitrarily chosen number; 37 (health=244). The hero starts off as fully healed. Let us now state what we know:
- Hero - level 37 therefore health = 244
- Monster - for ease, we will set its health to the same amount, therefore health = 244
There is a certain range of values for damage which a hero can inflict on a monster. It is exactly the same as the range of damage values a monster can inflict on a hero. All values are equiprobable. For simplicity, we will assume this range of values:
- Range of Damage Values: 1-20 (This is simply for the purpose of discussion, the true range is not currently known.)
- Therefore 1/20 chance to inflict a certain value of damage
These value ranges stay the same regardless of a hero's level or equipment (one has to wonder the point of such things then...). There are 20 values here which means that each one has a 1/20 chance to be inflicted by a hero. Now what if we would like to calculate the minimum number of turns one hero will take to defeat the monster? To do this, the hero would have to inflict the maximum amount of damage they could every turn. This amount of damage is 20. Both the hero's and monster's health is 244. 244 divided by 20 equals 12.2 so we need 13 turns to do this (as 13 is the smallest number that is at least 12.2). There is a 1/20 chance to inflict the maximum amount of damage and we need the probability that this 1/20 chance will happen 13 turns in a row which means that this is an ideal time to introduce another basic rule of probability.
P(A and B) = P(A)P(B)
For mutually exclusive events such as those encountered in Godville
In other words, we must do 1/20 x 1/20 x 1/20... until we have multiplied 1/20 by 1/20 thirteen times. This is just 1/20 to the power of 13, however, as there is 16 excess damage hitting 1/20 thirteen times is merely one out of 67863915 possible combinations that kills in 13 turns. Thus, the probability that the hero will take the shortest possible amount of time (13 turns) to defeat the other comes out as 0.000000000828 or in scientific notation, 8.28 x 10^-10, or just slightly rarer than one in a billion. This is clearly a tiny probability and is to be expected given you need to be especially lucky to get the best possible scenario.
Now what if we want to calculate the probability that the hero will take the longest possible time to defeat the monster? The process is much the same. There is still a 1/20 chance that the lowest amount of damage (1) will be inflicted by the hero. Given 1 damage per turn, 244 turns will be needed to defeat the monster. We now want the probability that this 1/20 chance occurs 244 times in a row. 1/20 to the power of 244 gives our final answer which is far too large to write out fully but in scientific notation it is 3.5 x 10^-318. That's 317 zeroes after the decimal point followed by 35, tiny! However the monster has to also deal 1 damage for 243 tries, or the hero dies before the 244-turn win is achieved. This results in an unbelievable 2 x10^-634! That's an insanely small probability and makes maximal damage a huge number in comparison.
As long as you know the health of the monster, you can calculate probabilities in the same way as we have done for duels between a hero and another hero. There is one extra factor though: you may want to find probabilities concerning the amount of Gold coins a hero receives when they defeat a monster. Again, since all events are equiprobable, there is a range of values, which is provided below for your use:
- Range of Gold Coin Values: 1-40
- Therefore 1/40 chance to receive a certain value of gold coins
Probability in Equipment Durabilities
A hero will occasionally change their Equipment. They will either downgrade or upgrade this piece of equipment but eventually in the long run will continue to upgrade and the durability of the equipment will increase more and more. How will we model this process probabilistically then?
We need a solution where all events remain equiprobable, so we must have a range of values for which the durability of equipment can change by. From observation of equipment, it is possible to see that it can upgrade by a range of 1-3 and downgrade by a range of 1-2 so what do we do? We actually have all we need now:
- The range of values by which the durability of a piece of equipment may change goes from negative 2 to positive 3
- This means that each value has a 1/6 chance to be chosen (including the value zero in which case the hero does not change their equipment)
A negative value obviously represents a downgrade and a positive value an upgrade. Since there are more positive than negative values there is a higher probability of upgrading than downgrading which means that instead of staying near zero (as in what would happen with a one-dimensional random walk where the probabilities of moving forwards and backwards are both equal), we would get what we actually see: a constant upgrading.
Now, to calculate the probability that a hero upgrades a piece of equipment by twelve points in the quickest possible way, it can only be done by the process [+ 3 points + 3 points + 3 points + 3 points] to the durability, taking four trips to the trader. Each value is equiprobable so we just do 1/6 to the power of four to get the answer. 1/1296 or 0.000771604938 would be the result for this.
Probability of Influences in the Arena
These are the possible effects of Encouragement and Punishment influences in the Arena.
| Encouragement | Punishment |
|---|---|
| Heal the hero (by small amount) | Punish the enemy (by small amount) |
| Heal the hero (by medium amount) | Punish the enemy (by medium amount) |
| Heal the hero (by large amount) | Punish the enemy (by large amount) |
| Backfire | Backfire |
It should be noted that the amount that a hero is healed or punished by is randomly selected from a range of values which increases with each level that the hero gains. These ranges are unfortunately unknown at the moment. Anyway, we can see from this that there is a 1/4 chance of backfiring. What do we mean by backfiring though? When 'backfire' has been randomly selected, this isn't the end of the story because there are different backfire outcomes.
| Encouragement | Punishment |
|---|---|
| Heal the enemy | Punish the hero |
| Heal both the hero and the enemy equally | Punish both the hero and the enemy equally |
| Do nothing (make a rainbow or some other omen) | Do nothing (the lightning bolt misses) |
Each backfire has a 1/3 chance of happening AFTER backfire has been selected. This means the probability of one of the three backfires is not 1/3 but is actually a 1/4 x 1/3 which equals 1/12. Now that this is explained, we can return to the probability of any backfire; 1/4. In probabilistic terms where the highest probability is one (a certainty), this is quite a large one. It definitely accounts for the skewed random complaint and this is why: we shall calculate the probability of a backfire happening five influences in a row. We know by now that this is just 1/4 to the power of 5 which is 1/1024. This looks like a tiny irrelevant probability which means that it is time for a new rule for calculating our long-run average:
Expected Value = Probability x sample size
Note: Ok, yes this is for the binomial distribution. Different distributions may be discussed here in this article in the future actually.
So let us say that there are about 5000 players in a all of Godville. There are not, but we do not know the true figure so we shall arbitrarily choose this one. According to our rule, to calculate a prediction of how many players (on average) will suffer, we multiply 1/1024 by 5000 which roughly equals 5. This shows that even when seemingly small probabilities are scaled up, the impact can be significant. This is a very simplistic model because in actual fact, each of the 5000 players would use a certain number of influences and there would be many other factors involved, but this model is still enough to showcase what can happen with large sample sizes which is why it is used here. The main message in any case is that with such a large sample size, players with long streaks of misfortune are inevitable.
Probability with Voice of God Commands
For voice of god commands, these are the possible outcomes:
| Outcome | Probability |
|---|---|
| Command is completely ignored | 1/3 |
| Hero hears the command but doesn't understand it | 1/3 |
| Hero carries out the instruction | 1/3 |
It is important that the conditions for the particular command to work are right or the probability drops to zero. This is because the 'all events are equiprobable' rule only applies to everything that involves random selection as noted at the very beginning of this article; the schedule of the hero obviously is separate from probabilistic rules. The probabilities for voice of god commands are exactly the same outside the arena as they are inside it.
NB: these probabilities have been checked numerous times and have always been found to be accurate. In actual fact, the probabilities were discovered by running many trials, and the events associated with them matched up afterwards.
Digging
For the 'dig' effect, there is more than one possible effect so we shall use it as our main example. Remember that the condition for this command to have the 1/3 probability of working is that the hero must be travelling and finding his way. This time, we shall go straight to a table of outcomes and probabilities:
| Outcome | Probability |
|---|---|
| Command is completely ignored | 1/3 |
| Hero hears command but doesn't understand it | 1/3 |
| Hero digs and finds gold (range: 50-200) | 1/15 |
| Hero digs and finds gold (range: 500-2500) | 1/15 |
| Hero digs and finds a random artifact | 1/15 |
| Hero digs and finds a gold brick | 1/15 |
| Hero digs and finds nothing | 1/15 |
Since you know how to use them, these tables serve as useful reference material that demonstrates how things work.
Questing
It can be noted that to Create a level playing field questers must placate The Great Random lest it mess up the quester's work. Additionally, it should be noted that The Great Random may while the quest is ongoing resort to interfering with all manner of conditions to derail the quest.
