SirPleb, Going for Sid

Very interesting info on the governments and the FP, Sir Pleb. It is good to know that FP placement is not nearly as important as it once was. I am not sure if I like it though: the decreased power makes it a bit boring.

At the time of your monarchy/republic comparisons, do you happen to know approximately how many of your cities had markets and the total number of cities? In your comparison, the benefit of republic--even while at peace--is negligable. I am now wondering if lots of luxuries and markets can even counterbalance the costs of a military much over the free-unit limit in republic.
 
Congratulations Sir Pleb! Now time to see if I last until the middles ages with the same start :lol:.

So, was the point of the FOD that armies have a ZoC?
 
How much does the AI fear Armies?

I think that "how much does the AI fear Armies" turns out to be the wrong question. In some cases the AI is surprisingly reluctant to attack units, when their relative HPs are high and a bit out of synch. And that is at least part of what is stopping it from attacking armies.

I created a test map to try to answer the question: When there is just one AI unit in position to attack just one at-war rival unit, what is the algorithm the AI uses to decide whether to attack?

From testing I have learned that the decision is definitely affected by:
o The attacker's attack strength.
o The defender's defense strength. The defense strength includes terrain defense bonuses in the decision process.
o The attacker's hit points.
o The defender's hit points.
o Whether the attacker is wounded.

I have also learned that the decision is not affected by the following factors. (At least not affected in the situations I tested.)
o AI aggression level.
o Game difficulty level.
o Attacker movement points remaining.
o A roll of the dice to adjust odds up or down a bit.
o Unit "levels", i.e. whether the units involved are regular, veteran, etc. (These have an indirect effect in terms of hit points but do not seem to have a direct effect.)
o Attacker's defense strength.
o Defender's attack strength.
o Defender movement points.
o Shield cost of attacker or defender.

Here are some interesting data points from my tests. The top line of each pair in the following table represents a test case where the AI unit will not attack. The bottom line of each pair changes one factor by +1 or -1 to cause the situation to pass a threshold to the point where the AI will attack.
Code:
    attack  attacker  defense  defender   attack win
   strength    HP    strength     HP     probability

      3         2       20         2        4.7%
      4         2       20         2        7.4%

      4         3       20         3        3.6%
      5         3       20         3        5.8%

      5         4       20         4        3.3%
      6         4       20         4        5.4%

      3         5       20         5        0.3%
      4         5       20         5        0.9%

      2         6       20         6        0.02%
      3         6       20         6        0.1%

      6         4        8         6       13.5%
      6         4        8         5       22.1%

      6         4        6         8       11.3%
      6         4        6         7       17.2%
For units with 2, 3, or 4 HPs the result seems fairly consistent - the AI will attack if the attacker's strength is high enough to give about a 5% chance of winning. I've tested with much higher attack and defense values and as long as they remain in proportion the result seems to remain the same. Varying the attacker vs. the defender HPs a bit but keeping them in this range doesn't change this result - the AI still attacks with around a 5% chance to win.

When both units have 5 or 6 HPs the result is oddly different. And it is strangely different again for the last two cases. They're the cases of most interest to the question of attacking an Army. Those two cases represent a Cavalry attacking a wounded Musketman Army or a wounded Cavalry Army.

I have not worked out the exact algorithm. The nearest I've come is an algorithm which matches the game in about 3/4 of my tests. Not great. I'm missing something. I suspect that the algorithm is obscure and includes some conditionals for particular values. In any case I'm setting it aside now, getting a bit frustrated with it and would prefer to continue with other things.

It does seem to me that there's something wrong here. Fixing this might be enough to cause the AI to attack armies appropriately. And would probably also improve the AI in general. It seems wrong that elite units will attack other elites at insanely bad odds but Cavalry won't attack wounded armies at much better odds.

A note regarding mods: I'd expect that if I doubled the HPs for each experience level, that wouldn't impact the AI's tactics. But it looks like it does. From the results above it seems that the AI will attack an 6HP unit (double an un-modded regular unit) at much worse odds than it will attack a 3HP unit. I don't know how much impact this may have in the greater scheme of things but I do not think this can be a good thing.

It does seem to me that some careful tweaking of the algorithm used to decide whether the AI should attack would improve the AI.
 
bradleyfeanor said:
At the time of your monarchy/republic comparisons, do you happen to know approximately how many of your cities had markets and the total number of cities? In your comparison, the benefit of republic--even while at peace--is negligable. I am now wondering if lots of luxuries and markets can even counterbalance the costs of a military much over the free-unit limit in republic.
At 310AD I had 46 cities. 13 of them had Marketplaces.
At 1080AD I had 147 cities and 25 had Marketplaces. I'd have preferred more to have Marketplaces by then but war was a higher priority.

