Cost of research and Samson's formula revisited - Civilization Fanatics' Forums
 (US | UK | DE | CA)

 Civilization Fanatics' Forums Cost of research and Samson's formula revisited

 Civ2 - Strategy & Tips Share your Civ2 strategy and tips with other players.

Sep 06, 2011, 03:02 PM   #2
Prof. Garfield
Emperor

Join Date: Mar 2004
Location: Ontario
Posts: 1,408
If you are playing on a large map, you multiply the technology costs (as determined in the formula) by 5/4. This may give you jumps of two due to rounding, as shown:

26*5/4 = 32.5 = 32
27*5/4 = 33.75 = 33
28*5/4 = 35 = 35

You have to take into account starting technologies as well, since they don't count for your "tech number." If you played the game on a large map and had 3 starting technologies, you might end up with your observation. Other than that, I don't think you have missed any information.

Assuming that you haven't overlooked rounding, could you make a spreadsheet with the relevant information (game year, # starting techs, # current techs, # key civ techs, map size, difficulty, anything else you think might be relevant)? This will make everything easier to analyse without everyone having to make their own sample (or, we can add samples together).

It wouldn't surprise me if something was missed (particularly game year, since they seem to have been interested in early landings), because as long as they were close, the discrepancy might not have been noticed if it were small enough (people would likely set their science to 0 to determine tech costs after gifting, rather than use a formula).

Quote:
 Looking at the table of Base and Bonus values vs. Tech number that is in the original article by Samson I cannot help thinking that this cannot be the case. No designer will make a design by assigning numbers like this. If I want to design a tech multiplier based on tech number I am going to come up with a formula and not a table.
If there were a list of 93 or 100 values, I might agree with you. But there are only 20 values in that list, so I don't think it is unreasonable to assume it was programmed in. This would make it easy to change the tech costs if they found during game testing that a cost was too high or too low. These also increment by 1 every few techs, so it would have to be a pretty convoluted formula. (And looking up something is usually quicker than calculating it, although it wouldn't matter in this particular case.)
__________________
"Where are we going?" asked Nermal. "We? We're not going anywhere," replied Garfield. "You, however, are taking a tour of scenic Abu Dhabi."

The Civilization II Compendium Project

Sep 06, 2011, 08:04 PM   #3
Ali Ardavan
Mathematician

Join Date: May 2002
Location: Michigan, USA
Posts: 2,709
Since the posting of the thread I have found the original discussion in Apolyton thanks to Magic pointing out a link to NetHog's website which has a link to Great Library:

I have read that discussion and now it is clear that Samson's formula was work-in-progress which never got finished. In fact, he himself encountered an anomaly he could not explain:

Quote:
 In my test game, I had 72 techs and currently had a 3 tech lead over my key civ, which gave me a +1 penalty (3/3=1), which when added to the base of 26 resulted in a beaker cost of 1944 (72 x 27). Then I destroyed my key civ. After this my tech "lead" was 72, so the game assigned me a penalty of 24 (72/3=24), which when added to the base of 26 (26+24=50) resulted in a beaker increase to 3600 (72 x 50). In this test my tech costs increased even more, because
Next he gives a reason he later admits is erroneous:
Quote:
 After a few more tests, it's not clear to me where the additional +6 penalty came from that resulted in the 4032 cost instead of the expected 3600.
I have gathered enough data to unravel this anomaly. As I said before the increase in penalty is not always +1 for every 3 additional techs. From my data points:
3 1
6 2
9 4
12 5
15 6
18 7
21 9
24 10
27 11
30 13
33 14
36 16
39 16
42 18
45 19
48 21
51 22
54 23
57 25
60 26
63 27
66 28
69 30
72 31
75 32
78 34
81 35
84 37
87 37
90 39

Samson's tech number was 72 meaning that he had 71 techs. When his key civ went away, the difference between him and his key civ was 71 techs which gives you a penalty of 30 according to my data. This is exactly what he observed.

Sep 06, 2011, 08:22 PM   #4
Ali Ardavan
Mathematician

Join Date: May 2002
Location: Michigan, USA
Posts: 2,709
Quote:
 Originally Posted by Prof. Garfield If you are playing on a large map, you multiply the technology costs (as determined in the formula) by 5/4.
I do recall seeing tech multiples above 26 in late game in some games, however I have not had a chance to dig them up and see what causes that. I can assure you it is not simply a matter of map size. I looked at more than one game of mine on large maps (9K tiles and above) and the multiples were not different than those on the normal map. I also looked at 3 games on small maps (1-2K) and did not see a difference either.

