Thread Tools
Old March 5, 2001, 22:01   #31
Kull
lifer
King
 
Local Time: 23:13
Local Date: October 30, 2010
Join Date: Mar 1999
Location: El Paso, TX USA
Posts: 1,751
DaveV: It's a nice little program, but it would be better still if it allowed you to enter ALL the modifiers (city walls, defensive terrain, fortified, etc). Kind of a shock seeing that old Win31 design again! I'm still holding out hope for a comprehensive Battle Odds spreadsheet (a standalone program would be ultra cool).

CyberChrist: So next time I'm launching an amphibious assault all I have to do is sail my carrier up next to the city and fire away with bombers? And his fighter defenses are toast? Sneaky, sneaky!!!

Kull is offline  
Old March 5, 2001, 23:29   #32
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:13
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
quote:

Originally posted by Captain Nemo on 03-05-2001 08:43 PM
I agree that I did not take into account the special defense/attack bonus related to shore bombardment/ships caught in port/2x defense/air defense etc...


I tested Dave's formula using your Battleship vs. Mech. Inf. example. The Battleships won 20 out of 20 and sustained an average of 10 damage. Following this I changed the Battleship's firepower to 1 (form 2) and re-ran the test. The results of the second test were the same except the Battleships sustained an average of 11 damage.

According to the book, ships engaged in shore bombardment have their firepower reduced to 1. I think we can conclude that this much is true.

quote:

Where does this .125 come in? Does it just give the defender the victory when there is a tied die roll? If it truly is designed as a die roll are we talking about a 6 sided die? As in Roll A (1-6) x a > Roll D (1-6) x d for the attacker to win? This would give the 1a vs 1d battle a 21-to-15 edge to the defender but not 80-20?


.125 comes from the a tieing result of an 8 sided dice.
William Keenan is offline  
Old March 6, 2001, 00:45   #33
Captain Nemo
Prince
 
Local Time: 06:13
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Red Front
Posts: 556
I ran a number of combat tests to determine if the above formulas are correct. Since I ran each combat 200 times and averaged the damage sustained by the victor and the number of times each side won I can tell you that (a)/(a+d+0.125) only works when a=d. As soon as a and d diverge the odds become heavily weighted towards the unit with the higher stat.

After a little additional analysis I came up with this formula:

Odds= Max(2a-d,a)/(Max(2d-a,d)+Max(2a-d,a)+0.125)
When I apply this number to the binomial distribution formula the results come out right on the money including the damage numbers.

This amounts to giving the better unit an extra bonus equal to it's advantage over the weaker unit, for example a 6a attacking a 1d unit is really equivalent to an 11a unit attacking a 1d unit.

One of my tests had 15a,2f,2h attacking 9d,2f,2h and the 15a units were basically never loosing when they should have lost 15% of the time.

I tried the reverse with 2a,1f,1h attacking 4d,1f,1h and the 4d were also doing much better than the stats showed. I expected them to loose about 5% of the time in the test they only lost once in 200 tries or 0.5% which is too much of a swing to be explained away.

I am not 100% sure that this is it but I am pretty sure the simpler formula is not correct


Captain Nemo is offline  
Old March 6, 2001, 02:00   #34
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 00:13
Local Date: October 31, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
I think the Unified Field Theory is simpler!
techumseh is offline  
Old March 6, 2001, 08:48   #35
Gothmog
Scenario League / Civ2-Creation
Prince
 
Gothmog's Avatar
 
Local Time: 02:13
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Minas Morgul
Posts: 421
Eight side die? Does this mean there is a Dungeons & Dragons influence on CIV II?
Gothmog is offline  
Old March 6, 2001, 09:00   #36
DaveV
Apolytoners Hall of Fame
King
 
DaveV's Avatar
 
Local Time: 02:13
Local Date: October 31, 2010
Join Date: Dec 1969
Location: USA - EDT (GMT-5)
Posts: 2,051
It's not really an 8-sided die; it's an n-sided die, where n is AF*8 for the attacker, DF*8 for the defender. AF is attack times any bonuses; DF is defense times any bonuses. The attacker and defender each rolls his die; if there's a tie, the defender wins (thus the -.125 for the attacker and +.125 for the defender).

Kull - I think Mark's program requires the user to calculate all of the bonuses before running the program. I agree that something like a spreadsheet would be a good way to show all the special cases.
DaveV is offline  
Old March 6, 2001, 12:36   #37
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:13
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
quote:

Originally posted by Captain Nemo on 03-05-2001 11:45 PM
After a little additional analysis I came up with this formula:

Odds= Max(2a-d,a)/(Max(2d-a,d)+Max(2a-d,a)+0.125)

I am not 100% sure that this is it but I am pretty sure the simpler formula is not correct


That formula looks like a winner to me! Your a genius, Nemo!

How would you setup the binomial distribution formula so that the results include the damage numbers?
William Keenan is offline  
Old March 6, 2001, 12:59   #38
CyberChrist
Warlord
 
Local Time: 07:13
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Denmark
Posts: 108
quote:

Originally posted by Kull on 03-05-2001 09:01 PM
So next time I'm launching an amphibious assault all I have to do is sail my carrier up next to the city and fire away with bombers? And his fighter defenses are toast? Sneaky, sneaky!!!


Ah no, that was not what I was trying to say.
Any air unit with the inherit ability to stay in the air for only 1 turn, will have its DF increased to x4 the normal DF value when defending a city against attacks from air units, with the inherit ability to stay in the air for 2 or more turns.
How long the attacking units have actually stayed in the air should not matter, it is the inherit ability of the units that determine this.