I think that at most levels and at most maps, luxuries, marketplaces, and a high city count can make Republic a better way to go. I think that might even be true sometimes at Sid level, but I'm glad I went Monarchy in this one :)
 
Gogf said:
So, was the point of the FOD that armies have a ZoC?
Yes, partly. Also to slow down the arrival of enemy units. Instead of defending against all of them on one turn, the fastest undamaged ones arrive first, then the slower ones and the damaged fast ones who have had time to heal. By making the funnel long enough, including pillaging the tiles inside it, the combination of ZoC and varying speed of attackers could result in whittling down a very very large AI without losing anything.
 
Congrats Sir Pleb and thank you. I'm a relative newbie civ player and the generosity displayed by the players of this website is what has allowed me to improve rapidly in a short period of time.

I downloaded the finishing save of your Sid HOF game and noticed something interesting. You had your luxury set to 0. To me it would make sense to keep the luxury rate at 100 percent in order to increase your score. Was there a reason for this?
 
What interesting (and disturbing) results on combat, SirPleb. However, it seems consistent with a lot of bizarre things I'd noticed -- especially the AI's unwillingness to attack ancient cav (which have a bonus hp) in many circumstances....

Bizarre, odd, and definitely costing the AI a lot of strength. And there's no pattern I can discern to even fit the limited data you shared.

Thanks for doing the testing and sharing the results.

Arathorn
 
Notes about a Killer AI

The Zulu were the runaway AI in this game. They had the most expansion room of any Civ. They built the most Ancient and Middle Ages wonders, increasing their edge. They had a war with America which lasted from around 1000BC to 450AD - I think that helped them by reducing their military upkeep. They had an early GA presumably due to the war with America.

I've now examined them more closely during the 590AD to 840AD interval and learned that:

o They were running very close to four turn research. They learned Communism, Fascism, Steam Power, Industrialization, The Corporation, and Refining during this time, taking five turns for Fascism and learning the others in four turns each.

o They traded for resources and luxuries. They used their tech lead to maintain five or six luxuries and I think to also drain what money they could from the other AIs.

o Their gross city income was around 2900gpt during this time.

o I don't think they were running a deficit. At one point they were earning about 2900gpt gross and the tech they were researching needed 4800 beakers. (For them, for the human it would be 12000 for the same tech.) So they'd need to produce 1200 beakers/turn to get it in 4 turns. They probably had enough libraries and universities to get 1200 beakers from 800gpt or less. That leaves 2100gpt plus whatever gold they drained from other AIs to be used for corruption, maintenance, and unit support. I'd guess that with their huge military they were probably around break-even and did not have to run at a deficit.

o Most of the other Civs had no surplus funds at all. They'd overbuilt their militaries and couldn't afford fast research. The result was that the Zulu were the only AI with positive cash flow and the ability to research and thus their lead just kept increasing.

Do the AIs use Deficit Spending?

Earlier in this thread Arathorn guessed that they do. I've found strong evidence to support that guess.

I examined many saves and didn't find any case where an AI's research rate was under 20%. One case which seems quite clear: at 1270AD Egypt had just learned a tech and was starting a new one. She had 0g on hand and had a gross income of 462gpt. She was in Monarchy, had just 12 cities, and I'm fairly sure she had at least a few hundred units at that date. Her net income after corruption and maintenance could hardly have supported such a military. And nonetheless she ran research at 20% for the next few turns, as far forward as I checked. She was at 0g on hand in each turn as one would expect if she were running a deficit.

Another case I examined also suggests that the AI doesn't often re-evaluate its research capacity. At 810AD the Inca had just learned Communism and had 449g on hand. They started their next research at 20% science. In 820AD they had just 33g on hand. In 830AD they had 0g and stayed that way for many turns, but their science rate remained at 20% (deficit spending.) In 890AD they suddenly had a positive balance after going to war with the Zulu - some gpt deal(s) had been terminated. But they remained at 20% research for many turns, finally learning Fascism in 970AD. At that point they had 1613g on hand and set their science rate to 60% for their next research. It seems clear that they didn't increase their science rate when their income permitted it.

I haven't found a case of this but speculate that the same thing might happen in the other direction - if an AI starts research of a tech at a rate it cannot sustain later on, perhaps it leaves the rate unchanged and does some deficit spending at higher than the 20% rate until finished that tech.

At this point I hypothesize that:
1) The AIs research at a minimum of 20% regardless of whether they can afford it. (High probability hypothesis.)
2) The AIs continue research at the same rate until they finish a tech, even if they started at a high rate which they could initially afford and subsequently can't afford that rate. (More of a guess :) )

