Thread Tools
Old April 8, 2000, 00:40   #31
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 15:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
I have another possible explanation: The pikemen flag works (+50% defense) if the attacker has movement 2 and its hp and fp are equal.

In 2194 days of wars. German SS stormtroopers has a/d/m/h/f=7/5/2/2/2, pikemen flag. So is the Soviet Red Guard. The attacker always lose to the defender, indicating that the flag works in this case.
[This message has been edited by Xin Yu (edited April 07, 2000).]
Xin Yu is offline  
Old April 10, 2000, 09:17   #32
Sieve Too
Prince
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: New Hampshire, USA
Posts: 917
This was tested extensively several month ago and IIRC, the rationale as to why a barb leader or diplo sometimes wins goes like this:

The odds of the attacker winning a round of battle are not A/(A+D) where A and D are the strength of the Attacker and Defender respectively. Since D=0 for barb leaders, even when you consider any other bonuses, the above formula from the manual must be incorrect.

A hypothesis was put forth that a round of combat was won by the attacker if and only if rnd(A*k) > rnd(D*k), where A and D are the Attacker's and Defender's strength and k is some constant, later found to be 8, and rnd(X) is a function that returns an integer (pseudo) random value between 0 and X-1. Of particular note is the fact that when the two random values returned from rnd(X) are equal, the defender wins the round. That is, ties go to the defender.

Someone with more time and skill than me worked through the odds and tested it extensively with 100(!) units. The hyposthesis held. Therefore, any unit with 0 defense will sometimes win a round of battle when attacked. If the unit also has high firepower and/or hitpoints, while its attacker has low fp, hp and attack strength, the 0D unit may sometimes even win.
Sieve Too is offline  
Old April 10, 2000, 21:43   #33
mindseye
King
 
mindseye's Avatar
 
Local Time: 07:33
Local Date: October 31, 2010
Join Date: Apr 1999
Location: A Yankee living in Shanghai
Posts: 1,149
No wonder! And here I was all the time thinking it was just

(log(A-(5A*(tan(Ax+Dx/D-Dx)+(x(D*cosAD))/(pi-a)/2)*(100-rnd(100))))+3


-mindseye :-)
mindseye is offline  
Old April 11, 2000, 00:39   #34
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Umm. Why dont u just say zero aint really zero.
Neon Deon is offline  
Old April 11, 2000, 03:07   #35
The Mad Monk
Emperor
 
The Mad Monk's Avatar
 
Local Time: 18:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Flyover Country
Posts: 4,659
Because that's not what he's saying; it's not that a defender of strength zero rises to a higher strength, it's that a non-zero attacker can drop to zero (resulting in a tie that the defender wins)
The Mad Monk is offline  
Old April 11, 2000, 13:00   #36
Seeker
Emperor
 
Seeker's Avatar
 
Local Time: 18:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Yongsan-Gu, Seoul
Posts: 3,647
Creates an interesting idea for a custom unit in a scenario. Imagine a unit with 0 defense, but very high FP and HP. Against units with 1 hp it should win, but against units with higher FP and HP values it should mostly use.

ideas: pillbox, bunker, sea mines, other immobile units designed to kill only units of certain type (the low HP and FP ones).

example, barbed wire could be made 0d, 8hp 8 fp, versus infantry with say 5 att, 1 hp 1 fp.
Seeker is offline  
Old April 11, 2000, 18:37   #37
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Ok im a little slow with zeros but I always thought 0+0 = 0 just as 0*0 = 0 and 0=0. Therefore u would have no formula at all. You are adding K to the mix making zero not zero. (0+K). Zero is not zero. Unless of course K is zero but then 0 would never win.
Well back to the crash dummies.
Neon Deon is offline  
Old April 12, 2000, 00:42   #38
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Diplos (attack 0)vs. higher attack values
I was curious to see how diplos win a battle so i ran a little test.
First let me say this about HIT POINTS and FIRE POWER. A hit point is not 1 it is 10.
so a warior would actually have 10.Firepower is how many hps a unit will lose per round.
So a warior with 1fp would have to win 10 rounds to kill a fellow warior. A unit with 2fp would have to win 5 rounds. 5fp 2 rounds. etc etc.
The formula for combat is located in the combat section of the manual. In it it uses the example of an elephant attacking a phalanx with no modifiers. The percentage chance of an elephant beating the phalanx is 66.7% in one round of combat. A/(A+D) OR 4/(4+2).
I did at least 1000 rounds of combat per attack value. vs. the diplo.
.333af (1 af with 1/3movement) 47.01%
.667af (1 af with 2.3movement) 20.51%
1af 11.67%
2af 5.84%