Quote:
 Originally Posted by Prof. Garfield This may give you jumps of two due to rounding, as shown: ...
In the reported case that started me down this route, I was ahead of my key civ by 6 techs an my multiplier was 28 as expected. I made a large delivery and expected my power to go up by one notch the next turn which is exactly what happened. My new key civ was behind me by 9 techs. I expected my multiple to go to 29 but it went to 30 instead.
Quote:
 Originally Posted by Prof. Garfield You have to take into account starting technologies as well, since they don't count for your "tech number."
I did. I went back to -4000, and used cheat mode to look at all my rivals. Both my key civs started with the same number of starting techs.
Quote:
 Originally Posted by Prof. Garfield Assuming that you haven't overlooked rounding, could you make a spreadsheet with the relevant information (game year, # starting techs, # current techs, # key civ techs, map size, difficulty, anything else you think might be relevant)?
The killer here is what else may be relevant. So far I know number of turns is a factor, but I have no idea what else could be.
Quote:
 Originally Posted by Prof. Garfield If there were a list of 93 or 100 values, I might agree with you. But there are only 20 values in that list, so I don't think it is unreasonable to assume it was programmed in. This would make it easy to change the tech costs if they found during game testing that a cost was too high or too low.
I disagree. Keep in mind that this was designed from scratch. Why would anyone design a table (even a small table) instead of a formula? He had no benchmark he was trying to fit. I am sure there is a formula for the table I have provided in the previous response as well. I just have not figured it out yet.

Sep 06, 2011, 10:55 PM   #5
Prof. Garfield
Emperor

Join Date: Mar 2004
Location: Ontario
Posts: 1,408
Quote:
 The killer here is what else may be relevant. So far I know number of turns is a factor, but I have no idea what else could be.
What is relevant in other aspects of the game? Tech numbers are already accounted for, and map location can't be relevant. I find it unlikely that there are "trigger techs" like there are for trade. Government seems unlikely. I can't think of anything else that the game uses in other areas (like trade, riot factor, pollution) that might be used for science costs, nor can I think of anything else I would put into science costs were I designing the program.

Quote:
 I disagree. Keep in mind that this was designed from scratch. Why would anyone design a table (even a small table) instead of a formula? He had no benchmark he was trying to fit. I am sure there is a formula for the table I have provided in the previous response as well. I just have not figured it out yet.
There actually is a benchmark that the designers might have had: behaviour in the early game. That is, if you want (for example) the tech rate in the early game to be roughly constant, you will alter increases in tech costs so that they occur around the likely time that cities are founded.

The main reason I suspect that the points were programmed in, rather than the result of a formula, is that after 20 techs the multiplier doesn't change any more. If the designers had a formula for the tech costs for the first 19 techs, then why didn't they either keep it for 20 techs and beyond or (if they wanted a large jump) have a new formula for the techs after 19? For that matter, why not have a formula that consumes tech number directly (although this could have been done for the 1st 19 techs with a table as well)?

If you really think there is a formula behind all this, I suggest you find out how tech costs behave at lower levels. This might give you some extra insight into the fomula.
__________________
"Where are we going?" asked Nermal. "We? We're not going anywhere," replied Garfield. "You, however, are taking a tour of scenic Abu Dhabi."

