View Full Version: Death calculation bug ........

War Of Empires > Non Reg WOE Discussions > Death calculation bug ........


Title: Death calculation bug ........
Description: deaths from battle are not equivalent.


Kaldar - June 21, 2008 09:57 PM (GMT)
Ok here is the situation followed by the math. Cataclysm attacks me in the alpha version with half the troop number i have , both of us at 100 stamina. This last round was the most rediculous of all his attack flurries. He lost 15 archers ; I lost 16 cavalry

First of all aren't I correct when I remember that archers have the losest health base and cavalry have the highest base ? I find it completely rediculous that 860 archers are killing more cavalry than 1728 cavalry are killing of them.... what is this the Alamo ?

Will make more sense after the math part ..... Cataclysm please excuse me for posting scout information here but it is an alpha and is important to getting this resolved .... i'm convinced it is probably broken in the regular version as well.


the troop numbers don't match up exactly with the time of the battle but i will try and compensate for that .....


850 Archers 72,209 / 54,884


Attack / Archer : 84.95
Health / Archer : 64.57


1694 Cavalry 122,618 / 104,014

Attack / Cavalry : 72.38
Health / Cavalry : 61.40


matchup from log : 860 vs. 1728

from numbers above then .....

Archer attack : 73,057
Cavalry attack : 125,072


so let's start with the obvious the cavalry attack strength is 71 % higher than the archer attack strength.

advantage from damage dealt in battle ....... 105,475 vs. 84,165 for a whopping 25% advantage in damage done

71% higher attack strength dealt 25% more damage.

Calculating damage dealt as a % of attack strength :

Archers : 115% of attack strength ( massive attack)
Cavalry : 84% of attack strength ( strong attack)


comparing to the following raid where obviously my stamina was much lower .....
approximately 82. with 1712 troops on a hesitant attack and roughly 82 stamina I dealt out 82,287 damage for a decrease in only 5% from the previous attack.

So I go from strong to hesitant ; 100 stamina to 82 ; attack damage only drops 5%


Back to the deaths from the first battle.

Differnce in health my troops to his .......... he has 105.2% the individual health of my troops. If we bump my damage dealt down by that amount we can evenly compare the damages done to the deaths seen.


105,475 to 100,250 evenly compared to his 84,165

my damage is still 119 % of his after adjusting for his health advantage. What does this mean ? It means for every 1 of my guys dead you would expect 1.19 of his to die.

so ....... range from my dead of 16 you would expect 19 of his to die. His actual deaths ? 15 ..........




Kaldar - June 21, 2008 10:17 PM (GMT)
what i would have expected the battle result to be based on the assumption that the amount of my troops that he killed was correct is :


his attack : (massive 105% A.Strength ) = 76,709 damage
my attack : (strong 100% A.Strength ) = 125,072 damage

my attack reduced to compensate for health advantage he holds : 118,800



if 84,165 kills 16 then i would expect 1 to die for every 5,260 damage


so final death count would be : 14.58 ~ 14 of mine ; 22.5 ~ 22 of his

Kaldar - June 22, 2008 01:53 PM (GMT)
Is there any particular reason nobody feels the need to comment on a possible bug in the calculation of deaths from a battle ...... considering if there is a bug it is in the regular version too ?

IronFist - June 22, 2008 01:59 PM (GMT)
Give me some time. I will check out the math and everything.

And remember, it's Sunday... Sundays are slow forum days :)

IronFist - June 22, 2008 02:31 PM (GMT)
Alright. The math on the first attack you posted checks out, expected deaths on his side was indeed higher than the end result. However, this is based on the assumption that the attacker gets the same death toll based on damage and troop health as the defender. I'm not sure this is the case. If you're around, message me in-game in V14 (I have no alpha account), and we can do two test attacks and share data to save on scouting.

By the way, it's unclear to me what you are saying about the second attack where you had 82 stamina. Also I'm not sure where the data in your second post comes from.