The % on right indicates the diplos win %.
This test was performed with both attacker
and defender having 1fp.
Note: this does not mean that a horse will lose 6 times out of 100 to a diplo but that
a diplo has about a 6% chance of winning one
round of combat with the min. # of rounds being 10. The 62 Mets could win a game against the the 98 Yankees but could the Mets win 10 before they lost 10???
However, as u aproach 50 %, the combat rounds
will mirror the unit losses.
So MR. warior attacking at 1/3 strength could
end up in the morgue
PS: IF rnd(a*k) > rnd(d*k) then attacker wins combat except for a tie is true. Then it would not matter what your attack factor is vs. a zero. but it does. According to that formula a zero unit should never approach 50% vs a positve number much less have a different W/L % of different attack values. To say the attack value drops to zero is saying that the event is totaly random and should not adhere to a .333 unit
having more losses than a 2 unit or 1 unit or any number for that matter. Why because the right side of the equation is always 0.
(any number multiplied by zero is zero).
The left side can only be = to the right if the left rnd number is 0. this means the attack value is a mute point. If you say that the random number is never = zero then the left side is always more than the right cause the right is always 0 thus implying that the attacker always wins.

[This message has been edited by Neon Deon (edited April 12, 2000).]
Neon Deon is offline  
Old April 12, 2000, 13:11   #39
Sieve Too
Prince
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: New Hampshire, USA
Posts: 917
quote:

A/(A+D) OR 4/(4+2)


Although this is the forumla stated in the book, it is not the correct one. See link below.


quote:

IF rnd(a*k) > rnd(d*k) then attacker wins combat except for a tie is true. Then it would not matter what your attack factor is vs. a zero. but it does.


Not exactly. Remember that there are two calls to rnd(X) in the above forumla, one for the attacker (X=A*k) and one for the defender (X=D*k). It is true that for a D=0 unit like a Diplo, rnd(D*k)=0 everytime. But note that rnd(A*k) will also return 0 approximately 1 out of every A*k calls. When both calls to rnd(X) return 0, the defender wins the round, just like the '62 Mets winning against the '98 Yankees.

For a (very) detailed look at CivII combat odds, see below:
http://apolyton.net/forums/Forum1/HTML/000624.html
[This message has been edited by Sieve Too (edited April 12, 2000).]
Sieve Too is offline  
Old April 12, 2000, 17:47   #40
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 15:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
Does anybody know when will the AI be 'scared away' from your units? I got most AI units scared away from my fortifiec positions in Red Front. Must be that the AI calculated the odds and decided not to attack.
Xin Yu is offline  
Old April 12, 2000, 21:05   #41
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Sieve,
Thanks for the link.
However, I think you guyz are off.
1) The proof of a Probablility must = one.
2) There are no chances taken away IE: positive numbers only.
3) 0 is not a positive number
4) The larger the pool(test) the more accurate.
5) If it aint broke don't fix it
6) Lowest fraction used is 1/8 or .125
7) The proof of the manual formula is...

1=[a/(a+d)]+[d/(d+a)]

8) civ 2 design wanted some units that could not attack but at the same time have all units be attacked.
9)Units with defense 0 defend at .125!!!

Test 1 Diplo. vs war. d=.125 a=1
book formula Diplo wins 11.11% of rounds
crash dummies Diplo wins 11.67% of rounds
Total number of rounds 1,132 diplo wins 132

Test 2 Diplo. vs Hrs. d=.125 a=2
book formula Diplo wins 5.88% of rounds
crash dummies Diplo wins 5.84% of rounds
Total number of rounds 1,062 diplo wins 62

Test 3 Diplo. vs Cha. d=.125 a=3
book formula Diplo wins 4.00% of rounds
crash dummies Diplo wins 3.90% of rounds
Total number of rounds 999 diplo wins 39

Note i used the defender as win %
D/(a+d)

IF IT AINT BROKE DONT FIX IT!

Neon Deon is offline  
Old April 13, 2000, 13:42   #42
Sieve Too
Prince
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: New Hampshire, USA
Posts: 917
1) The proof of a Probablility must = one.

And it is. It's just not as simple as the forumla in the manual. Both the odds for the attacker winning a round and the odds of defender winning a round are functions of the attacker's and defender's strength. And in every case, either the attacker or the defender wins. Thus, Awin(A,D)+ Dwin(A,D) = 1. The above link has another link to a spread sheet containing the exact forumlas for Awin(A,D) and Dwin(A,D)

2) There are no chances taken away IE: positive numbers only.
3) 0 is not a positive number


I'm not sure what you're getting at here.

4) The larger the pool(test) the more accurate.

There are well over 1000 tests with 10000's of rounds in the above link.

5) If it aint broke don't fix it

Unless it is broke Note that A/(A+D) is disproved in the above link, specifically it does not hold for Cavalry attacking Armor. The manual even states that A/(A+D) is just an approximation and that turns out to be the case here.

6) Lowest fraction used is 1/8 or .125

Actually, the lowest is 1/16 when you combine .5 bonuses from vets, terrain, fortifying and Pikeman bonus. In any case the fraction is just a modifier to defense strength, it doesn't necessarily provide a lower limit to D.

9)Units with defense 0 defend at .125!!!

