# Reducing soldier strength parameter space (for easier comparison).

Let's define the strength parameters of a soldier in the following way:

**Attack**: Let`AT`

be the number of health points a sucessful attack will substract from the number of health points of the victim if he has no defense.**Health**: Let`HP`

be the number of health points the soldier has if he is fully healthy.**Defense**: Let`DE`

be the fraction by which a succesful attack on this soldier get's reduced, i.e.`HP -> HP - (AT'-DE*AT') = HP - (1-DE)*AT'`

, where`AT'`

is the`AT`

of the attacking soldier,**Evade**: Let`EV`

be the proportion of attacks on this soldier which are unsuccesful, i.e. deal no damage.

## Effective health.

First, it is clear that effectively `DE`

and `HP`

describe the same thing and an *effective health* `eHP`

can be defined:

```
eHP = HP/(1-DE)
```

leaving with three parameters describing a soldier:

`AT`

,`eHP`

and`EV`

.

## Statistical effective health.

Viewing it statistically, i.e. averaged over many fights, evade has the same effect as defense, so `DE`

and `EV`

can be subsumed in an *statistical defense* `sDE`

and a *statistical effective health* `seHP`

can be defined:

```
seHP = eHP/(1-EV) = HP/((1-DE)*(1-EV)) = HP/(1-sDE)
sDE = DE + EV - DE*EV
```

In a statistical view, only two parameters are needed to describe a soldier:

`AT`

and`seHP`

.

## Normalisation.

When two soldiers, called `s1`

and `s2`

, meet and fight, health and attack can be normalised with respect to each other. But only statistically because `AT`

varies randomly from attack to attack (see Wiki-page about soldier levels).

Let's call `aAT`

the average `AT`

value of a soldier. Let's denote with the indices `_1`

and `_2`

the values of the soldiers `s1`

and `s2`

, respectively. Then a *normalised health* `nHP`

and a *normalised average attack* `naAT`

can be defined:

```
nHP_1 = 1
nHP_2 = 1
naAT_1 = aAT_1/HP_2
naAT_2 = aAT_2/HP_1
```

Similar things can be done incorporating the *effective ealth* and *statistical effective health* defined above, defining an *effective normalised average attack* `enaAT`

:

```
enaAT_1 = aAT_1/eHP_2
enaAT_2 = aAT_2/eHP_1
```

and a *statistical effective normalised average attack* `senaAT`

:

```
senaAT_1 = aAT_1/seHP_2
senaAT_2 = aAT_2/seHP_1
```

It looks a bit cumbersome, but the comparison of two soldiers is now reduced to one parameter (`senaAT`

) for each soldier, which tells who wins in a statistical sense.

(Of course, one could also do normalisation by setting a normalised attack to 1 and scale the health points accordingly)

## TODO: Full statistical elaboration.

Interesting TODO: Do a full statistical elaboration taking into account the real distribution of `AT`

-values and the real distribution of evade successes and evade failures, reduce to as few parameters as possible (`DE`

can always be eliminated since it essentially adds up to `HP`

) and try to come up with a closed equation giving the chance that one soldier wins over the other.