The Civilization II Compendium Project

 Sep 07, 2011, 05:47 AM #6 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 Thanks Prof. Garfield for your thoughtful remarks. Keep them coming. I did some work on the effect of game turn last night. It was all done in one game at Deity level on a normal map. So far the data show that the reduction to the tech multiplier is nonexistent for techs below tech number 20. After that every tech has a threshold turn below which its cost is predicted by what we know so far (there are still some anomalies I cannot explain). After that threshold for every 8 turns you get a reduction by 1 in the tech multiplier. Sometimes this value jumps by 2 instead of 1. The reduction is capped at 7 or 8. This threshold is so high that you will only see it if you are a novice or have poor terrain to work with. For the tests I ran, tech number 20's threshold is turn 120. Here is the data: turn-range effect-on-tech-multiplier 001-119 0 120-127 -1 128-135 -2 136-143 -4 144-151 -5 152-infinity -7 The threshold for tech number 20+n starts 8*n turns after that of tech number 20. The amount of reduction is sometimes capped at 8 instead of 7, and I have seen jumps from 3 to 5 instead of 2 to 4. I have a feeling these jumps are caused by yet other factors that affect the formula which are yet unknown to me.
 Sep 20, 2011, 08:44 AM #7 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 I am surprised and disappointed by lack of interest on this topic. I have been spending a lot more time on this. The formula is quite complex and I have come up with several anomalies. One interesting anomaly is on a game-generated normal-sized map at Deity level with 7 civs. I am playing OCC and in +500 as my city is celebrating towards size 21 my power becomes Mighty. Accounting for starting techs, I am ahead of the Greeks by 9 techs but my tech multiplier acts as if I am ahead by merely 8 (penalty of 2 versus expected 4). I have run the following experiments: 1. Engage in tech exchange with Greeks who have 3 techs I do not. Whether I exchange 1, 2, or 3 the anomaly does not go away. 2. Gift techs to the Greeks. 1-2 gifts make no difference, at third you see a reduction in penalty. Next reduction in penalty comes at sixth tech gift. It is as if they have 2 instead of 3 starting techs. I have verified that they indeed have 3 starting techs (cheat menu in -4000 before they have had their chance to start playing as I am playing white). Furthermore, there are other junctures in the game when I am mighty and I do not observer an anomaly.
 Sep 20, 2011, 08:55 AM #8 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 It occurred to me that I should try something unusual for a possible insight into the formula. I decided to look at tech costs in the current GOTM 126. For those who may not know, this is a scenario where the human player starts as Mongols with no starting tech, Greeks have 1, Persians 2, ..., Romans 6. Furthermore, Greeks start with 2 cities, Persians 3, ..., Romans 7. This means that my power is pathetic and my key civ is Rome. Here is my data tech# tech cost 1 10 2 10 3 18 4 30 5 40 6 55 7 66 8 84 9 96 10 108 11 120 (built Marco and did massive tech exchange) 22 21x26 It is obvious that the game is treating me as if I have a starting tech even though I do not! This and the previous observation tell me that depending on the circumstances the formula treats you as if you have fewer (previous case) or more (this case) starting techs than you actually do! I would appreciate other GOTM 126 players reporting their tech costs for comparison.
 Sep 20, 2011, 03:38 PM #9 Jokemaster Insert something here   Join Date: Nov 2010 Posts: 430 Ali: I think the same happened in GOTM 115 (the first 2 techs costing 10 beakers with no starting techs) In each situation, we started Pathetic: however in 115 we were our own key civ while in 126 we were not. __________________ If you don't understand me, it's not anyone's fault. Sometimes I don't even understand myself. Last edited by Jokemaster; Sep 20, 2011 at 05:56 PM.
 Sep 20, 2011, 03:55 PM #10 mackerel Warlord   Join Date: Nov 2010 Location: Michigan, USA Posts: 194 It's not lack of interest on my part, but lack of anything useful to add. This is probably one of the little ways that holds back my game. In the early years I forget to check tech cost, and once I get scientists it's such a pain to figure out that I don't bother.
 Sep 21, 2011, 05:12 AM #11 Magic_gorter Deity     Join Date: Apr 2006 Location: Amersfoort (Netherlands) Posts: 2,665 It's from me also no lack of interest, but RL gives me hardly time to play civ at the moment. I hope I have the tech costs of GOTM 126....Might have a look at them this evening... __________________
 Sep 21, 2011, 07:57 AM #12 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 Thank you Jokemaster for mentioning GOTM 115. I looked at my saves and my data is below. In that game, another scenario, we played white and the rivals each started with 6 techs. This meant that like GOTM 126 we started as pathetic and will remain so for quite some time. In GOTM 115 we were our own key civ, in GOTM 126 our key civ is Rome who is most powerful. tech tech cost # GOTM115 GOTM126 1 10 10 2 10 10 3 2x11 2x9 4 3x11 3x10 5 4x12 4x10 6 5x12 5x11 7 6x12 6x11 8 7x12 7x12 9 8x12 8x12 10 9x12 9x12 11 10x12 10x12 20 19x15p4 <-- p4 means I was ahead of my key civ by 4 acquired techs 21 20x24p5 22 21x26p6 21x26 23 22x26p7 24 23x26p8 25 24x27p9 26 25x27p10 29 28x28p13 31 30x27p9 34 33x26p6 35 34x26p7 37 36x26p7 42 41x28p12,x27p11 48 47x28p13 53 52x28p13 56 55x28p13 58 57x30p15 76 75x36p31 101 100x45p52,x44p50,x42p45,x42p42,x40p39,x39p36,x37p3 3,x36p30,x35p27,x33p24,x32p21 135 134x58p134 (key civ destroyed) Once again the data clearly shows that in this game just like GOTM126 the formula assumes you have a starting tech when you actually do not. I now believe that the number of techs that do not count towards the tech cost is a separate variable which is often, but not always, set to the number of starting techs. In this game this variable never changed even after I became Supreme. Next I am going to dig up an old game of mine which was a normal game (not a scenario) but I started at a huge disadvantage: I started on the north pole and took quite some time for me to settle. Last edited by Ali Ardavan; Sep 21, 2011 at 08:02 AM.