There is still a great advantage from attacking with bombers from a carrier anchored right outside the city though. The bombers can attack every turn - if they survive their attacks of course
CyberChrist is offline  
Old March 6, 2001, 16:00   #39
Miner
Prince
 
Miner's Avatar
 
Local Time: 07:13
Local Date: October 31, 2010
Join Date: Jul 1999
Location: of London
Posts: 375
quote:

Originally posted by William Keenan on 03-06-2001 12:39 PM
The range of an air unit has nothing to do with the x4 on city defence. Any unit air or ground (not tested with naval) will get the x4 bounus defending a city if it has the fighter flag (can attack air units) turned on.




The voice of reason!

Miner is offline  
Old March 6, 2001, 16:32   #40
Kull
lifer
King
 
Local Time: 23:13
Local Date: October 30, 2010
Join Date: Mar 1999
Location: El Paso, TX USA
Posts: 1,751
Duh! I read "turns in the air" as "moves in the air".

Still, the multiple attacks by Bomber is interesting. That may explain some of Xin Yu's success as Japan in the first 2194 Days PBEM game!
Kull is offline  
Old March 6, 2001, 16:33   #41
Kull
lifer
King
 
Local Time: 23:13
Local Date: October 30, 2010
Join Date: Mar 1999
Location: El Paso, TX USA
Posts: 1,751
DP (This is what happens when you work with 2 PCs at the same time....keeping track of which keyboard is which gets problematic!)
[This message has been edited by Kull (edited March 06, 2001).]
Kull is offline  
Old March 6, 2001, 18:15   #42
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 22:13
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
quote:

Originally posted by Kull on 03-06-2001 03:32 PM
Still, the multiple attacks by Bomber is interesting. That may explain some of Xin Yu's success as Japan in the first 2194 Days PBEM game!

A bomber (with range 2 and up) can only attack once per turn. The effect of carriers and airbases (if you move a bomber to a land square and wait for your engineers to finish the airbase before attacking) only allows it to attack EVERY turn instead of coming back to base every once in a while. My success as Japan was due to that I moved my carriers close to the targets before attacking, thus a fighter (not bomber!) could attack multiple times per turn.
Xin Yu is offline  
Old March 7, 2001, 01:18   #43
Captain Nemo
Prince
 
Local Time: 06:13
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Red Front
Posts: 556
As to the spreadsheet calculating the odds and damage here is what I did:

4 columns for the attacker (aa,ad,af,ah)
4 columns for the defender (da,dd,df,dh)

(Although ad for the attacker and da for the defender are not used, it makes it easier to copy a unit from the attacker to defender column to see how it fares in the opposite role)

Next two columns calculate the "corrected" a and d factors, Ca and Cd based on the difference between aa and dd

Ca=Max(2*aa-dd,aa)
Cd=Max(2*dd-aa,dd)

Next column, the odds of the attacker winning a round:

odds=Ca/(Ca+Cd+0.125) (Display in percent)

Next the number of rounds won required for Attacker to kill defender:

aw=dh*10/af

Next the number of rounds won required for Defender to kill Attacker:

dw=ah*10/df

Next the "BIG" formula the Attacker's odds to win the entire battle:

ODDS=BINOMDIST(dw-1,aw+dw-1,1-odds,True)

Translates as "odds that Defender wins dw-1 or less rounds out of aw+dw-1 rounds considering that the odds of the defender to win each round are 1-odds" (Changing True to False would change "wins dw-1 or less" to "wins exactly dw-1")

Now the average damage sustained by the attacker by the time the defender is dead: aw*(1-odds)/odds * df (odds=odds to win one round)

And the average damage sustained by the defender by the time the attacker is dead: dw*odds/(1-odds) * af

Of course for the loser of the ODDS equation this number will exceed the unit's hitpoints.

This should allow anyone with basic knowledge of EXCEL to reproduce the spreadsheet. I copied the formulas down each column so I can display multiple combats situations simultaneously. I also added a column before the attacker and defender with the respective unit names so I can keep track of what is what.

Did I put everyone to sleep?



Captain Nemo is offline  
Old March 7, 2001, 01:39   #44
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:13
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
quote:

Ah no, that was not what I was trying to say.
Any air unit with the inherit ability to stay in the air for only 1 turn, will have its DF increased to x4 the normal DF value when defending a city against attacks from air units, with the inherit ability to stay in the air for 2 or more turns.
How long the attacking units have actually stayed in the air should not matter, it is the inherit ability of the units that determine this.


The range of an air unit has nothing to do with the x4 on city defence. Any unit air or ground (not tested with naval) will get the x4 bounus defending a city if it has the fighter flag (can attack air units) turned on.

William Keenan is offline  
Old March 7, 2001, 15:22   #45
William Keenan
Scenario League / Civ2-Creation
Prince
 
William Keenan's Avatar
 
Local Time: 01:13
Local Date: October 31, 2010
Join Date: Sep 1999
Location: New Jersey, USA, Earth, Sol, Milky Way
Posts: 705
Zzzzz ... *** WAKES UP *** ... Great stuff, Nemo!


No really, it is great, a huge help. Thanks.
William Keenan is offline  
Old March 26, 2001, 17:21   #46
markusf
King
 
markusf's Avatar
 
Local Time: 06:13
Local Date: October 31, 2010
Join Date: Oct 1999
Posts: 1,721
I think the terrian your attacking from is also taken into account.
markusf is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:13.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team