Bhaal - June 22, 2008 02:35 PM (GMT)
QUOTE
Is there any particular reason nobody feels the need to comment on a possible bug in the calculation of deaths from a battle ...... considering if there is a bug it is in the regular version too ?

I haven't commented because I am rarely online on weekends. And the Alpha version of battles is not like the current running code because all sorts of merc and slave code has been ripped out. So the current running code is just the same code that was running in V13, and should therefore be stable. I will be looking at the Alpha version of the code though to see what the issue is.

Kaldar - June 22, 2008 03:29 PM (GMT)
QUOTE
Also I'm not sure where the data in your second post comes from.



well basically what I am saying in the second post is this ........

105,475 (cavalry) vs. 84,165 (archers)
Archers : 115% of attack strength ( massive attack)
Cavalry : 84% of attack strength ( strong attack)


that was the damage dealt by the attacks as a % of attack strength. I was commenting that I would have expected it to be closer to :


his attack : (massive 105% A.Strength ) = 76,709 damage
my attack : (strong 100% A.Strength ) = 125,072 damage

I don't have the numbers on the multipliers attack strength adds to attack , but my point was that a massive attack doing 115% of attack strength and a Strong attack doing 84% of attack strength is rediculous.

you should get a slight advantage / disadvantage based on your attack status , not a major advantage / disadvantage.

IronFist - June 22, 2008 03:51 PM (GMT)
Okay, so that's actually not so much a bug... but more of a request for change. For the record though, I like the attack status the way it is, it makes it somewhat less predictable whether or not I can beat somebody.

Kaldar - June 22, 2008 05:18 PM (GMT)
Whether or not that part is a bug is dependent on what values Bhaal intended the attack strengths to be , so maybe Bhaal can answer that part for us atleast .....


But , I have complained for quite a while now about inconsistencies in the attacks.

some scenarios i have seen :


I attack someone they defend , I heal up 5 stamina and attack again , they surrender.
I hit someone else to lower stamina 4 or 5 and attack the person again , they defend. Heal up a few stamina , they surrender.

Explain to me how 5 points in stamina can be the difference between defending and surrendering. Unless they are extremely low on stamina .... close to 0 low ........ I just don't get that.


Second scenario :

I 1 turn attack someone 10 times in a row and win all attacks. 10 turn attack and they defend.

There are lots of scenarios that just don't make any sense .... oh one more that is interesting.

I 1 turn they surrender , I 10 turn and they fight ?


edit : Also , with respect to the attack strengths if there is a thread that discusses how they work maybe you could point me to it because i've never quite understood it. I always figured the lower your stamina the lower your attack description would be , but I believe I've seen situations where someone with stamina 100 has fought "hesitant" and someone with 30 stamina has fought "strong" ....... so beats me as to how it works.

IronFist - June 22, 2008 05:46 PM (GMT)
Well uh, that's randomness in action for ya.

Kaldar - June 22, 2008 08:03 PM (GMT)
how do you quantify which is randomness and which is a bug ? Personally , considering you aren't supposed to surrender unless the other person is 40% stronger than you .... I would say a 40% + swing is a bit much for randomness. If a person defends an attack you must assume they are currently stronger than you , if they then surrender on the next attack you must assume you are now 40% stronger than them ?

Like I said ....... nobody has really questioned it

IronFist - June 22, 2008 08:22 PM (GMT)
Where do you even get these figures? I've not seen any randomness above 20% or maybe 25%, both up and down. Also, that 40% surrender figure doesn't look correct to me either, it should be higher.

Kaldar - June 23, 2008 03:04 AM (GMT)
I believe I have seen Bhaal say a few places that the surrender formula looks for the attacking person to have an attack strength of 1.4 times the defender's .....

Alot of the information I have is just from observing and making notations .... i don't have a lot of the information needed , I just see inconsistencies and things that don't make much sense to me.

