• We are looking for you!
    Always wanted to join our Supporting Team? We are looking for enthusiastic moderators!
    Take a look at our recruitement page for more information and how you can apply:
    Apply

Blueprint complete set probabilities

  • Thread starter DeletedUser31521
  • Start date

DeletedUser31521

(Don't think this is truly off topic, but couldn't quite justify it as a guide. Please let me know if there is a more appropriate place for it.)

It took me a really long time to get the complete set of BPs for LoA. When I got to 45 total BPs with still one missing, I started to think that I was getting into rarified air of probability of still not having a complete set. This was by some back of the napkin math, basically guessing how likely it was to get to 8 of 9 and then saying each next BP has an 8 of 9 chance of not being the one. Something, like...

Let's assume the probability is very high you have at least 8 of 9 spots filled at 20 total BPs and n is the total number of BPs. Then you can figure the percentage of having a complete set at n greater than 20 to be at least:
Code:
1 - [unknown very high percentage for 20 BPs equaling at least 8 sports * (8/9)^(n-20)]

equals about:
Code:
1 - [1 * (8/9)^(n-20)]  --or--  1 - (8/9)^(n-20)

I just replace the unknown very high percentage with the highest percentage, 1. I know this isn't going to be perfect (especially at the lower value of n), but I am just looking for a rough estimate here. And I figured the likelihood of already completing the set by the time you hit 20 total BPs to offset the likelihood that my equation is bad because of rounding that probably of having at least 8 of 9 to 1.

Code:
21  -  11.11%      :::      61  -  99.20%
22  -  20.99%      :::      62  -  99.29%
23  -  29.77%      :::      63  -  99.37%
24  -  37.57%      :::      64  -  99.44%
25  -  44.51%      :::      65  -  99.50%
26  -  50.67%      :::      66  -  99.56%
27  -  56.15%      :::      67  -  99.61%
28  -  61.03%      :::      68  -  99.65%
29  -  65.36%      :::      69  -  99.69%
30  -  69.21%      :::      70  -  99.72%
31  -  72.63%      :::      71  -  99.75%
32  -  75.67%      :::      72  -  99.78%
33  -  78.37%      :::      73  -  99.81%
34  -  80.78%      :::      74  -  99.83%
35  -  82.91%      :::      75  -  99.85%
36  -  84.81%      :::      76  -  99.86%
37  -  86.50%      :::      77  -  99.88%
38  -  88.00%      :::      78  -  99.89%
39  -  89.33%      :::      79  -  99.90%
40  -  90.52%      :::      80  -  99.91%
41  -  91.57%      :::      81  -  99.92%
42  -  92.51%      :::      82  -  99.93%
43  -  93.34%      :::      83  -  99.94%
44  -  94.08%      :::      84  -  99.95%
45  -  94.74%      :::      85  -  99.95%
46  -  95.32%      :::      86  -  99.96%
47  -  95.84%      :::      87  -  99.96%
48  -  96.30%      :::      88  -  99.97%
49  -  96.71%      :::      89  -  99.97%
50  -  97.08%      :::      90  -  99.97%
51  -  97.40%      :::      91  -  99.98%
52  -  97.69%      :::      92  -  99.98%
53  -  97.95%      :::      93  -  99.98%
54  -  98.18%      :::      94  -  99.98%
55  -  98.38%      :::      95  -  99.99%
56  -  98.56%      :::      96  -  99.99%
57  -  98.72%      :::      97  -  99.99%
58  -  98.86%      :::      98  -  99.99%
59  -  98.99%      :::      99  -  99.99%
60  -  99.10%      :::      100  -  99.99%


However
, I did something wrong on my initial calculation or used a starting point for very high 8 of 9 probability other than 20 or something and my results said it was way higher than 95% at 45 BPs. I also knew this was super inaccurate at just above 20 and just didn't work below 20. So... I built a program that could more accurately tell me the probabilities of having a complete set at each total number of BPs. (Because that math is actually pretty hard and I don't know how to do it.)

