# Probabilities

Here on Ape Island, we have a very large number of different apes. When you come to the Ape Builder to generate an ape, you have the chance to create one of the five different classes of apes: Pure, Mythic, Legend, Rare and Common. But, what are the probabilities behind each of these results? This post is here to answer this question.

As you can see, each ape has

*six*defined parts: Head, right and left arms, torso and two legs. Additionally, each Season of Apes has a defined number of skins (materials). As an example, there are*eight*Season 2 materials: Wood, Rich, Nebula, Chadium12, Gold, Liberty, Orang and Chimp. Each ape is created from these materials.Season 2 will serve as the example for calculations described below.

It helps here to visualize apes in a less fancy manner. In the image below, we have ape bodies consisting of 6 parts and 8 different colors.

This image shows 100 randomly generated apes. See how most bodies have a mix of different materials?

We can see some that have 3 parts of the same color, many with 2 of the same, but there are no Pure bodies in this sample.

Note the first body in the image (top left hand corner). This one has 2–2–1–1, that is, two colors are the same twice, and one of each color for the remaining two parts. This case is what we consider Common because it has a maximum of two parts repeated.

We could also have the case of a body that is 3–2–1, this would be a Rare ape, as the maximum here is 3 repeated colors. However, this could also be accounted for as a Common ape, as it has 2 repeated colors as well. To arrive at precise probabilities we had to put some rules in place.

The rule that decides the class of the ape is the maximum number of repeated colors. That is, in the case of the 3–2–1 body, this would only be considered a Rare ape and we eliminate the possibility of it being accounted for as a Common ape as well.

By doing this, we can arrive at the total number of each class. Then, we just need to draw their probabilities against the total number of potential ape combinations.

In this table, each possible color is defined with a number, so we have 1–8 to represent the 8 different colors.

Then we generated all 262,144 possibilities; these are also known as tuples.

For each tuple, we group like numbers, i.e., same colors (e.g., 1 = Red, 2 = Green, etc.).

The first column represents a tuple.

The second column represents the grouped data (this would be considered a verification).

The third column counts the number of members in each grouping in the second column.

Column 4 takes the max group size, and this gives name to the bucket.

Then we just count how many are in each bucket according to the 4th column, and divide that number by 262,144 (total number of combinations).

Visualizing these random samplings helps verify that things went according to plan.

Here is the output for this case:

Total Combinations: 262,144

Number of parts with max same materials:

Number of Parts with Same Materials | Max Supply |

1 Part 2 Parts 3 Parts 4 Parts 5 Parts 6 Parts | 20,160 181,440 54,320 5,880 336 8 |

The first item means the number where all parts have a different material. The second item means the number where no more than 2 parts have the same material, but there was at least one case where 2 shared material. And so on.

These are the probabilities we arrive at, respectively:

Number of Parts with Same Materials | Percentage Probabilities |

1 Part 2 Parts 3 Parts 4 Parts 5 Parts 6 Parts | 0.0769042970 0.6921386719 0.2072143555 0.0224304199 0.0012817383 0.0000305175 |

In Season 2 we grouped the cases for 1 of the same and 2 of the same (meaning, no materials repeated and 2 materials repeated) as Common apes. In subsequent seasons we may create a new class to separate these two.

Last modified 1yr ago