The Number Crunching Thread

Well chance of H*H*H*H*T is Exactly equal to the chance of H*H*H*H*H

but Both of those are less than 50% [/tangent]

Only if you assume a fair coin. If, after looking after the first 4 throws, you see HHHH; you are entirely justified in believing that the coin is biased and that the next throw is more likely to be H than T.
 
Well chance of H*H*H*H*T is Exactly equal to the chance of H*H*H*H*H

but Both of those are less than 50% [/tangent]

so since there are only two possible outcomes - HHHHT or HHHHH, what are the chances that it is one of those two? :mischief:

or would you be saying that chance (HHHHT) + chance (HHHHH) < 100%, given HHHH already exists? :crazyeye:
 
If, after looking after the first 4 throws, you see HHHH; you are entirely justified in believing that the coin is biased and that the next throw is more likely to be H than T.

that's an interesting question: at what point can you assume the coin is unfair? my statistics is a bit rusty but i think a formula that may apply would say that with a sample size of four, and all heads, you can only approximate within an error of 50% at 95.54% confidence that the result will always be heads... ie you cannot assume the coin is unfair with that much confidence.


thankfully i can contribute something to the actual number crunching too:

cities have 6 base combat strength.

each population point adds 1/4th a point.
it increases exponentially with number of techs, it takes something like 12 techs to add 1 cs initially, you get next point after about 4 then 3 etc, until in later eras you get a point every tech and a couple later ones give two points. all techs grant 48 points.
being on a hill grants a 1.15 multiplier, rounded up.

i don't know what garrisons do offhand but it shouldn't be too hard to figure out
 
My guess is that he's simply challenging the assumption that heads or tails are the only two possible outcomes.

Some people like to live on the edge.
 
floor( 25 + ( 3 * ( policy number - 1 ) ) ^ 2.01 * (1 + number of cities policy cost mod * ( number of cities - 1 ) / 100 ) * policy percent handicap modifier * game speed culture percent * (100 - cristo redentor + piety finisher reductions) / 100 / 5 ) * 5

number of cities policy cost mod is 15 base, 10 with representation, lower with larger than standard map sizes
policy percent handicap modifier is .5 on settler, .67 on chieftain, .85 on warlord
game speed is .67 on quick, 2 on epic, 3 on marathon
cristo + piety finisher are 10 each if you have them

the floor( x / 5) * 5 is just to round down to the nearest 5

not that it really matters, but it should be
* (100 - (cristo redentor + piety finisher reductions)) or
* (100 - cristo redentor - piety finisher reductions)

for those who make a Excel spreadsheet. :)
 
Now that the UI properly displays the adjusted tech cost, the research formula is easier to test. Civ5 does indeed divide by the total # of civs like DaveMcW suggested, but it also uses a 1/(1+x) relationship.

Given the following:
  • B is the base cost of a tech; i.e. the XML cost with map size, handicap, and gamespeed modifiers already applied
  • K is the number of known, living civs who have the tech.
  • T is the total number of living civs in the game.
  • M is the TECH_COST_TOTAL_KNOWN_TEAM_MODIFIER global define (30 in unmodded game)
The adjusted tech cost, C is:
C = ceiling( B / ( 1 + floor( M * K / T ) / 100 ) )

or, prettier:


Some further examples are spoiled below.
Spoiler :

Prince, Huge, Standard speed game (1.3 modifier) with 12 civs.
Researching Gunpowder (B = 840 * 1.3 = 1092)
All civs still alive so T = 12.
Unmodded, so M = 30.

Here are the different costs for various numbers of known civs who have the tech:
Code:
K    C
--  ----
0   1092
1   1071
2   1040
3   1021
4    993
5    975
6    950
7    934
8    910
9    896
10   874
11   860
12   840

Note that the last entry doesn't really matter since at 
this point everyone in the game knows the tech.

Now for a similar game but with a total of 22 civs instead of 12:
Code:
K    C
--  ----
0  1092
1  1082
2  1071
3  1050
4  1040
5  1031
6  1012
7  1002
8   993
9   975
10  967
11  950
12  942
13  934
14  918
15  910
16  903
17  888
18  881
19  874
20  860
21  854
22  840

Finally, in that same 22 Civ game researching Chemistry (B = 1404)
C is 1338 if everyone's alive and 4 known civs have it (K = 4 and T = 22)
C drops to 1325 if 3 of the civs that don't have it are killed (K=4 and T=19)
C increases back to 1338 if one of the civs that did have it is killed (K=3 and T=18)

I changed "CIV5Technologies.xml",
and this formel isn't more correct ?!

marafon, difficult:8, two civ.,
Start...
research 7.425 will be 7.425
research 13.095 will be 13.095
research 63.180 will be 63.180
research 93.150 will be 93.150 ist ok ! but :

research 384.000 will changed to (minus ! ) -45.495
research 564.000 will changed to +134.504
research 2.511.000 will changed to (minus ! ) -65.979
research 3.321.000 will changed to (minus ! ) -114.972
research 11.169.000 will changed to (minus ! ) +2.086

Why ??
what's wrong in your formel ??
C = ceiling( B / ( 1 + floor( M * K / T ) / 100 ) )

I changed just "B" and this can not make sth negative.
It see like sinus : +, -, +, - ...
 
Top Bottom