Available playersTop players Chat Forum External sites: Wiki

«

Fex

Heavy Trooper

Offline

Hi,

I just made an attack with my DFA (on base) vs an enemy's Heavy Trooper (on desert), both with 10 sub units each, and was sure that all of the troopers will be knocked out. I was stunned when I realized that one of them remained, which pretty much destroyed my attack.

The reason I was sure is that I programmed a tool which can calculate the outcome of a battle, and it told me that there was a 100% chance to get rid of all the troopers.
Of course, first I thought that I programmed something wrong, but when I checked the specifications, I came to the same result as my tool. Afterwards I also checked the simulator at http://pbs.weewarspy.co.uk/ , which says that there was a 45% chance of one surviving trooper.

This seems strange to me, because the specifications clearly imply that a DFA exceeds the damage necessary to instakill the troopers.

The math: DFA-Attack vs soft + terrain bonus - (trooper defense + terrain bonus) = 16 + 0 - (6 - 1) = 11
Hence the probability of a hit (called "p" in the specifications) will be bigger than one, which should imply 100% hits, i.e. 10 kills.

I did some more analysis at http://pbs.weewarspy.co.uk/ and noticed that it is impossible to kill a group of 10 units with one attack. (eg for a DFA vs light artillery). It seems the biggest possible "p" is less than 1.

Does anyone know more?

Tygerdave

Heavy Tank

Offline

p = 0.05 * (((A + Ta) - (D + Td))+B) + 0.5

if p < 0 set p to 0

if p > 1 set p to 1
For each sub unit of the attacker six random numbers (r) between 0 and 1 are generated. For each r < p a hit is counted. The total number of hits divided by 6 is the number of sub units the opponent loses during the attack.

Attacker and defender then switch roles and the process starts over. Please note: Losses will only be removed when the battle is over. They will not affect the calculations of the current attack.

p = .05 * ((16+0) - (6-1))+0) +.5
p = .05 * (16-5) + .5
p = .05 * 11 + .5
p = .55 + .5
p = 1.05
p > 1 = true so p = 1

Then the random number generator kicks in, and you got some crappy rolls

This message was edited 1 time. Last update was at 08/12/2012 04:21:43

Fex

Heavy Trooper

Offline

Yes, this is exactly the passage I meant and read.
I also came to the result "p=1" (I wrote it as 100%).

I do not understand what you mean with "crappy" rolls. I cannot get crappy rolls with a 100% chance.

Tygerdave

Heavy Tank

Offline

r can be = to 1 so there is never a 100% kill chance, just high probability kills.

Try to make your most critical kills as early as you can in your attack so you can back off if things don't work out

Fex

Heavy Trooper

Offline

ok, what is the probability that r=1 then? Usually, if "a random number between 0 and 1 is generated", this means in the sense of a uniform distribution, so the probability that the random number equals some fixed number (e.g. "1") is zero.

So, if all other details of the specs are correct, r is not chosen uniformly between 0 and 1, which raises the question: How is r chosen? Without this knowledge, the specifications are (to some extend) "useless", as r could be chosen in any way.
For example, r could be chosen 0 half the time and 1 the other half (which of course is not true), which would make "p" almost negligible, and results of fights would be completely different.

However, the simulator seems to know about the probability "r=1".
If someone is interested: I tried to backtrack it by knowing that the chance of killing all units is only 55% (this is what the simulator says).
The result was that there is about a 1% chance of r=1, so maybe the way of chosing r is by selecting a random integer between 1 and 100 (or 0 and 100) and then divide it by 100 (to obtain something between 0 and 1).
Of course, I cannot say for sure, but it would also explain other of my observations which surprised me.

Fex

Heavy Trooper

Offline

one additional note:

I digged the forums and found this post: http://weewar.com/forum/posts/list/1513.page#23147
It lead me to http://www.ibattler.com/weewar.php
Under "The Math" the line "p = p / 1.01" hardens the assumption that r is chosen as "random integer between 0 and 100, divided by 100".

one more post: http://weewar.com/forum/posts/list/257.page
Here the author had exactly the same problem as I did, spadequack answered it.

Thanks anyway!

Juffe

Raider

Offline

I haven't looked at the maths involved, but experience tells me that the chance of destroying a strength 10 unit with one attack is never (much) more than 50%. I've tested it with the biggest possible terrain modifiers, and once the probability gets to 50% it doesn't improve with modifiers. For example, DFA:s have the same probability of killing each other if both stand on plains as when one is on a repairshop (-6 to defence).

I tested that one on this map: http://weewar.com/map/55575