Announcement

Collapse
No announcement yet.

Probability with an Abacus: Understanding SGLs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Probability with an Abacus: Understanding SGLs

    I originally posted this article under my ladder name "Heroic" for the MP Ladder community. However since much of it applies to SP as well, I am posting it here too. For those interested, continuing MP discussion can be viewed at the following link http://civ3players.proboards2.com/in...325753&start=0

    This article provides a brief refresher course in probabilities that will help to understand the appearance of SGLs a little better. It will also illustrate noteworthy differences between the chances of an SGL for a scientific civ and a normal civ as the game progresses.

    The Basics:
    Most everyone knows that Scientific civs get a 5% chance of an SGL whereas other civs only get 3%. That means you have a 3% or 5% chance of him appearing whenever you research a technology that nobody else has. That is important to remember since it means that techs you find in huts will not help you get a SGL. In fact, huts can actually hurt your chances of getting an SGL if they give you a tech that nobody else has - because that leaves you with one less tech that gives a chance at a SGL. The same is true if your enemy finds a tech in a hut that nobody else has....especially if you happen to be researching it. In short, unique hut technology (no matter who finds it) is the enemy of SGL generation. So why do we all care about SGL's so much? Because the 1-turn wonder can be devastating at giving a crucial wonder at a crucial time...thus wasting an ememies shields spent in building, and also providing a unique advantage. An early (pyramids/ Zeus) and sometimes a late wonder (Lighthouse GreatWall) can often make a big difference.

    The Myth:
    So, how do we understand that 3 or 5 percent? Sadly, many of us forget and try and use a poor rule of thumb like just adding it to figure out our chances of an SGL. This logic goes something like this. "Hmm if i get 3 unique techs i'll have a 15% chance of a leader...and heck if i can get close to 20...I'll have him for sure". Unfortunately this is not quite true, but fortunately there is a way to know what your chances are!

    The Truth:
    Lets consider a simple example like "What is the probability of a SCI civ getting at least 1 SGL after 2 researches?"
    We'll say that "L" = "we get a leader" and "N" = "we don't". In 2 turns, there are four possilbe outcomes:

    Case 1 LL
    Case 2 LN
    Case 3 NL
    Case 4 NN

    We now substitute .95 i.e. 95% wherever we see N and .05 i.e. 5% wherever we see L. Then we multiply each line to see the probability of that case. As a check, you will note that the last column adds to 1 ..... meaning it accounts for 100% of the possibilities.

    Case 1 .05 X .05 = .0025
    Case 2 .05 X .95 = .0475
    Case 3 .95 X .05 = .0475
    Case 4 .95 X .95 = .9025

    Case 1 tells us our chances of getting 2 SLGs in 2 turns is very small. 1/4 of a percent in fact! Case 2 tells us our chances of getting a SGL and then no SGL are 4.75% The chances are the same for getting no SGL and then getting an SGL. And we have a 90.25% chance of getting no SGL either time.

    So back to our question.....what is the probability of getting at least 1 SGL in 2 unique techs? Well Lines 1-3 all give at least 1 SGL....so we add them, which gives us a 9.75% chance of getting an SGL. Note, 9.75% not 10% as we had supposed before.....this difference is even bigger if we had been using 3% instead of 5%. The difference will also get much bigger the more advances we consider.

    Now, if you're like me, you dont wanna have to plunk out all the math unless you have Excel or something. Fortunately there is an easier way to figure out the probabilities. Look at line 4 ( the probability of no SGL in 2 turns). Our 9.75% = 100% - 90.25%. Cool so now we have a short cut at finding the probability of at least one SGL.

    The process:
    Step 1. F = 1 - SGL% which will give us either .95 or .97
    Step 2. T = number of techs we research first
    Step 3. N = F^T ( so, if t were 2 then N could be .95 squared)
    Step 4. Chance of at least 1 SGL = 1 - N
    Luck favors the skilled because it knows it will not be wasted.

  • #2
    The Scientific Table:
    Yes. I know nobody wants to do these by hand all the time. So here is a table for the probability of at least 1 SGL for a scientific civ. I have taken it out to only 50 because honestly how many of us research that many techs anyway?

    #Techs ----- Prob (no SGL) ----- Prob (1+ SGL)
    1 ----- .950000000000000 ----- 5.0%
    2 ----- .902500000000000 ----- 9.8%
    3 ----- .857375000000000 ----- 14.3%
    4 ----- .814506250000000 ----- 18.5%
    5 ----- .773780937500000 ----- 22.6%
    6 ----- .735091890625000 ----- 26.5%
    7 ----- .698337296093750 ----- 30.2%
    8 ----- .663420431289062 ----- 33.7%
    9 ----- .630249409724609 ----- 37.0%
    10 ----- .598736939238379 ----- 40.1%
    11 ----- .568800092276460 ----- 43.1%
    12 ----- .540360087662637 ----- 46.0%
    13 ----- .513342083279505 ----- 48.7%
    14 ----- .487674979115530 ----- 51.2%
    15 ----- .463291230159753 ----- 53.7%
    16 ----- .440126668651766 ----- 56.0%
    17 ----- .418120335219177 ----- 58.2%
    18 ----- .397214318458218 ----- 60.3%
    19 ----- .377353602535308 ----- 62.3%
    20 ----- .358485922408542 ----- 64.2%
    21 ----- .340561626288115 ----- 65.9%
    22 ----- .323533544973709 ----- 67.6%
    23 ----- .307356867725024 ----- 69.3%
    24 ----- .291989024338773 ----- 70.8%
    25 ----- .277389573121834 ----- 72.3%
    26 ----- .263520094465742 ----- 73.6%
    27 ----- .250344089742455 ----- 75.0%
    28 ----- .237826885255332 ----- 76.2%
    29 ----- .225935540992566 ----- 77.4%
    30 ----- .214638763942937 ----- 78.5%
    31 ----- .203906825745791 ----- 79.6%
    32 ----- .193711484458501 ----- 80.6%
    33 ----- .184025910235576 ----- 81.6%
    34 ----- .174824614723797 ----- 82.5%
    35 ----- .166083383987607 ----- 83.4%
    36 ----- .157779214788227 ----- 84.2%
    37 ----- .149890254048816 ----- 85.0%
    38 ----- .142395741346375 ----- 85.8%
    39 ----- .135275954279056 ----- 86.5%
    40 ----- .128512156565103 ----- 87.1%
    41 ----- .122086548736848 ----- 87.8%
    42 ----- .115982221300006 ----- 88.4%
    43 ----- .110183110235005 ----- 89.0%
    44 ----- .104673954723255 ----- 89.5%
    45 ----- .099440256987092 ----- 90.1%
    46 ----- .094468244137738 ----- 90.6%
    47 ----- .089744831930851 ----- 91.0%
    48 ----- .085257590334308 ----- 91.5%
    49 ----- .080994710817593 ----- 91.9%
    50 ----- .076944975276713 ----- 92.3%
    Luck favors the skilled because it knows it will not be wasted.

    Comment


    • #3
      The Primitive Table
      This table is similar to the first except that it is the probability of 1+ SGL for non-Scientific civs.

      #Techs ----- Prob(no SGL) ----- Prob(1+ SGL)
      1 ----- 0.970000000000000 ----- 3.0%
      2 ----- 0.940900000000000 ----- 5.9%
      3 ----- 0.912673000000000 ----- 8.7%
      4 ----- 0.885292810000000 ----- 11.5%
      5 ----- 0.858734025700000 ----- 14.1%
      6 ----- 0.832972004929000 ----- 16.7%
      7 ----- 0.807982844781130 ----- 19.2%
      8 ----- 0.783743359437696 ----- 21.6%
      9 ----- 0.760231058654565 ----- 24.0%
      10 ----- 0.737424126894928 ----- 26.3%
      11 ----- 0.715301403088080 ----- 28.5%
      12 ----- 0.693842360995438 ----- 30.6%
      13 ----- 0.673027090165575 ----- 32.7%
      14 ----- 0.652836277460607 ----- 34.7%
      15 ----- 0.633251189136789 ----- 36.7%
      16 ----- 0.614253653462686 ----- 38.6%
      17 ----- 0.595826043858805 ----- 40.4%
      18 ----- 0.577951262543041 ----- 42.2%
      19 ----- 0.560612724666750 ----- 43.9%
      20 ----- 0.543794342926747 ----- 45.6%
      21 ----- 0.527480512638945 ----- 47.3%
      22 ----- 0.511656097259776 ----- 48.8%
      23 ----- 0.496306414341983 ----- 50.4%
      24 ----- 0.481417221911724 ----- 51.9%
      25 ----- 0.466974705254372 ----- 53.3%
      26 ----- 0.452965464096741 ----- 54.7%
      27 ----- 0.439376500173838 ----- 56.1%
      28 ----- 0.426195205168623 ----- 57.4%
      29 ----- 0.413409349013565 ----- 58.7%
      30 ----- 0.401007068543158 ----- 59.9%
      31 ----- 0.388976856486863 ----- 61.1%
      32 ----- 0.377307550792257 ----- 62.3%
      33 ----- 0.365988324268489 ----- 63.4%
      34 ----- 0.355008674540435 ----- 64.5%
      35 ----- 0.344358414304222 ----- 65.6%
      36 ----- 0.334027661875095 ----- 66.6%
      37 ----- 0.324006832018842 ----- 67.6%
      38 ----- 0.314286627058277 ----- 68.6%
      39 ----- 0.304858028246529 ----- 69.5%
      40 ----- 0.295712287399133 ----- 70.4%
      41 ----- 0.286840918777159 ----- 71.3%
      42 ----- 0.278235691213844 ----- 72.2%
      43 ----- 0.269888620477429 ----- 73.0%
      44 ----- 0.261791961863106 ----- 73.8%
      45 ----- 0.253938203007213 ----- 74.6%
      46 ----- 0.246320056916996 ----- 75.4%
      47 ----- 0.238930455209486 ----- 76.1%
      48 ----- 0.231762541553202 ----- 76.8%
      49 ----- 0.224809665306606 ----- 77.5%
      50 ----- 0.218065375347407 ----- 78.2%
      Luck favors the skilled because it knows it will not be wasted.

      Comment


      • #4
        Significance of Findings
        The difference between a sci civ and a non sci civ gets larger the more unique techs there are to research. After just 10 unique researched here is the comparison:

        SCIENTIFIC ----- 40.1%
        PRIMITIVE ----- 26.3%

        This is now a 14.2% difference between a SCI vs PRIM civ. Lets translate this into real meaning. If you are the first to research 10 techs and you are primitive, you have about a 1 in 4 chance of an SGL. IF you are scientific though, your chances are much better than 1 in 4. Your chance are even much better than 1 in 3. Your chance are close to 2 in 5!! In a longer game, the scientific civ's odds get better and better than the primitive civ's odds. The difference increases, but it increases by less and less.

        Real World Application
        So.......how realistic is it to get 10 unique techs? The key is getting those unique techs. The civ that seems best qualified for the job would probably start with alphabet but also be scientific. That would mean.....GREECE. A likely path would likely be as follows:

        1 ----- Writing
        2 ----- Philo
        3 ----- MapMaking (free from Philo assuming you traded for pottery)
        4 ----- Literature
        5 ----- Code of Laws
        6 ----- Republic
        7 ----- Free tech for advancing ages
        8 ----- other
        9 ----- other
        10 ----- other

        Doable in a decent length game - certainly in a long game. Even if you only got 7 techs, a sci civ has about a 1 in 3 while a prim civ has about a 1 in 5 chance.

        Final Notes
        SCI makes a reasonable difference even in games that stay ancient ( providing a 1 in 3 chance which is better than the normal 1 in 5 ). However, SCI will show itself better the longer the game is. Do remember though, that these odds do not guarantee a SGL. If you follow the tables to the bottom you will notice that the odds get better by a smaller and smaller amount but never quite reach 100%. Alternatively, you could luck out with more than 1 SGL...but those would be very very small odds for both SCI and PRIM....enough that it is not likely to be a noticeable difference. Also, bear in mind that timing can be crucial.....if that SGL comes on your last turn, your 1 in 3 may prove itself true.......but how much good is a last turn wonder? Well.....now that we have polished our abacus........have fun and go discover wonderous new technologies or see about perfecting the invention of the Chasqui Tutu.

        -Heroic
        Luck favors the skilled because it knows it will not be wasted.

        Comment


        • #5
          How are the odds affected for SCI or PRIM if you already have an SGL? Or more than one SGL?!

          I ask because I always wonder if it's worth spending an SGL (or MGL come to think of it) because having one sitting around for a later important wonder is significantly affecting my chances of getting another in the meantime.

          Comment


          • #6
            Wow, thanks Heroic/Sperricles!
            Very informative, full of detail, yet very accessible.

            Well done!
            "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

            Comment


            • #7
              Bottom line it is always a long shot to get an SGL, how well I know.

              Comment


              • #8
                I'm not very fond of the SGL. On Emperor getting one means I win the game. On demigod I don't get any. Oh, actually I've gotten two, and both have won me the game.

                In SP they pretty much ensure victory, and in MP this must be even more frustrating.

                But the post was very informative!

                Comment


                • #9
                  I much prefer the SGL/MGL model over the old GL model, primarily because the old model meant that warmongers were better builders than builders. This way, I think, if you focus on war, you get mostly war-like benefits(or at least not overpowering builder-like benefits) and if you focus on building, you have a slim chance at the old Ultimate Power bonus. It feels much more balanced IMO, and since I'm never going to bother to calculate the odds myself, I sure am glad someone went to the trouble. Thanks again!
                  "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

                  Comment


                  • #10
                    My main comments are that:

                    1. Most likely following that path, Greece will still need to reserach Construction and maybe Currency as well to get to the next age.

                    2. Chance itself has no memory, but the random number generator (RNG) does. Every random event uses this same pool though. (Combat!, "random element portion" of AI decisions!, goody hut, barb camp generation on tile, barb unit generated from barb camp, disease, polution, global warming, SGL, active volcanons, and plague.)

                    There are several reports of receving a second SGL while in possesion of one.
                    1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
                    Templar Science Minister
                    AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

                    Comment


                    • #11
                      Originally posted by joncnunn
                      There are several reports of receving a second SGL while in possesion of one.
                      I've read those as well, but someone(alexman, I think) did a test and while you can get multiple SGLs at one time, you cannot generate an MGL if you already have either kind of GL. At least, that's how I remember it, I could be wrong.


                      And yes, the p-RNG does sometimes throw out results that can seem "streaky" and make us think it's broken.
                      "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

                      Comment


                      • #12
                        The simply stated line alexman used was perfect:
                        if you have a leader, you cannot get an MGL.

                        So you are correct Ducki, an SGL with prevent you getting an MGL, so will having a MGL already.

                        Comment


                        • #13
                          Originally posted by ducki
                          And yes, the p-RNG does sometimes throw out results that can seem "streaky" and make us think it's broken.
                          Yes, truly random numbers include streaks and slumps. When the American Contract Bridge League switched from "human-dealt" hands to computer-generated hands, there was a great outcry about many more "wild" distributions (like a 6-5-2-0 hand, meaning 6 cards of one suit, 5 of another, 2 of a third, and a void in the fourth). The distributions were quite different than in the "dealt" cards because the distributions were truly random. Humans don't shuffle that well. At the end of a hand you have 13 groups of 4 cards each, mostly in suit. Now imperfectly ripple-shuffle those cards. You'll tend to get flatter distributions tending toward the 4-3-3-3 hand and close variants.

                          Now that I've bored you with that, remember that casinos make a lot of money on probability, while gamblers lose a lot on chance, especially on falacies like "the maturity of the chance" (i.e. if you haven't rolled a seven recently, you become more likely to roll a seven on the next throw).

                          And all that said, so far I've gotten precisely *one* SGL, and it wasn't in AU501 as I thought; my SGL was Confucius.
                          "...your Caravel has killed a Spanish Man-o-War."

                          Comment


                          • #14
                            Now that I've bored you with that, remember that casinos make a lot of money on probability, while gamblers lose a lot on chance, especially on falacies like "the maturity of the chance" (i.e. if you haven't rolled a seven recently, you become more likely to roll a seven on the next throw).
                            Actually, that was rather interesting and does a nice job explaining why the knowledge that a computer is doing the randomizing is enough to cause people to "notice" faults and lack of randomness in what are actually random things.

                            Additionally, the Maturity of the Chance goes a long way to explaining some folks' consternation at their inability to generate MGLs or the fact that they discovered all techs in two ages and "should" have gotten an SGL, as well as the frustration experienced when a single spearman holds off the human player's "horde" of 4 or 5 horsemen, and yet noone seems amazed that a human's spearman can do the same.

                            It's you against the House and your number is due and if you don't win, the deck must be stacked, eh?

                            Interesting stuff, especially the human side of it, thanks HtL.
                            "Just once, do me a favor, don't play Gray, don't even play Dark... I want to see Center-of-a-Black-Hole Side!!! " - Theseus nee rpodos

                            Comment


                            • #15
                              Yup, true randomness clumps. There's a good article by Stephen Jay Gould in which he talks about going in a cave and seeing glow worms on the roof - thousands of them, each one a little point of light. They looked like the stars - except they didn't, because they were neatly spaced out - the glow worms liked to sit at the same distance from each other. If you look at the night sky, by contrast, you will see that stars clump in what look like lines or triangles or other shapes. You often get several bright stars next to each other, (eg the Belt of Orion) and great gulfs with few visible stars at all (eg the Square of Pegasus). That's because that is a truly random array, and our brains have a tendency to pick out what appear to be patterns within it, which we call constellations.

                              I used to work as a croupier in a casino. One of the first things they told us was that the odds in casino games are tilted towards the house, but only very slightly (otherwise no-one would play). So how do casinos make money? Simple - when someone walks into a casino, a hole opens up in the back of their head, and all their brains trickle out of the back. Hence daft things like the "Gamber's Fallacy" that Hermann mentions - the belief that the longer something doesn't come up, the more likely it is to do so. Or the fact that people invariably think that when they win, that is the norm, but when they lose, that's just a one-off - even if they are actually losing more often than they are winning. That is why people "throw good money after bad" - they lose £20 and decide to play until they have won it back; then they find that they have lost £30, so they play until they have won that back... and so on. In short: people are pretty thick, really.

                              Comment

                              Working...
                              X