Unless there is another formula that fits all cases better. Also see below:

Test 1 Diplo. vs war. d=.125 a=1
book formula Diplo wins 11.11% of rounds
crash dummies Diplo wins 11.67% of rounds
Total number of rounds 1,132 diplo wins 132


The difference between 11.11% and 11.67% is 0.56% or just 6.3 rounds. 6.3 rounds out of 1132 is too small to claim a statistical difference. Random chance could have produced the 6 round difference.

Test 2 Diplo. vs Hrs. d=.125 a=2 ...

Here the delta is just 0.04% of 1062 rounds or 0.42 rounds!

Test 3 Diplo. vs Cha. d=.125 a=3 ...

Delta is just 0.1% of 999 rounds or 0.999 rounds.

See the above link for an explanation on how a Diplomat can have D=0 and still sometimes win.
Sieve Too is offline  
Old April 13, 2000, 15:25   #43
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Sieve,
I looked at this link again.
In it i found this:
Eggman post 4/27/99
diplo vs warrior
Warrior wins 277 out of 351 78.9%
eggs k formula predicts 80.3%

My sample was almost 4 times larger than his!
warrior wins 1000 our of 1132 88.33%

Gee his formula is off by 8%.

Cant find that out of 10,000 sample. But im still looking.

Also my diplo test covers being attacked by a horse and a charriot. Ill get back to u
on some more exiting posts in that link.

Neon Deon is offline  
Old April 14, 2000, 14:30   #44
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
Xin,
I tried to test for at what odds the AI wont
attack. However it would seem that the AI uses a number of if then statements to determine when and when not to attack.
One X unit will sometimes back off and sometimes it will attack. Also the AI will build its forces of x units up then attack all at once.
So I flipped the question around
The attack value must be more > or = to winning 33.3%chance of combat rounds for the ai to attack everytime.
This is a guess not fact. I am still trying to get the ai to behave so i can run a big enough sample;*
THE CRASH DUMMIES GET A BREAK

Neon Deon is offline  
Old April 20, 2000, 10:27   #45
Civfan
Civilization II MultiplayerCivilization II PBEM
Prince
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Sep 1999
Location: Toronto, Canada
Posts: 831
Pikeman unit protects against all units with a move factor of 2. How about a move factor of 2 but with partroopers (all squares treated as roads)?
Civfan is offline  
Old April 20, 2000, 13:21   #46
Sten Sture
Emperor
 
Sten Sture's Avatar
 
Local Time: 15:33
Local Date: October 30, 2010
Join Date: Mar 1999
Location: SF, CA don't call it frisco... Striker!!
Posts: 3,617
Again I am wondering about =2 or >=2

After reading all of these posts I am still wondering about the pikeman defense as it is used for Anti-tank weaponry. In RedFront there is an AT gun that is 7a3d*1m 2h4f, the * being the pike flag. If I read this thread correctly the pike flag has no effect defending against a Panzer tank 10a6d4m 3h3f or something like that...

Also in the RedFront scenario a partizan unit (IIRC) 4h4d1m 2h2f - all as road, could easily take out immoble zero attack placements like hedgehogs 0a18d0m 3h3f, and mobile infantry units 0a10d5m 2h2f. I am sure that I have some of the statistical details askew, but I have no idea why these zero attack units are susceptible to partizans...
Sten Sture is offline  
Old April 20, 2000, 13:54   #47
Seeker
Emperor
 
Seeker's Avatar
 
Local Time: 18:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Yongsan-Gu, Seoul
Posts: 3,647
That's because in Winter in Red Front Partisans have a higher attack and german units have a lower defense. Try attacking a Panzer with a non-vet partisan in summer.
Seeker is offline  
Old April 20, 2000, 14:35   #48
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 15:33
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
SS: Look at the Misc.txt in your civ2 directory and you will find:

partisan attack factor is vastly increased when attacking noncombat units (diplo, settler, caravan,...). Zero-attack units are considered non-combat in civ2. So your partisans rules the winter in RF.

Mede units in Spartacus are partisans as well, so they can attack roman garrisons (0 attack) better than archers. They even had amphibious ability!
Xin Yu is offline  
Old April 20, 2000, 14:52   #49
Neon Deon
Chieftain
 
Local Time: 23:33
Local Date: October 30, 2010
Join Date: Mar 2000
Location: Cali
Posts: 76
The pikemen's defense bonus only works on units with 1 hit and one hit point only.
Neon Deon is offline  
Old April 25, 2000, 21:37   #50
SilverDragon
Guest
 
Posts: n/a
N.D. -

Well Im glad you cleared that up, becaus I was wondering. Would my pikeman get a x2 bonus against an Armor? An armor is in the 'horse unit' line. So, it wouldn't get the bonus. Anyway, if my pikes were ever up against armors, especially since I only have SP, I would never show my screen name here again.

------------------
Long live the Communists!
-- SilverDragon
 
 

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 19:33.


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