At any rate, it seems clear that the AIs do sometimes spend at a higher rate than they can afford. It is more likely to happen at higher levels when they can quickly build a large military. In some cases I expect this will get them useful tech at a discount. The map parameters, especially size, will have an effect on the value of this deficit spending.

This may also result in some unintentional abuse of AIs in other game situations. I've often played in a fashion which keeps some AIs at zero gold most of the time. In the past I assumed they'd compensate by adjusting their sliders. But that doesn't seem true. Keeping an AI at zero gold may force the disbanding of something every turn. And that might keep a small AI weak, perhaps having a noticeable effect in early stages of a game.

All this suggests that a possibly easier route to winning a Sid game (easier does not mean easy at this level! :) ) is to start with a map where most or all Civs are isolated on separate islands. In that situation I expect that all AIs would reach a point (at a guess, in the late Middle Ages) where they can't afford to research at higher than 20%. (And can't even afford that actually, but it seems they'll do it nonetheless.) When the AIs reach that "wall", they should slow down and the human will have a chance to overtake them in research and control the game, enabling a diplomatic or space win without a great amount of conflict.

Signing Off

That's the end of things I intend to report on in this game! :)

Time for me to dedicate a few days to real life and then see if I can play the current GOTM in time to submit...
 
Doc Holliday said:
I downloaded the finishing save of your Sid HOF game and noticed something interesting. You had your luxury set to 0. To me it would make sense to keep the luxury rate at 100 percent in order to increase your score. Was there a reason for this?
It was a combination of two things:

1) I was very near 100% happy citizens with the luxury slider at zero. Using 100% luxury instead would have increased score by only a very small amount.

2) I was hoping to finish with over 1M gold in the treasury. That wouldn't be a record by a long way but it seemed a fun thing to go for. I didn't make it though, ended up a bit short of that goal.
 
Arathorn said:
What interesting (and disturbing) results on combat, SirPleb. However, it seems consistent with a lot of bizarre things I'd noticed -- especially the AI's unwillingness to attack ancient cav (which have a bonus hp) in many circumstances....

Bizarre, odd, and definitely costing the AI a lot of strength. And there's no pattern I can discern to even fit the limited data you shared.
I think it very likely relates to your observations of ancient cav - it seems that the oddness can begin at 5hp and grows after that.

It is disturbing indeed. Yesterday I was annoyed with myself because I was focused on the bizarre and hadn't been able to work out the pattern. Today I've been thinking more about the disturbing part and I'm now thinking I'd probably rather not know the formula. (Unless a fix is forthcoming.) Understanding the details of this might expose exploitive possibilities I'd rather not be aware of. The army case is bad enough.
 
Tremendous thanks for all the great analysis. Good luck on the GOTM. Your competition for the eptathlon is already there!
 
@SirPleb: This is probably a "dumb" question, but I'll ask anyway:

When you said: "(Zulus) I've now examined them more closely during the 590AD to 840AD interval and learned that....".....How do you examine what an AI is doing in your game? :confused:
 
EMan said:
When you said: "(Zulus) I've now examined them more closely during the 590AD to 840AD interval and learned that....".....How do you examine what an AI is doing in your game? :confused:
I used a variety of tricks. There are probably more that I don't know and I might be doing some of this the hard way :)

1) Tech: Part way through this analysis I finally discovered Gramphos' save file editor. It is very helpful for this, showing all techs known by each AI. (I went looking through utilities because analyzing tech status the hard way got very tedious for this game's saves, largely due to the Great Library trick.) Gramphos' utility can also show all trades any given AI has.

2) Gross income: A glitch (I think it is a glitch) in Conquests allows you to use the trade screen to determine an AI's gross income. You can enter "9999" as the gpt you'd like for something and the program will change it to that Civ's gross income. I'm not completely sure what numbers are included in the value shown but when I tried it on my side of the trade screen it showed the total income from cities + taxmen. So I've used it as an indicator of the AI's gross income.

3) Slider settings: Investigate any city belonging to an AI and in the commerce section, at the right side of each of the three bars, the percentage the AI is dedicating to income, science, and luxury spending is shown.

4) Resources and luxuries: Investigating any city also shows the resources and luxuries the AI currently has. By deduction, based on a scan of the AI's lands earlier on, one can see which of these the AI must be getting from another AI via trade. It turns out that Gramphos' utility can also show this information directly.
 
Very interesting SirPleb....I assume Gramphos' utility (which I'm glad you mentioned) is for Post-Game analysis only? (viz. Would be considered a "Spoiler" for HOF live-play?) :)
 
