Combat System, Take 2

Interesting, thank you Lonestar. One small thing that I neglected, my Pikeman were Veteran. But it still boggles the mind how often longshots occur for the computer and against me.

I would say the combat system makes attacking too difficult at times but the computer has no trouble attacking me. I might be inclined to say defense is too difficult, but once again the computer has no trouble there. Am I missing something?

I will grant that it's not 100% of the time nothing goes my way. I once had a Veteran Swordsman with 1 HP defeat an Elite Longbowman (my Swordsman while not fortified was on Forest). If the case is the terrain makes that big a difference (I should've been crushed by the Longbowman), I definitely think that they should tone down the defensive bonuses given by terrain. Of course, the fluke for me was just that, a fluke. I can't repeat it on a consistent basis like the computer can.
 
I've had similar situations of loosing many modern tanks against units prior to inf when attacking a city. Realistically this makes no sense. Spearmen in reality will always loose to modern tanks (look at Afganistan). But this is only a game.

That being said, I think it is important to remember that modern tanks aren't modern tanks. They are attack 24 (?) units. So instead of thinking that a frigate is a small wooden ship and a destroyer is a larger metal ship, instead think of each by their attack/defense numbers. Then choose battles where the numbers are in your favor, not the type of units. The unit type is just for fun and to add a "bit" of reality (but only a bit).

Now, if you still find that cities are difficult to take, do I what I started to do. Build bombardment units (bombers, artillery...) and soften up your targets before you begin.

Just my $3.14
 
should have been 0.418 exp (14-2) = 2.915 e-5
will drag the stats book out tonight and check it, it been a long time since school !;)
 
Gruntboy,
Sorry for this really probably stupid question but I just don't get it-

On the probablities you quoted for Nikua, I can see the 18.5%, thats straight forward. And I can see that with 5 hit points for the Horseman to lose one at a time he'll get 5 shots at the damaged tank, (worst case, presuming the tank hits the horseman every time, right?) so you'll want to sum 5 individual hitting probablities (of the hitting the tank) to get the overall chance of the horseman killing the tank. What I don't understand are the 4 lower chances (8.2%, 10.0%, 12.3%, and 15.1%) that are summed with the 18.5%. Why are they lower? It makes a big difference as if the horseman attacks at 18.5% chance each time, 5 times, then 5 X 0.185 = 0.926, a lot bigger chance of wasting the tankers.

Sorry for being such a dummy but I'm having a brain cramp right now .... probablility and statistics were never my strong suit (you know I stay away from Las Vegas!)

Thanks for your help.
:o:
 
Originally posted by DarkwingGT
I had 4 Pikemen in each city, was more advanced then them (though they did have Knights). Ok, so what are the odds of this:

Town of size 12, with Walls. Fortified Pikeman.

Persians come in, attacks my town with a Knight. In four turns proceeds to kill everyone of my Pikeman.


Do units get a defensive bonus for being fortified? Could not find it in the book. If it is a size 12 or less town, it gets 50% I believe. Do they round down 3*1.5 = 4? Now the odds are even. Of course, that is per combat, so they would have to win a lot of combats.

I rarely see anything like this. Is it luck, a problem with the randomizer, are there other factors that were overlooked, or do we not really know how the combat system works?

(PS. This has nothing to do with the problem of people who leave their tanks wandering solo in enemy territory. Believe it or not, tanks are easy to destroy when isolated.)
 
IIRC fortified units do get a bonus to defense.

