• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Combat system - statistical stuff from >20 games

Originally posted by Akka


Here what I would suggest to do for a good statistical test, Dan :
build a map with two grassland tiles aside. Set the defense bonus for grassland at 0 %. Put the HP for ALL experience level at 1. Now, put 500 or 1000 warrior on a tile, and the same number of warriors on the tile just aside, but belonging to another civ. Set them to be at war to each other. Now launch the game, and come back counting how many survivors there is at the end.
Each warrior is 1/1 in A/D, and has 1 HP, so each one as exactly 50 % chance to win and 50 % chances to lose. As all XP level giv 1 HP, there is no "wounded" unit, nor any promotion stuff, to alter the chances of each side.
In one turn, one side will be annihilated. Statistically, there should be one survivor. If there is more than 10, then it's probable that there is a trouble with the random generator.


excellent idea!!!!! thanx Akka
 
I have just finished a game on Regent level. Date was about 2020, and it was a domination win... IE had more than a few battles. There were a couple of city assaults -- only a few -- where it seemed they had a really good infantryman who could not be killed. Like three or four tanks in a row went down or backed off to him. Series of numbers happen, and this was not so far out of ordinary to really concern me.
One thing... I played on after the game was over -- to take the last three eqyptian cities, and try to get my modern armor into the field to test in action.... What happened was on a bombing run, I got a notice that the city walls had been destroyed... No walls were in the graphic, or at least were not evident.. If there were also city walls in the cities with the ironman defenders, that would explain why he was so hard to kill.
Hmm, I think I will reload a saved version and look.

Also have found while playing with the save and reload thing -- not in the actual action of this game....
It is obvious that the sequence of numbers is either saved or regenerated the same. What is different is that there seem to be several random generators in action... one for battles, one for moves, etc. So what seems to happen is battle results are set, so that the sequence might be A A B B A B A A A B. That is random enough. If your sequence was to bring a cav unit, then another cav, then a tank, and you changed that on reload to bring the tank first, you would get the same win/loss ratio. If instead you put a 1hp spearman in first (assuming you are A) that spearman will win the first two, and then die. I dont mean this for battle wins, but for the chance to score a hit, ie reduce the opponent by 1 hp. What is odd about this is that the results seem to have nothing to do with the relative strengths of the units.
THe other thing I have seen is that modern units have less chance against ancient units that older units. Cav has a better chance against spearmen than a tank, while Mech infantry will mow down undefended infantry. Tanks against infantry often lose... Now this is OK---I would actually expect mechanised infantry to do better against infantry... :)
So, that is why I keep cavalry to the very end. Would not upgrade them if I could.
 
There seems to be a lot of confusion about how the random number generator is used in Civ3, as Dan also pointed out. I´ll sum it up here:

* The random number generator throws all die rolls in advance. This has the following effects:

- Reloading will yield the exact same results as long as you do the exactly same things.

- If you win with no damage with an undamaged elite warrior against an enemy phalanx, you will also win with a conscript warrior with 1 hp left if you reload and try with that unit.

In other words: the AI can´t cheat with no-lose flags since the die rolls are already rolled and it can´t know if you are going to attack and if you attack, in what order.

You can easily test this for yourself. Take 10 units of the same type and make them ready to attack several different units in different squares. Reload and do the attacks in a different order. You will notice that an attack with the same odds done at the same time always will yield the same results.
 
Originally posted by Hurricane
There seems to be a lot of confusion about how the random number generator is used in Civ3, as Dan also pointed out. I´ll sum it up here:

* The random number generator throws all die rolls in advance. This has the following effects:

- Reloading will yield the exact same results as long as you do the exactly same things.

- If you win with no damage with an undamaged elite warrior against an enemy phalanx, you will also win with a conscript warrior with 1 hp left if you reload and try with that unit.

In other words: the AI can´t cheat with no-lose flags since the die rolls are already rolled and it can´t know if you are going to attack and if you attack, in what order.