Ger - June 23, 2008 06:48 PM (GMT)
Bhaal, if i m right, the kill formula is like, take total damage, multiply it for a death modifier that should be around 0.01 for non war damage and 0.025 for war damage, then from the result start killing the weakier troops according to thier modified health total, for example, if i did 20000 damage, multiplied by 0.01 its 200, if the opponent lower layer troops have modified health 21, i will kill 9 (total 189) and lost some damage cause its not enough to kill one more...
Te question is, is the kill modifier fixed and the same for defender than attacker?, there is another factor (besides war damage) that affects the kill modifier?

Look at this numbers, someone attacked me today, i did 16376 damage, and killed 6 (2728 points of damage for each kill), seconds after that, i attacked back, did 21464 damage and killed 10! thats 2146 damage for each kill, with the 16376 damage i did, killing one merc for each 2146 i should have killed 7.5 rounded down 7 when i defended, so it seems that the defender kill modifier is lower than the attacker one, if thats intended, ok, if not, then there is a bug somewhere...

forgot to say that i m talking about normal age, not alpha...

Kaldar - June 23, 2008 07:03 PM (GMT)
To clarify Ger's post ........

If I kill 6 people with 16376 damage then the max kill factor can be calculated as less than killing 7 ...... so 16376 / 7 = 2339

If the kill factor was 2339 he would have killed 7 , so obviously it is less than that.

Using this max kill factor in the next battle .... 21464 / 2339 = 9.18

Therefore , with the same kill factor the max dead possible in the 2nd attack would be 9. Since he killed 10 in the 2nd battle , obviously 2 different quantities are being used for defending and attacking ..........

Q.E.D.

now the only question is why is the attacker being given an advantage in deaths over the defender ?

Bhaal - June 23, 2008 07:06 PM (GMT)
Good question, I will check.

Ger - June 23, 2008 07:06 PM (GMT)
well, you proved that 2 different factors where used, but there could be randomness or another thing that affects the factor used, not necessarily attacking and defending...

Kaldar - June 23, 2008 07:08 PM (GMT)
why would there be so many damn random factors in an attack ..... you throw enough random factors in I could beat you in a raid Ger :P

Bhaal - June 23, 2008 07:45 PM (GMT)
I just ran through some of my own calculations in my past battles in the LIVE AGE against a particular foe and they are dead on whether or not I was attacking or defending.

You have to remember, that you need to get ALL the damage against foe to kill it. In one set of battles against a foe, I noticed it takes about 2500 real damage points to kill one target. So if I score 25,000 damage, 10 foes will die. But if I score only 10,000 damage 4 will die. However, if you use this 2,500 as just an example, there might be a fight where I score 12,499 points of damage. Most people would look at this and naturally expect 5 dead, but since it is still 1 point shy, there would only be 4 dead. So using the above examples, you might have battles that look like:

25,000 damage = 10 dead
10,000 damage = 4 dead
12,499 damage = 4 dead

And something like that would look might odd when you start playing with averages.

Bhaal - June 23, 2008 07:47 PM (GMT)
And regarding Ger's numbers, they still do look off though. Ger, could you please contact me and give me the ID of the target?

Kaldar - June 23, 2008 07:54 PM (GMT)
Actually Bhaal , my last post the one after Ger's did exactly what you just mentioned and proved that while using the max amount possible from the first battle , the result in the second battle is impossible.


Ger - June 23, 2008 07:55 PM (GMT)
QUOTE (Bhaal @ Jun 23 2008, 07:47 PM)
And regarding Ger's numbers, they still do look off though. Ger, could you please contact me and give me the ID of the target?

sent one pm with the id from the target, then realized i could send you the id from the attacks, so i sent them aswell...

Bhaal - June 24, 2008 01:18 PM (GMT)
I found the glitch. It was in the calculation of the amount of bonus that Armoury was providing the defender. Good catch!!

Kaldar - June 24, 2008 01:49 PM (GMT)
Sweet vindication !!!! Is that in the regular version as well or just the alpha ?

Bhaal - June 24, 2008 02:18 PM (GMT)
It was in both and fixed in both.




* Hosted for free by InvisionFree