What's frustrating to me is even when I do think in terms of attack and defense rather than unit types, the numbers still work in my favor yet I lose. Maybe it's just the random number generator on my machine sucks, but that's not something I can control. Besides, random numbers should be generated based on a reproducible algorithm given the same seed. Hence, if we run the same random algorithm on different machines with the same seed, it should produce the same string of random numbers.
(I'm a Developer for a living :)). That's how network games work, the random number generators are all initialized with a common seed so that all players on the game will get the same results.
 
Gruntboy,

Thanks for the analysis. I am living with it, just finding it not as fun. That's all.

Also, this game has never been about Attack 18 vs Defense 4. It is a game of technologies, that once discovered, allows for advanced units. Thus, when I get modern tanks, I want to ROLL over less advanced units. I am not talking about infantry or even all the way back to riflemen. But losing to pikemen, spearment, and knights?! That's crap and not any fun to boot.

For this game to garner the following *IMHO* that the previous had, it needs to fix this. If not, there is VERY little point to upgrade your units.

Take care all and thanks!
 
I've been following this discussion with great interest. I sometimes wonder if combat results are somewhat pre-determined before hand....or specific to certain civs.

In my current game, I was playing Egyptians, and the Germans declared war on me...I didn't take kindly to their trespassing and told them in no uncertain terms :)

Anyway, he had ironclads....so did I. Trouble was, it took 4 ironclads to sink one of his! Happened over several turns, depite reloading and trying different moves before attacking. Needless to say, at those odds, my navy were soon obliterated :mad:

The next turn, one of my cities finally completed a sub and I sent it to attack the enemy galley loitering around my territorial waters (probably on a spying mission). Well wadaya know? The arrow firing galley sunk my sub?!!!

This weird combat results only affected this one game, though, never had such extreme results in my other games.
 
Gruntboy is just showing you the middle exponents (or what ever its called)

Anyway he is calcualting like this:
18.5% chance to inflict a hit means 81.5% to fail.

81.5%^5=35.9% This is the chance to not inflict a hit at all.

1-(81.5%^5)= 64.1% to hit one time.
 
Its been a whilse since I did stats/probability but its quite easy to do.

Darkwing: Pikeman no longer get x2 bonus vs cavalty, they just have D3 as opposed to spearman D2.

Veteran spearman garrison, city(or town with walls), plain/grassland(?) Vs Veteran knight
=A / (A+D+D*(terrain modifiers))
=4 / (4 + 3 + 3*(1 + 0.25 + 0.1))
=36.2% chance of knight hitting once.
=63.8% chance of pikeman hitting once.

Multiple probabilities calculated thus:

Work out the potential scenarios. For 1 pikeman to be hit 4 times and hit the knight only twice, possible outcomes are (H for knight hit, M for Knight miss/pike hit): NOTE you must end with a hit!

MMHHHH
HMMHHH
HHMMHH
HHHMMH
MHMHHH
MHHMHH
MHHHMH
HMHMHH
HMHHMH
HHMHMH

Since each of these sequences has the following probability (you find the product of the probabilities) - 2 misses and 4 hits, or 36.2% * 36. 2% * 36.2%* 36.2%* 63.8%* 63.8% - you can multiply the answer by 10 (number of possilbe outcomes).

= 7.0% that the pikeman will be defeated with 2 HP damage to the knight.

This becomes a longer process over multiple battles - did the knight take 0 HP first battle, 2 the next, or 1 HP then 1 HP etc. etc.

But then you have to go on an defeat 3 more pikeman with 0 hits to yourself! Which I ain't going to work out. The probability of 12 hits in a row at 36.2% = 0.001%.

Something fishy there.

PS I'm also forgetting the knight can retreat - how many Knights attacked you Darkwing?
 
I'm pretty sure it was just one. Multiple Knights would attack multiple times, no? This was just one attack a turn. Even if it was 2, the odds are pretty bad against two Knights winning versus 4 Pikeman.

BTW, the next time something really screwy happens, I'll post the savegame. I will of course test the savegame first to ensure I get the same results each time (which I'm sure it will, it seems like all results are pre-determined). Since the savegames are quite large (2 MB) I will post a link to my website.

Also, I'm not going to have internet access for a week as of next week, so I'll have plenty of time to play Civ3 to get savegames with screwy combat results. :)
 
Sorry for this really probably stupid question but I just don't get it

There are a couple of combat calculators out there. You can take a look at how they guts of the calculations are done. In the Excel one you should be able to follow through and see where and how the odds are summed without too much trouble.
 
puwen, Gruntboy and Loopy-

Thanks for the help/comments. I's Apprecitates' It!

:beer:
 
If you ZIP the savegame, it will shrink to about 350Kb, which is small enough to post directly here.
 
Originally posted by Gruntboy
I don't know about any bugs but here is some maths that gives you an idea of what attackers are up against.

There are 2 examples of siege combat for each era, each involving regular units. The first (a) is a fortified town (or city) on a plain with a garrisoned unit. The second (b) is a metropolis on hills behind a river with a garrisoned unit. The latter may be anachronistic for ancient or medieval era combat but it could be possible in games where the AI does not upgrade troops, the player is technologically advanced or just representative of a difficult fight – a mountain top fortress perhaps.

The calculations for each round of combat in the examples are as follows:

