## Possible EV bug with Horsemen

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
Cackfiend
Posts: 436
Joined: January 28th, 2007, 7:36 am
Location: Florida, USA
Contact:

### Possible EV bug with Horsemen

I was doing some EV tests on 1.8.6 and although all my other units were estimated as the correct % of their dmg output Horsemen seem to be calculating incorrectly.

Here is my example:

Horseman dmg output is 20-2 at day vs a thunderer in shallow water so it has 80% chance to hit

normally EV would say for other units its 80% of the 40 possible dmg is the EV which is 32 but for some reason the game is only expecting 26.9

my skirm with 5-4 dmg output at 80% is correctly estimated at 16 dmg
my spearman with 7-3 dmg output at 80% is correctly estimated at 16.8 dmg

im wondering if it has to do with the calculations the game has to make when it factors in tod, resistance, and the double dmg of charge?
"There's no love in fear." - Maynard James Keenan

I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D

Scatha
Posts: 111
Joined: March 29th, 2008, 2:55 pm

### Re: Possible EV bug with Horsemen

The Thunderer doesn't have as much as 40 health, so you can't do 40 damage. The horseman's first attack should have an expected damage of 16. The second attack has a lower expected damage, since if the first attack hit the thunderer has less than 20 health remaining.

tekelili
Posts: 1038
Joined: August 19th, 2009, 9:28 pm

### Re: Possible EV bug with Horsemen

Lol Cackfiend, you put it me very easy
tekelili wrote:I understand why this happen, it is due that 2nd cav could kill griphon if 3/3, but I wouldnt have dealt 27 dmg, because griphon has 24 hp
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II

Cackfiend
Posts: 436
Joined: January 28th, 2007, 7:36 am
Location: Florida, USA
Contact:

### Re: Possible EV bug with Horsemen

Scatha wrote:The Thunderer doesn't have as much as 40 health, so you can't do 40 damage. The horseman's first attack should have an expected damage of 16. The second attack has a lower expected damage, since if the first attack hit the thunderer has less than 20 health remaining.
Well the thunderer had 32 hps. With the way you're saying it works is that the game would expect 80% of 20 dmg to land on the first hit since the unit has full hps so thats 16. The second attack the unit only has 12 hps which I guess you're saying the game expect to only do 80% of that? that would be 9.6 which added together with the 16 EV equals to 25.6 so where did the game get the EV of 26.9?

I still think its a bug

tekelili wrote:Lol Cackfiend, you put it me very easy
tekelili wrote:I understand why this happen, it is due that 2nd cav could kill griphon if 3/3, but I wouldnt have dealt 27 dmg, because griphon has 24 hp
hehe I knew you would bring this up actually

touche sir, but I have a firm grasp of how EV is calculated in the game , i just think I may have found a bug exclusively with horsemen
"There's no love in fear." - Maynard James Keenan

I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D

ivanovic
Lord of Translations
Posts: 1146
Joined: September 28th, 2004, 10:10 pm
Location: Germany

### Re: Possible EV bug with Horsemen

Cackfiend wrote:
Scatha wrote:The Thunderer doesn't have as much as 40 health, so you can't do 40 damage. The horseman's first attack should have an expected damage of 16. The second attack has a lower expected damage, since if the first attack hit the thunderer has less than 20 health remaining.
Well the thunderer had 32 hps. With the way you're saying it works is that the game would expect 80% of 20 dmg to land on the first hit since the unit has full hps so thats 16. The second attack the unit only has 12 hps which I guess you're saying the game expect to only do 80% of that? that would be 9.6 which added together with the 16 EV equals to 25.6 so where did the game get the EV of 26.9?

I still think its a bug
Make sure to consider the complete table of possible results. That is the following:
* No hits in both tries. (0 dmg)
* A hit in the first but no hit in the 2nd try. (20 dmg)
* No hit in the first strike but one in the 2nd. (20 dmg)
* Hitting in both, the first and the 2nd strike. (32 dmg)

You have to do the calculations for each of those, consider the resulting damage (also depending on how many HP are still left) and weight the damage based on the probability for the results. Yes, this is one of those cases where order does matter...

Cackfiend
Posts: 436
Joined: January 28th, 2007, 7:36 am
Location: Florida, USA
Contact:

### Re: Possible EV bug with Horsemen

still dont see why the game expects an EV for 26.9, someone explain it to me?
"There's no love in fear." - Maynard James Keenan

I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D

Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

### Re: Possible EV bug with Horsemen

ivanovic wrote:Make sure to consider the complete table of possible results. That is the following:
* No hits in both tries. (0 dmg)
* A hit in the first but no hit in the 2nd try. (20 dmg)
* No hit in the first strike but one in the 2nd. (20 dmg)
* Hitting in both, the first and the 2nd strike. (32 dmg)

Code: Select all

``````first | second |   probability       |    damage
----------------------------------------------------------
miss   miss        0.2 x 0.2 = 0.04       0.04 x 0  = 0
hit    miss        0.2 x 0.8 = 0.16       0.16 x 20 = 3.2
miss   hit         0.8 x 0.2 = 0.16       0.16 x 20 = 3.2
hit    hit         0.8 x 0.8 = 0.64       0.64 x 32 = 20.48
===========================================================
sum                          1 (100%)                 26.88           ``````