You can easily test this for yourself. Take 10 units of the same type and make them ready to attack several different units in different squares. Reload and do the attacks in a different order. You will notice that an attack with the same odds done at the same time always will yield the same results.

I dont think Firaxis would agree with you, because what you're saying is that HP and rank don't really matter ever, all the overall battle results are pre-determined. So why have hitpoints at all? what youre saying is that the random number gen only affects the overall outcome of hte battle, not each hp loss/non-loss.

No one has ever said this to be the case. the stance is that the rand num gen is used for each hp calculation, not 1 rand num for each battle.
 
I dont think Firaxis would agree with you, because what you're saying is that HP and rank don't really matter ever, all the overall battle results are pre-determined. So why have hitpoints at all? what youre saying is that the random number gen only affects the overall outcome of hte battle, not each hp loss/non-loss.

Sorry if I was unclear. What I said is that rank and HP:s make no difference to the die rolls. Take this example.

Consider 3 warriors in a stack. One is elite, and 2 are regulars (full hp:s).

You first attack with the elite warrior (5 hp:s) against conscript warrior (2 hp:s).

Say the battle outcome is wound, wound, wound, wound, hit, hit. You win, but with 4 damage.

You reload and attack with the regulars. The battle outcome will be wound, wound, wound. Your regular warrior dies. You continue with the second warrior. The battle outcome is wound, hit, hit. You win with 1 damage.

As you can see, the overall outcome is exactly the same = first you are damaged 4 times, then you make 2 hits. So as you can see, rank or hp:s have no outcome on the chance to win or lose.
 
Originally posted by cephyn


I dont think Firaxis would agree with you, because what you're saying is that HP and rank don't really matter ever, all the overall battle results are pre-determined. So why have hitpoints at all?

Hurricane is correct. Each throw of the die results in the loss of one hitpoint. The more hitpoints a unit has the more times that unit has to lose before being destroyed. Elite units can be very effective against comparable conscripts (but they will still lose some of the time, of course).
 
Please correct me if I'm wrong, but I thought walls were no longer effective once your city reached pop. > 6 because they get an automatic defense bonus. Since walls add something like 50%, if they were accidently being added in as well even though they're not supposed to be, that would explain a lot. Of course, like I said, I could be wrong about the walls losing there effects.

EDIT: BTW, how is rounding handled? If a Spearman with defense 2 gets an 80% bonus due to whatever, is it set to 3 or 4?

EDIT2: How accurate is the Combat Calculator? I think I'll leave it open while fighting use it to calculate each combat results and compare the results. I can keep a listing.

One thing never mentioned to Firaxis, Kudos on the extremely ALT-TAB friendliness of Civ3. I really complement you guys on that.
 
Originally posted by Akka
If there is more than 10, then it's probable that there is a trouble with the random generator.

Actually with 500 coin flips there is (appromimately) a 1/3 chance of being off the mean by 10.
 
Originally posted by DarkwingGT
Please correct me if I'm wrong, but I thought walls were no longer effective once your city reached pop. > 6 because they get an automatic defense bonus. Since walls add something like 50%, if they were accidently being added in as well even though they're not supposed to be, that would explain a lot.

The walls are still there even when the town grows to a city. They should have no additional effect, but if the city should be reduced to rubble by cannon, then they will have an effect again. That's why they are still showing in the city screen.
 
Cool, although I didn't say "Aren't they removed?", I made the assertion that they are no longer effective. So in essence, thank you for verifying it.
 
Originally posted by DarkwingGT

One thing never mentioned to Firaxis, Kudos on the extremely ALT-TAB friendliness of Civ3. I really complement you guys on that.

It must depend on the machine. I cannot alt+tab out of civ 3.
 
Originally posted by eyrei
I cannot alt+tab out of civ 3.

I cannot unless I have another application running to ALT-TAB to. So, fire up Windows Explorer before you start CivIII and it might work. Or, set up a keyboard shortcut to apps you run frequently and you can start them while CivIII is running. Well, maybe not you, but me - I can. :)

