GP Odds

Sarisin

Deity
Joined
May 15, 2006
Messages
2,796
Location
NJ
I think one of the shortcomings of FFH2 (and likely BtS too) is the odds that are given in the game.

Much has already been written about the Attacking and Defending odds. Also, I have been claiming for awhile that the posted withdrawal rate odds for mounted units are very understated when compared with the actual odds.

One more is the odds of getting a particular type of Great Person. I don't have any hard statistics, but it seems more often than not I get a GP that is on the low end of the odds. For example:

Great Prophet 58%
Great Bard 11%
Great Commander 6%
Great Sage 8%
Great Engineer 7%
Great Merchant 10%

You would think you had a good shot at getting that Great Prophet that will allow you to build Altar VI. But wait, here comes a Great Sage instead!:mad:

Even if you specialize your cities, like I always try to do, it seems like a few GPPs will slip in somehow and give small odds on GPs other than the one you are going for in that particular city. And, then, you get the unpleasant surprise.

Well, I have found a way that works just about all of the time that can ensure you get the GP you are supposed to in your city:

When you know your city is ready to pop a GP the next turn, do a quick save. If you get that Great Sage instead of the Great Prophet, reload and try again.

I have found that in almost every case, I then got the GP with the highest odds of receiving rather than one of the low balls.

OK, it does take that wonderful surprise factor out of the game, but cheating? I don't think so. I mean if you go to the trouble of planning and specializing your cities with regards to GPPs, it is reasonable to get what you planned for, right? No use in being thwarted by those wacky and unreliable odds again. ;)

Try it next time you are going for a particularly Great Person and see if it doesn't work for you.
 
Look, you need a bit of a intro to probability theory....

Just because there are HIGH odds of something happening, DOESN'T mean that something else WON'T.

Just because it's probable to get a Great Prophet in the example above doesn't mean that you will. You'll see that the chance of a prophet is only 58%, a bit more than even 50/50. That means that there is a 42% chance that something ELSE will happen.

Plus, the human mind is tricksy. Yes, tricksy. You'll tend to forget all the times that the likely thing occured in favor of remembering the ONE TIME it didn't. Try it - you'll win a 99% battle 99 out of a hundred times, but that hundredth time... boy, will you be pissed.
And you'll complain about it forever.

That's why I think that people should just suck it up. Play without quicksave/load, or autosave, and only save when you actually have to stop playing for a while.
 
Especially consider that while 58% exists, the 'not' 58% (AKA, 42%) isn't much lower. And if it falls in that 42% it is going to be one of those 'low odds' cases. So while you are comparing the highest (*58%) to what you got a lower one (8%) and thinking it's a bit disparity, you have to realize that you would have thought that disparity just as great independant of where in that 42% you landed.
 
Yeah, I probably should have given a different example to make my point and strategy clearer.

Let's say the odds are 92% that you will get a Great Prophet and 8% that you get a Great Sage.

You get the Great Sage.

Would that change your thinking any?;)

Look, this is a thread on strategy and tips. You are welcome to use the suggestions or ignore them.

But, I do appreciate your comments, especially yours, orangelex44. First time I ever heard that word 'tricksy.' And you are right about remembering that combat loss when the odds were 99.9% (although you are wrong about the complaining forever bit).

I just wish those came 00.1% of the time. :)
 
I think one of the shortcomings of FFH2 (and likely BtS too) is the odds that are given in the game.
Although I've noted defects before in the theoretical distribution (mostly in the FfH II code - one of the modders was using <= where they should have used <), I'm not noting any in the great person pop code, which appears unchanged from raw BtS; note however, that unlike the display, there is no rounding in the distribution:

I did note (in vanilla CIV IV) fairly strong evidence that one of the PRNGs did not give a random distribution under certain circumstances (I think I published my findings back in one of the Light bug threads). I never repeated that test for the more recent (BtS) code, or for the other PRNG (the stronger one).

Spoiler :
Code:
	if (getGreatPeopleProgress() >= GET_PLAYER(getOwnerINLINE()).greatPeopleThreshold(false))
	{
		int iTotalGreatPeopleUnitProgress = 0;
		for (int iI = 0; iI < GC.getNumUnitInfos(); iI++)
		{
			iTotalGreatPeopleUnitProgress += getGreatPeopleUnitProgress((UnitTypes)iI);
		}

		int iGreatPeopleUnitRand = GC.getGameINLINE().getSorenRandNum(iTotalGreatPeopleUnitProgress, "Great Person");

		UnitTypes eGreatPeopleUnit = NO_UNIT;
		for (int iI = 0; iI < GC.getNumUnitInfos(); iI++)
		{
			if (iGreatPeopleUnitRand < getGreatPeopleUnitProgress((UnitTypes)iI))
			{
				eGreatPeopleUnit = ((UnitTypes)iI);
				break;
			}
			else
			{
				iGreatPeopleUnitRand -= getGreatPeopleUnitProgress((UnitTypes)iI);
			}
		}

		if (eGreatPeopleUnit != NO_UNIT)
		{
			changeGreatPeopleProgress(-(GET_PLAYER(getOwnerINLINE()).greatPeopleThreshold(false)));

			for (int iI = 0; iI < GC.getNumUnitInfos(); iI++)
			{
				setGreatPeopleUnitProgress(((UnitTypes)iI), 0);
			}

			createGreatPeople(eGreatPeopleUnit, true, false);
		}
	}
}
 