Sep 21, 2011, 08:10 AM   #13
Ali Ardavan
Mathematician

Join Date: May 2002
Location: Michigan, USA
Posts: 2,709
Thank you responders. It is good to know that others are reading if not responding.

Quote:
 Originally Posted by mackerel This is probably one of the little ways that holds back my game. In the early years I forget to check tech cost, and once I get scientists it's such a pain to figure out that I don't bother.
Not as much as you think. Once you know how to lower your tech cost (gifting your key civ) the tech cost only matters if you are playing OCC. In OCC missing the next advance often means a wasted turn.

Quote:
 Originally Posted by Magic_gorter I hope I have the tech costs of GOTM 126....Might have a look at them this evening...
Thanks. I would appreciate those numbers.

 Sep 21, 2011, 02:14 PM #14 Magic_gorter Deity     Join Date: Apr 2006 Location: Amersfoort (Netherlands) Posts: 2,665 GOTM 126: tech# tech cost 1 10 2 10 3 18 4 30 5 40 6 55 7 66 8 84 9 96 (I have to check this one) 10 ? did not made a note about the techcost Marco Polo - build have to check the game when I have time to play again... __________________
 Sep 22, 2011, 09:32 AM #15 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 Thanks Magic. Your numbers match mine exactly. I went to a very old game of mine to look at the research cost. Here are the parameters: 40x50 game-generated map, King level, 6 civs. I was playing purple and orange was the missing civ. I started with 2 settlers and Bronze Working on the North Pole! I sent them in opposite directions. There was only one island off the north pole which was found and settled by -3600. I encountered 3 huts on route, 2 of which gave me techs. Despite these disadvantages and unlike GOTMs 115 and 126 (reported above) the game did not treat me as if I have any more extra starting techs. My techs costs from the available saves are below. Due to the fact that the earliest save is from -3250 it is not possible to accurately find out what the other rivals had for starting techs. The ? seen below indicates that fact. Eventually I became supreme and thus my own key civ. Tech costs after that point have a postfix of e (for even as in no tech diff ) tech # Research cost multiple 3 x8? <- This means that tech cost is 3x8=24 7 x7? 13 x9? 15 x9? 19 x10? 25 x14e 33 x18e 41 x18e 54 x18e 61 x18e 66 x18e 85 x18e 88 x18e 90 x18e Given a late start and very slow initial progress due to the home island being size 8 with 4 plains and 4 forests, I checked to make sure that none of the tech costs are affected by the turn factor (see responses 1 and 6 above) and they are not. At one point I got within a couple of turns of the threshold though. Observations based on this data: 1. The final tech multiple is not fixed (here it is 18 vs. 26 in typical deity and emperor games). This is not new and is already known. What is not known is what factors play a role. Level and map size are the obvious ones, but who knows what else. 2. The onset of the final tech multiple (18 here, 26 typically) is not always at tech 20. Here at tech 25 we are seeing a multiple (14) lower than the final (18). 3. This is the first time I have observed tech multiples below 9. Last edited by Ali Ardavan; Sep 22, 2011 at 09:36 AM.
 Sep 22, 2011, 10:13 AM #16 Prof. Garfield Emperor   Join Date: Mar 2004 Location: Ontario Posts: 1,408 A technique I used when investigating the Riot Factor was to save games as scenarios so that I could load them at any difficulty level and compare differences without completely setting up a new save for each level. I also changed the Riot Factor entry in the rules.txt file to come up with my formula. In your case, you might want to alter the Tech Paradigm to see what the changes are. __________________ "Where are we going?" asked Nermal. "We? We're not going anywhere," replied Garfield. "You, however, are taking a tour of scenic Abu Dhabi." The Civilization II Compendium Project
 Sep 22, 2011, 03:07 PM #17 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 Thanks Prof. Garfield for your suggestion about saving as scenario. I was not thinking about that. I know difficulty level is a factor but right now I am more concerned about resolving the anomaly I explained in response 7 above. It is very puzzling as I am getting different results at various points in the same game. Obviously factors like difficulty level and map size are fixed here. Furthermore, I have observed this anomaly only when I am Mighty. Sometimes the Greeks act as if they have 3 starting techs, some times 2. In reality they started with 3 (verified via cheat mode in -4000). I have a save at +500 and another at +360 where the Greeks behave as if they have 2 starting techs. Furthermore, if I play from the +1 save (where I am not Mighty) to +40 when I become Mighty I observe the same phenomenon. But If I play from my -1000 save or -500 save, the Greeks behave as expected (3 starting techs). I have played the -500 save all the way to +160 and 5 times during this period (-450, -200, +20, +140, +160) I am Mighty and the Greeks act as expected. This is really puzzling. This phenomenon is not affected by how many techs I have (I have experimented by tech exchanging with them or other rivals) or what the tech difference between us is (I have tried reducing it by gifting them and the behavior is consistent). It is not affected by whether we are allies or not or whether or not they have techs I do not have. I am all out of ideas as to what else could be causing this anomaly. Any ideas anyone?
 Sep 22, 2011, 06:30 PM #18 Prof. Garfield Emperor   Join Date: Mar 2004 Location: Ontario Posts: 1,408 You mention starting Tech anomalies for GOTMS played as scenarios. This could be a result of cheating used to remove techs (or add them) to achieve the desired starting circumstances of the game. The anomaly from your OCC game is strange, however. Is it repeatable? That is, if you play a few turns over and make the calculations again, will you have the same result? __________________ "Where are we going?" asked Nermal. "We? We're not going anywhere," replied Garfield. "You, however, are taking a tour of scenic Abu Dhabi." The Civilization II Compendium Project