(a) Probability of attacker inflicting 1 hit point of damage =
A / (A + D + D *(0.5 + 0.1 + 0.25))

Probability of defender inflicting 1 HP damage = 1-(a)


(b) Probability of attacker inflicting 1 HP damage =
A / (A + D + D*(1 + 0.5 + 0.25 + 0.25))

Probability of defender inflicting 1 HP damage = 1-(b)


Era /Units /A /D
Ancient Swordsman Vs Spearman 3 2
Medieval Longbowman Vs Pikeman 4 3
Industrial Cavalry Vs Rifleman 6 4
Modern Tank Vs Infantry 16 10


The probability of a particular outcome is thus calculated as ((product of all Hit Probabilities) * (X)), where X = number of different outcomes.

Example a Attacker wins
Damage /0 /1 /2 /Any Win
Ancient 9.0% 14.9% 16.4% 40.3%
Medieval 7.3% 12.8% 14.9% 35.0%
Industrial 9.0% 14.9% 16.4% 40.3%
Modern 10.0% 16.0% 17.2% 43.2%
____________________________________________________

HiYa Gruntboy,

I like your little equations at the start. Your example, for the first case "a", is a the fortified town (or city) on a plain with a garrisoned unit. The city walls of a town OR, a city, gives +50% to DF (defense factor), the plains +10% and the garrisoning a +25%. So you shows this as:

A / [A + D + D*(0.5+0.1+0.25)]

which would be the same as A / [A + D*1.85]

Your adding 50% of the original unit DF as the walls/city size bonus to the original DF, 10% for the plains, etc.

:confused:BUT-
pg. 110 in the manual says "Terrain bonuses are figured in BEFORE the city size and Walls take effect". (Now, I admit, all because the manual says it doesn't mean it is whats actually happening!)
Your approach adds a 50% bonus of the ORIGINAL DF, (not the DF increased by 10% for the plains), for the effect of the city walls. Shouldn't it be a +50% increase OF a 10% increased DF, not the original DF? (In other words, isn't the effect of the walls compounded with terrain, that is multiplied, not added?) Now, thats a small amount here, but in example 2
with the Metropolis on hills, its a 100% increase for the metropolis (instead of 50% for city or town with walls) and 50% for the Hills (instead of 10% for plains). That will be a lot bigger difference between the two methods (adding the effects vs. multiple or compounding the effects). Plus the additional terrain effect of being behind the river. (The effect of which I simply CANNOT find in the maual, whoo hoo whats new there, I'm not where I can check the editor for that- what IS that effect?). Then there is also the case of a unit being garrisoned- is this before or after the city size/town walls effect is taken into account - the manual only specifices "terrain effects " in the statement.

Another case of the manual being poorly written. (I won't go into the number of times I've wanted to look something up and found NO INDEX Entry for rather basic, important things, eg, there is no entry for "Golden Era" if you wanted to find comments on that, etc.)

Anyway, if the manual statement is the ways its actually done, then this makes the defense even stronger as the effect will be to increase the value of the DF or rather the denonometer (sorry) of the chance to hit fraction. Wouldn't that slighly change the way you write out the expression?

I'm no mathmetician but if terrain bonus's ARE calculated BEFORE effect of city walls it seems like the results will be worse then your numbers, but I could be in error here- as I said I didn't read in math.

Whats your take on this, am I in left field??
Thanks for your thoughts.
Sorry for the long post.
 
Royfurr - I honestly don't know. :D

You are right, adding the terrain modifier first would then increase defensive power *even more* when city/garrision status was added!

I took the stance it was simultaneous calculation - based on the excel spreadsheet posted by someone on the news front page.

Further to your earlier post ("What I don't understand are the 4 lower chances"). The %'s change because you are calculating a flow of probabilities. Its not just a case of saying the horseman will hit 18.5% of the time, twice.

Its a case of saying the Horseman has a given number of chances of hitting because of available hitpoints. Therefore, the probability of, say, missing the tank once, *then* hitting the tank, is 82.5%*18.5%=15.3% (a different probability to the horseman scoring a first hit, 18.5%). The probability of *either* of these happening is the sum, 15.3+18.5 = 33.8%.

There is a different probability of each outcome (the product of the combinations of hits and misses) and the probability of *any* of them occuring is a sum. There is a 100% chance that one side will lose (or retreat), for example. :)
 
Back
Top Bottom