Talk:Accuracy Formula (UFO2000)

From UFOpaedia
Jump to navigation Jump to search

There seems to be some kind of problem with the latex math formula generating. Either that or a problem with me. I'd appreciate some feedback about this, since it would look nice to have actual pretty looking formulas. And there are some very ugly formulas coming.

- Arcozelo


I guess MediaWiki isn't set up here. But, couldn't those formulas be simplified somewhat?

 <math>hp &=& acc \times \frac{max.health - current.health}{\frac{max.health}{2}}</math>
 <math>hp &=& \frac{2 \times acc \times (max.health - current.health)}{max.health}</math>
 <math>mp &=& acc \times \frac{100 - current.morale}{\frac{100}{2}}</math>
 <math>mp &=& \frac{acc \times (100 - current.morale)}{50}</math>

Or, even down to non-TeX format:

 hp = acc * (max.health - current.health) / (max.health / 2)
 hp = 2 * acc * (max.health - current.health) / max.health
 mp = acc * (100 - current.morale) / (100 / 2)
 mp = acc * (100 - current.morale) / 50

- Bomb Bloke


Well, these can. My problem is the ones that come afterwards. Like (2/(1/wacc^2+1/sacc^2)) <- this looks real ugly. And I was wondering about maybe delving into the statistics of hitting, but without decent formula display, I really shouldn't. Gaussians and things like that. No good.

- Arcozelo


<math>\frac{2}{\frac{1}{wacc^2} + \frac{1}{sacc^2}}</math>
<math>\frac{2}{\frac{sacc^2}{wacc^2 \times sacc^2} + \frac{wacc^2}{wacc^2 \times sacc^2}}</math>
<math>\frac{2}{\frac{wacc^2 + sacc^2}{wacc^2 \times sacc^2}}</math>
<math>\frac{2 \times wacc^2 \times sacc^2}{wacc^2 + sacc^2}</math>
2 / (1 / wacc2 + 1 / sacc2)
2 / (sacc2 / (wacc2 * sacc2) + wacc2 / (wacc2 * sacc2))
2 / ((wacc2 + sacc2) / (wacc2 * sacc2))
2 * wacc2 * sacc2 / (wacc2 + sacc2)

Don't ask me about gaussians, though. I've been out of college too long.

- Bomb Bloke

Ist the formula itself incorrect.?

The lines

hp = acc * (max.health - current.health) / (max.health / 2)

and

hp = 2 * acc * (max.health - current.health) / max.health

are mathematically equal, but I'm really not sure if the formula itself is right.


One Example:

Accuracy=80

max.Health=50

current.health=25


hp = 80 * (50 - 25) / (50 / 2) = 80 * (25 / 25) = 80 (!)


This can not be right. If I understood it correctly, the hp can be the half of the total accuracy in maximum. In this simple case I did use, the lost accuracy iss 100%! Not mentioned, what would happen, if the morale is also low... Negative accuracy can't be possible.


Isn't it right this way?


hp = acc * (max.health - current.health) / max.health /2


For the example I used:


hp = 80 * (50 - 25) / 50 / 2 = 80 * 25 / 50 / 2 = 20


For the mp it's the same:


80 accuracy

50 morale


mp = acc * (100 - current.morale) / 50

mp = 80 * (100 - 50) / 50 = 80 * 50 / 50 = 80


I guess this is the proper way:


mp = acc * (100 - current.morale) / 200

mp = 80 * (100 - 50) / 200 = 80 * 50 / 200 = 20


Am I wrong, or is there a mistake in this article :-) ?


BTW: I think this formula style is OK:

hp = acc * (max.health - current.health) / max.health / 2


Looks like a mistranslation. The LaTex is fine.

As you noted, the intent is to have 50% of the penalty come from health and 50% from morale. However, omitting the parentheses is technically accurate but misleading, because division is not commutative in general.

The clear way to write the parenthesized versions should be:

hp = (acc * (max.health - current.health) / max.health) / 2

mp = (acc * (100 - current.morale) / 100) / 2)

i.e.

hp = acc * (max.health - current.health) / (2*max.health)

mp = acc * (100 - current.morale) / 200

-- Zaimoni, 14:28 Sept 20 2006 CDT