Sep 23, 2011, 12:26 PM   #19
Ali Ardavan
Mathematician

Join Date: May 2002
Location: Michigan, USA
Posts: 2,709
Quote:
 Originally Posted by Prof. Garfield You mention starting Tech anomalies for GOTMS played as scenarios. This could be a result of cheating used to remove techs (or add them) to achieve the desired starting circumstances of the game
Brilliant! That is probably it. To create the scenario I start a normal game, then use the cheat menu to set it up as I want and then save as scenario. It probably gave me a starting tech in both cases and remembered that fact even after I wiped my slate clean.

Just to test this, I started several normal games with the GOTM 115 map (7 walls). In 5 of 5 Deity level starts it gave me 6 starting techs. In 3 of 3 Emperor level games it gave me 2 settlers and 4 starting techs. It is safe to assume this map always gives you more than one starting tech. Why removing these via the cheat menu cause the game to treat you as if you still have one (and not more) starting techs I do not know. Despite this issue your guess is so far the best theory we have for this behavior.

I also started a game based on the GOTM 126 map, and I was surprised to get no starting techs! So I have no argument there.

Quote:
 Originally Posted by Prof. Garfield The anomaly from your OCC game is strange, however. Is it repeatable? That is, if you play a few turns over and make the calculations again, will you have the same result?
Yes. It is very persistent. I have played from the anomalous +500 save all the way to +940 (22 turns). My power moved off of Mighty and back to it several times in this period and consistently Greeks were treated as if having 2 (instead of 3) starting techs.

Meanwhile I have discovered yet another strange anomaly. I have a normal game (not scenario) played on the 7 walls map (used in GOTM 115). I started with 6 starting techs. Up to my -1000 save, my tech number is #of techs - #of starting techs +1 as expected. In my +1 save, however, my tech number is one more than expected! I started playing from my -1000 save (normall) to +1 and the anomaly did not occur . So, right now I have two saves at +1, based on the same -4000 start, in both of which I have 26 techs and researching 27th. My tech cost in one case is 567 = 21x27 (normal) and in the other case is 594 = 22x27 (anomalous).

 Sep 23, 2011, 12:34 PM #20 Ali Ardavan Mathematician   Join Date: May 2002 Location: Michigan, USA Posts: 2,709 Upon further thought, there may be a common reason behind both the OCC anomaly (responses 7, 17, and 19) and the 7Walls anomaly (response 19): the effect of a starting tech not counting towards your tech number expires. This expiration is not turn-based as I have saves in both cases at the same turn with different tech costs. Some game event must be the causing this expiration.

 Civilization Fanatics' Forums > Cost of research and Samson's formula revisited