Obviously, if you've already tried this, just disregard.
 
Originally posted by eyrei


It must depend on the machine. I cannot alt+tab out of civ 3.

you can alt+tab out of civ3 when nothing else is running if youre using win2k or xp -- but not 98.

however, in 98 the "trick" to get out without having something else running is that nifty button often overlooked next to Alt -- the "windows" key.

8)

(of course, disregard if youre using one of those anachronistic keyboards from way back in 1994 or something)
 
I open a window to a folder before starting the game.

I found that the city I had trouble with did have walls, but it was also pop 12.... so the defender had a significant bonus.
Yes walls are no longer effective, the city itself gives the same bonus the walls did with the town.
 
Originally posted by cephyn
you can alt+tab out of civ3 when nothing else is running if youre using win2k or xp -- but not 98.

FWIW, I'm running Win2k and can't.
 
Originally posted by cephyn
(of course, disregard if youre using one of those anachronistic keyboards from way back in 1994 or something)

Or you could hit the equivalent of the Windows key, Ctrl-Esc. That brings up the Start Menu as well.

No problem Alt-tabing, Windows keying, or Ctrl-Esc'ing out of Civ3 on my Win2k machine at home either.
 
First of all, I am no whiner. :cry: I have played and CMN'd hundreds of single and multiplayer games of SMAC and SMAX and have NEVER seen evidence of AI combat advantages (actually, the AI in that game could have really used some combat advantages! :D ).

But AI combat advantages SEEM obvious in Civ3. (Don't have statistics to back it up). But it seems to vary by unit matchup. I have seen the superspearmen on occasion, but the Knight-Pikeman matchups seem to conform to predicted percentages quite well. For me, everything goes to hell once the AI gets cavalry. Later on, once it's tank vs. infantry, everything behaves quite orderly again. It almost seems that something was put in the code to make AI cavalry stronger than human, which might not be that bad idea to counter human cavalry rush exploits.

I'll be more specific. Veteran AI cavalry routinely take out my veteran fortified infantry inside a size 7 city, with about 50% success (6 attacking 18.5). On two occasions, AI cavalry took out fortified mech infantry (6 atttacking 24.3). My cavalry attacking AI cavalry on grasslands (6 attacking 3.3) loses more than 50% of the time. Never got even one hitpoint off AI infantry with dozens of elite cavalry attacks (OK, that's expected, but why were the AI cavalry so consistently effective?). This was against the French, who had Sun Tzu's and were #1 in Score, Power and Culture, and against the Babylonians. (I was :egypt: ).
 
Originally posted by nklatt


FWIW, I'm running Win2k and can't.

I think we may have to define what we mean by alt-tab friendliness, as I just realized that civ3's behavoir could be looked at as either friendly or unfriendly.

What I believe people are stating when they say it is friendly, is that when you alt-tab, the game is not banished off the screen. This allows you to do something while still watching the game, especially useful during the longer turn waits later in the game (such as IM, use a combat calculator, play with the editor).

At the sametime I wish there was a command to minimize civ3, as I have some programs running that I cannot access via alt tab (Trillian, Winamp, anything in my system tray). And the windows key unlike normal does not show you the taskbar. However, a simple ctrl-alt-dlt on Win2000 to bring up the task manager solves that, just select the minimize option.
 
Back to the initial post -

If the battles were true 50/50 outcomes - the odds of 389/526 is 0.02% or 1/5000 that this is just bad luck and despite even odds the AI won that many times - i.e. you really must assume the randomization is infact broken.

The problem is that if the battles that were "approximately 50/50" were in actuality 60/40 (because of the assumptions) the odds that this is a reasonable result jumps to 12.5%. That is the same as flipping three straight heads on a coin. Unusual but not unheard of.

So the sample size is big but the upfront assumptions in the battles and which ones you selected as "approximately 1:1" I think raise some uncertainy.
 
Back
Top Bottom