Code to follow, but basically I just ran a random number generator over and over to give me a number 1 through 9 (0 to 8 in computer speak). As soon as I had hit all the numbers I marked how many total attempts it took to get there (BPs) and then called it an iteration.

Code:
      ** 10,000,000 Iterations **           :::         ** 100,000,000 Iterations **
 # BPs       Frequency        % Complete    :::    # BPs       Frequency        % Complete
 =====       =========        ==========    :::    =====       =========        ==========
     9   =>       9343            .0934%    :::        9   =>      93796            .0938%
    10   =>      37704            .4705%    :::       10   =>     375316            .4691%
    11   =>      86870           1.3392%    :::       11   =>     867905           1.3370%
    12   =>     153315           2.8723%    :::       12   =>    1524115           2.8611%
    13   =>     227300           5.1453%    :::       13   =>    2271397           5.1325%
    14   =>     301216           8.1575%    :::       14   =>    3012284           8.1448%
    15   =>     367550          11.8330%    :::       15   =>    3685916          11.8307%
    16   =>     424344          16.0764%    :::       16   =>    4240844          16.0716%
    17   =>     466544          20.7419%    :::       17   =>    4660960          20.7325%
    18   =>     493829          25.6802%    :::       18   =>    4930878          25.6634%
    19   =>     509379          30.7739%    :::       19   =>    5078501          30.7419%
    20   =>     511084          35.8848%    :::       20   =>    5102089          35.8440%
    21   =>     502168          40.9065%    :::       21   =>    5036126          40.8801%
    22   =>     488377          45.7902%    :::       22   =>    4882002          45.7621%
    23   =>     467794          50.4682%    :::       23   =>    4679531          50.4417%
    24   =>     443639          54.9046%    :::       24   =>    4432260          54.8739%
    25   =>     415808          59.0626%    :::       25   =>    4163312          59.0372%
    26   =>     387512          62.9378%    :::       26   =>    3880981          62.9182%
    27   =>     357311          66.5109%    :::       27   =>    3587469          66.5057%
    28   =>     330815          69.8190%    :::       28   =>    3302584          69.8083%
    29   =>     302083          72.8399%    :::       29   =>    3023810          72.8321%
    30   =>     275686          75.5967%    :::       30   =>    2762274          75.5944%
    31   =>     250923          78.1059%    :::       31   =>    2507865          78.1022%
    32   =>     226990          80.3758%    :::       32   =>    2274649          80.3769%
    33   =>     205785          82.4337%    :::       33   =>    2058295          82.4352%
    34   =>     184829          84.2820%    :::       34   =>    1848730          84.2839%
    35   =>     166800          85.9500%    :::       35   =>    1670094          85.9540%
    36   =>     149420          87.4442%    :::       36   =>    1499929          87.4539%
    37   =>     134454          88.7887%    :::       37   =>    1349558          88.8035%
    38   =>     121239          90.0011%    :::       38   =>    1208533          90.0120%
    39   =>     107896          91.0801%    :::       39   =>    1082951          91.0950%
    40   =>      96662          92.0467%    :::       40   =>     967299          92.0623%
    41   =>      86843          92.9151%    :::       41   =>     863231          92.9255%
    42   =>      77821          93.6933%    :::       42   =>     773471          93.6990%
    43   =>      68747          94.3808%    :::       43   =>     688014          94.3870%
    44   =>      62076          95.0016%    :::       44   =>     614293          95.0013%
    45   =>      54811          95.5497%    :::       45   =>     550087          95.5513%
    46   =>      49076          96.0404%    :::       46   =>     489149          96.0405%
    47   =>      43481          96.4752%    :::       47   =>     436434          96.4769%
    48   =>      38885          96.8641%    :::       48   =>     388601          96.8655%
    49   =>      34512          97.2092%    :::       49   =>     346636          97.2122%
    50   =>      30918          97.5184%    :::       50   =>     307966          97.5201%
    51   =>      27352          97.7919%    :::       51   =>     274311          97.7944%
    52   =>      24179          98.0337%    :::       52   =>     243899          98.0383%
    53   =>      22079          98.2545%    :::       53   =>     217362          98.2557%
    54   =>      19320          98.4477%    :::       54   =>     192804          98.4485%
    55   =>      17348          98.6212%    :::       55   =>     173644          98.6222%
    56   =>      15286          98.7740%    :::       56   =>     152395          98.7746%
    57   =>      13529          98.9093%    :::       57   =>     136051          98.9106%
    58   =>      12289          99.0322%    :::       58   =>     120163          99.0308%
    59   =>      10687          99.1391%    :::       59   =>     107023          99.1378%
    60   =>       9461          99.2337%    :::       60   =>      95967          99.2338%
    61   =>       8559          99.3193%    :::       61   =>      84811          99.3186%
    62   =>       7547          99.3948%    :::       62   =>      75247          99.3938%
    63   =>       6829          99.4630%    :::       63   =>      66910          99.4607%
    64   =>       5950          99.5225%    :::       64   =>      59614          99.5203%
    65   =>       5217          99.5747%    :::       65   =>      52820          99.5732%
    66   =>       4676          99.6215%    :::       66   =>      47346          99.6205%
    67   =>       4188          99.6634%    :::       67   =>      42137          99.6626%
    68   =>       3942          99.7028%    :::       68   =>      39249          99.7019%
    69   =>       3229          99.7351%    :::       69   =>      33071          99.7350%
    70   =>       2892          99.7640%    :::       70   =>      29367          99.7643%
    71   =>       2709          99.7911%    :::       71   =>      26191          99.7905%
    72   =>       2289          99.8140%    :::       72   =>      23164          99.8137%
    73   =>       2005          99.8340%    :::       73   =>      20669          99.8344%
    74   =>       1739          99.8514%    :::       74   =>      18269          99.8526%
    75   =>       1662          99.8680%    :::       75   =>      16363          99.8690%
    76   =>       1471          99.8827%    :::       76   =>      14584          99.8836%
    77   =>       1303          99.8958%    :::       77   =>      12847          99.8964%
    78   =>       1119          99.9070%    :::       78   =>      11451          99.9079%
    79   =>       1017          99.9171%    :::       79   =>      10173          99.9180%
    80   =>        910          99.9262%    :::       80   =>       8974          99.9270%
    81   =>        790          99.9341%    :::       81   =>       8031          99.9350%
    82   =>        747          99.9416%    :::       82   =>       7155          99.9422%
    83   =>        628          99.9479%    :::       83   =>       6324          99.9485%
    84   =>        569          99.9536%    :::       84   =>       5814          99.9543%
    85   =>        514          99.9587%    :::       85   =>       5108          99.9594%
    86   =>        428          99.9630%    :::       86   =>       4495          99.9639%
    87   =>        411          99.9671%    :::       87   =>       4098          99.9680%
    88   =>        372          99.9708%    :::       88   =>       3476          99.9715%
    89   =>        314          99.9740%    :::       89   =>       3041          99.9746%
    90   =>        285          99.9768%    :::       90   =>       2777          99.9773%
    91   =>        260          99.9794%    :::       91   =>       2494          99.9798%
    92   =>        224          99.9816%    :::       92   =>       2227          99.9821%
    93   =>        180          99.9834%    :::       93   =>       1914          99.9840%
    94   =>        184          99.9853%    :::       94   =>       1726          99.9857%
    95   =>        157          99.9869%    :::       95   =>       1566          99.9873%
    96   =>        132          99.9882%    :::       96   =>       1438          99.9887%
    97   =>        154          99.9897%    :::       97   =>       1260          99.9900%
    98   =>        117          99.9909%    :::       98   =>       1100          99.9911%
    99   =>        104          99.9919%    :::       99   =>        964          99.9920%
   100   =>         76          99.9927%    :::      100   =>        858          99.9929%
   101   =>         95          99.9936%    :::      101   =>        787          99.9937%
   102   =>         83          99.9945%    :::      102   =>        670          99.9943%
   103   =>         70          99.9952%    :::      103   =>        618          99.9950%
   104   =>         67          99.9958%    :::      104   =>        558          99.9955%
   105   =>         42          99.9963%    :::      105   =>        505          99.9960%
   106   =>         43          99.9967%    :::      106   =>        442          99.9965%
   107   =>         33          99.9970%    :::      107   =>        385          99.9968%
   108   =>         37          99.9974%    :::      108   =>        355          99.9972%
   109   =>         25          99.9976%    :::      109   =>        308          99.9975%
   110   =>         26          99.9979%    :::      110   =>        283          99.9978%
   111   =>         22          99.9981%    :::      111   =>        242          99.9980%
   112   =>         23          99.9983%    :::      112   =>        216          99.9982%
   113   =>         23          99.9986%    :::      113   =>        170          99.9984%
   114   =>         15          99.9987%    :::      114   =>        162          99.9986%
   115   =>         17          99.9989%    :::      115   =>        167          99.9987%
   116   =>         11          99.9990%    :::      116   =>        139          99.9989%
   117   =>          6          99.9991%    :::      117   =>        125          99.9990%
   118   =>          9          99.9992%    :::      118   =>        100          99.9991%
   119   =>          7          99.9992%    :::      119   =>        101          99.9992%
   120   =>          8          99.9993%    :::      120   =>         80          99.9993%
   121   =>          8          99.9994%    :::      121   =>         80          99.9994%
   122   =>          6          99.9994%    :::      122   =>         71          99.9994%
   123   =>          4          99.9995%    :::      123   =>         76          99.9995%
   124   =>          7          99.9996%    :::      124   =>         70          99.9996%
   125   =>          2          99.9996%    :::      125   =>         44          99.9996%
   126   =>          2          99.9996%    :::      126   =>         42          99.9997%
   127   =>          6          99.9997%    :::      127   =>         32          99.9997%
   128   =>          4          99.9997%    :::      128   =>         34          99.9997%
   129   =>          3          99.9997%    :::      129   =>         35          99.9998%
   130   =>          4          99.9998%    :::      130   =>         26          99.9998%
   131   =>          4          99.9998%    :::      131   =>         19          99.9998%
   132   =>          3          99.9998%    :::      132   =>         20          99.9998%
   133   =>          2          99.9999%    :::      133   =>         21          99.9999%
   135   =>          3          99.9999%    :::      134   =>         10          99.9999%
   136   =>          1          99.9999%    :::      135   =>         19          99.9999%
   137   =>          2          99.9999%    :::      136   =>          9          99.9999%
   138   =>          1          99.9999%    :::      137   =>         10          99.9999%
   141   =>          2          99.9999%    :::      138   =>         12          99.9999%
   144   =>          1         100.0000%    :::      139   =>          9          99.9999%
   148   =>          2         100.0000%    :::      140   =>          4          99.9999%
   150   =>          1         100.0000%    :::      141   =>         13          99.9999%
   158   =>          1         100.0000%    :::      142   =>         11         100.0000%
   162   =>          1         100.0000%    :::      143   =>          6         100.0000%
                                            :::      144   =>          4         100.0000%
                                            :::      145   =>          2         100.0000%
                                            :::      146   =>          3         100.0000%
                                            :::      147   =>          3         100.0000%
                                            :::      148   =>          3         100.0000%
                                            :::      149   =>          3         100.0000%
                                            :::      150   =>          1         100.0000%
                                            :::      151   =>          2         100.0000%
                                            :::      152   =>          1         100.0000%
                                            :::      153   =>          1         100.0000%
                                            :::      154   =>          2         100.0000%
                                            :::      155   =>          3         100.0000%
                                            :::      156   =>          2         100.0000%
                                            :::      157   =>          2         100.0000%
                                            :::      158   =>          3         100.0000%
                                            :::      168   =>          1         100.0000%
                                            :::      179   =>          1         100.0000%