Yeah, I probably should have given a different example to make my point and strategy clearer.

Let's say the odds are 92% that you will get a Great Prophet and 8% that you get a Great Sage.

You get the Great Sage.

So, let me tell you about the 'file drawer' effect. Also known as the "Man bites dog" effect.

It has often been said that Dog bites Man is not newsworthy, but Man bites Dog is. In the world of probability, this means that you, as a human with wetware, are far more likely to notice the amount of times where you get an unlikely turnout, than a likely one.

Furthermore, once you are trying to convince yourself something is 'up', you may exhibit "Confirmation bias". This is similar, in that you take all data that confirms your view ("Oh man, I only had 4% chance get a great bard, and I got it, the numbers must be wrong") and ignore or simply skim over all the data that goes against your view (Every other time).
 
If you want to make sure those numbers are right you would have to run a test at least a few hundred times. In your case: play a tiny map, give your self a few buildings which enable GP and save the turn before one pops up, write down (important!) what popped up. If you try this about 300 times and the numbers are really far of (more than 1-2%) try a few 100 more runs. As orangelex44 and Zechnophobe said are very likely to only remember thinks that are against what you expect.
My statistics professor said one good (and mostly true) thing:
Never trust a statistic, you didn't fake yourself.
Every statistic is biased because the writer wants something to happen and subconsciously makes those things happen or stops when they happen.
 
Although I've noted defects before in the theoretical distribution (mostly in the FfH II code - one of the modders was using <= where they should have used <), I'm not noting any in the great person pop code, which appears unchanged from raw BtS; note however, that unlike the display, there is no rounding in the distribution:

I did note (in vanilla CIV IV) fairly strong evidence that one of the PRNGs did not give a random distribution under certain circumstances (I think I published my findings back in one of the Light bug threads). I never repeated that test for the more recent (BtS) code, or for the other PRNG (the stronger one).

Not knowing the definitions of the data items, I'm not sure how that algorithm works, but it seems to me what we are looking for goes something like this:

- translate accumulated GPPs of each type into a percentage, like this

Great Prophet 58%
Great Bard 11%
Great Commander 6%
Great Sage 8%
Great Engineer 7%
Great Merchant 10%

- generate a random number 1 to 100 (not same as 0 to 1 times 100)

For instance 76

- go down the list and compare the random number to the sum of the percentages until you arrive at the type to be selected

58=58 < 76
58+11=69 < 76
58+11+6=75 < 76
58+11+6+8=83 => 76 so pick that one: Great Sage
 
Well, as long as you have a new random seed on reload, doing the test to verify the percentages doesn't require playing a ton of games, but just loading repeatedly and recording the results.


The OP even states that: "I have found that in almost every case, I then got the GP with the highest odds of receiving rather than one of the low balls."

Which is actually a direct statement of: "The Probability does work properly, as getting a low ball is rare enough it won't happen twice"
 
Not knowing the definitions of the data items, I'm not sure how that algorithm works, but it seems to me what we are looking for goes something like this:

- translate accumulated GPPs of each type into a percentage, like this

Great Prophet 58%
Great Bard 11%
Great Commander 6%
Great Sage 8%
Great Engineer 7%
Great Merchant 10%

- generate a random number 1 to 100 (not same as 0 to 1 times 100)

For instance 76

- go down the list and compare the random number to the sum of the percentages until you arrive at the type to be selected

58=58 < 76
58+11=69 < 76
58+11+6=75 < 76
58+11+6+8=83 => 76 so pick that one: Great Sage
Roughly, yes. The main difference is that instead of doing a translation into percentages, it uses the actual number of each GPP, so for example, if you had:

73 Great Prophet GPP and
34 Great Sage GPP,

it would choose a number from 0-(73+34-1).

The other difference is that the random number is on the left side, not the right, so in my example, lets say that 78 is chosen
is 78 < 73?
No
is (78-73) < 34?
Yes
So it's a Great Sage GPP (assuming that my ordering of GPP is correct - I didn't verify).
 
Top Bottom