EMan said:
I assume Gramphos' utility (which I'm glad you mentioned) is for Post-Game analysis only? (viz. Would be considered a "Spoiler" for HOF live-play?) :)
I think so too, that seems a good assumption. The utility shows information about rivals which either:
1) Can't be learned directly from the game and therefore shouldn't be known, or
2) Can be learned directly from the game but only by paying a price, e.g. paying gold to investigate a city.

And the utility is primarily a save game editor - editing a save file would of course be cheating and prohibited for the HOF and GOTM. I don't know whether the utility puts a marker of some sort in edited saves. I hope so, if it does then the GOTM staff and Aeson could detect whether it has been used.
 
can somone(s) touch on the pros and cons from your experience's with large and huge maps. I have tunnel vission and have always played on the standard map. I'm about to start a new game and am considering increasing the map size. I know the larger maps offer more civs to compete against but that's about the extent of my knowledge. Are the larger maps just more area and more civs? I've read posts that suggest these maps are geared towards "builders" and am concerned they are not suited for my style of play. I play on emperor and pretty much set my civs goals/direction as the game unfolds/dictates.
 
The main, if not the ONLY reason, people play with HUGE maps is to get a High scoring game into the Hall Of Fame (HOF).

The only differences are as YOU mention:
1. The bigger the map-size, the more tiles there are....very simple.
2. Yes, you can have more opponents the bigger the map-size BUT on higher difficulty levels it is not always a good idea to go with the Maximum number of AIs......since the AIs can enjoy some favorable conditions (i.e. extra units, accelerated production) early in the game.

Historically, the HOF did not recognize high score by Map Size.....so at higher difficulty levels you had to play with a Huge map to get into the HOF. ;)

I'm not sure you'll need to change you style too much for a larger map BUT you will have to be more patient as the game will be longer. :)
 
One noticeable difference in the map sizes is the ratio of land tiles per civ. You generally have more time to peacefully expand on the larger map sizes. This allows the AI start advantages (if any) to be nullified before those extra units ever have to be dealt with. The unit advantages don't scale by mapsize. A Sid AI gets an extra 12 Defensive, 6 Offensive, 2 Settlers, and 4 Workers on any mapsize. On a Tiny map this is a tremendous headstart, but on a Huge it isn't that big of a deal. Production and unit support bonuses scale with the number of cities, which is map dependant. The other factor is how 'corrupt' cities are used. The higher the tile:civ ratio, the more room for corrupt cities. The AI doesn't use specialists well, so the player can make up a lot of ground there. Especially in C3C where better Taxmen, Scientists, and the new Civil Engineers and Policemen can make even completely corrupt cities into production and commerce powerhouses.

Larger maps also favor the player because the AI is not very good at making contacts. Expansionist civs won't build more Scouts, relying on the first one and any free units for exploration. Most of their units stay at home (or attack barbarian camps) instead of exploring. Also, it's rare for a non-Sid AI to build a Curragh. So the player has a longer period of time to play go between on larger maps.

In general, the larger the map, the 'easier' (strategically) it is to win.

The ratio of land tiles per civ: (using the min HOF AI requirement)

Tiny 60x60 * .4 (60% water) = 720 (width is cut in half) / 3 (2 AI + Player) = 240
Small 80x80 * .4 = 1280 / 3 = 320
Standard 100x100 * .4 = 2000 (height is cut in half) / 5 = 400
Large 130x130 * .4 = 3380 / 7 = 483
Huge 160x160 * .4 = 5120 / 9 = 567
 
so basicly, the minimal AI-civs per world size is too low on the higher map sizes. if large gives you double of the average area and huge is another 1/6th more, maybe the civ-# should be levelled to something around (let's say) 400. which would mean:

tiny: 720/400 = 1.8 ==> 2 civs ==> 1 AI
small: 1280/400 = 3.2 ==> 3 civs ==> 2 AI
standard: 2000/400 = 5.0 ==> 5 civs ==> 4 AI
large: 3380/400 = 8.45 ==> 8-9 civs ==> 7-8 AI
huge: 5120/400 = 12.8 ==> 13 civs ==> 12 AI

this wouldn't solve the relativity problem of the absolute number of starting units, but it would make the sizes more comparable...
 
sabrewolf said:
this wouldn't solve the relativity problem of the absolute number of starting units, but it would make the sizes more comparable...
I disagree with your conclusions. Remember there are other things the map size also factors into which can work against the human player, everything from research time for techs to just how many more tiles we have to move units across, build railroad on, etc, etc.
 
Back
Top Bottom