I tested this with the only one number I knew how to get exact with math... the probability of getting a complete set in 9 total BPs is (for reasons I won't get into):
Code:
9! / (9^9) = .09366567%

which I was pleased to see fit with my numbers well. As you can see the numbers generally match pretty well with the earlier back of the napkin approximation math, especially when you get into the high 40's and above of total BPs. I hope this helps someone with deciding whether or not to break down and buy that final BP with diamonds. I was wrong in assuming 45 total BPs was rarified air, while 5% of the time not having it completed is pretty unlikely, I wouldn't call it "rarefied air" yet. BTW, I finally got my final BP for LoA at 58, right when I was getting to rarified air territory in my opinion. Stupid bottom right! :)

Anyway, I'll place my code in the next post. Sorry for the terrible formatting. I hope the mathematically and CS and just generally nerdy inclined enjoy this some. If the actual math exists and anyone can do it, I would be interested to see it!
 

DeletedUser31521

Here is the code if anyone would like to check it out themselves or extend it. This is written in C#, but should be fairly easy to rewrite in a number of languages (not too many advanced concepts).

Code:
            var numberOfPrintsToFrequency = new Dictionary<int, long>();
            //Just fill out the 99.99% case, so they are in order.
            for(var i = 9; i < 200; i++) numberOfPrintsToFrequency[i] = 0;

            //If I use a new random every iteration, I was getting repeats... I think maybe because it was iterating so fast that I was beginning
            //with the same seed when using the default seed, which is probably keyed off the clock somehow
            var random = new Random();
            const long iterations = 10000000;
            for(long i = 1; i <= iterations; i++) {
                //Using the first 9 bits of an integer to represent the 9 squares of the a building's BPs.
                var buildingPrintsMatrix = 0;
                var numberOfPrints = 0;
                while(buildingPrintsMatrix != 0b111111111) {
                    numberOfPrints++;
                    var next = random.Next(0, 9);
                    buildingPrintsMatrix |= 1 << next;
                }
                if(!numberOfPrintsToFrequency.ContainsKey(numberOfPrints)) numberOfPrintsToFrequency[numberOfPrints] = 0;
                numberOfPrintsToFrequency[numberOfPrints]++;
            }

            long totalSoFar = 0;
            var stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("{0,6}      {1,10} {2,17}\n", "# BPs", "Frequency", "% Complete");
            stringBuilder.AppendFormat("{0,6}      {1,10} {2,17}\n", "=====", "=========", "==========");
            foreach(var item in numberOfPrintsToFrequency) {
                if(item.Key < 100 || item.Value != 0) {
                    totalSoFar += item.Value;
                    stringBuilder.AppendFormat("{0,6}   => {1,10} {2,16:.0000}%\n", item.Key, item.Value, (double)totalSoFar/iterations*100);
                }
            }

            Debug.Print(stringBuilder.ToString());

I also just noticed that Laozi posted a very similar thread a year ago, https://forum.us.forgeofempires.com/index.php?posts/118506/ . :(
This does have a slightly different take, so I hope it provides some more worth and I had already written it all out! :)
 

DeletedUser31882

I don't have the time to brush up on my math/coding today, so I'm currently useless in aiding on that side of things...

BUT~

I do like the data points showing the percent chance of having all BPs after X BPs obtained. I focused on the 20 BPs in particular, since other people have questioned if BP chances were weighted or not and that strikes me as place where many players would question their 'luck'.

With the RNG generator you have, 64% of players not having a complete set would explain why a good amount of people could bring anecdotal evidence of themselves and guild mates/friends as 'evidence' that Inno is weighting the probabilities to spur diamond spending.

Thank you for your effort & the link to Laozi's post!
 
Top