Combat strength of military units cannot be expressed by single number (i.e. it is not flat scalar). The unit can be efficient against one opponents an ineffectie against other. Situation similar to game paper-scissor-rock may appear (e.g. archer-pikement-horseman). The effectiveness of particular unit against range of different enemies is also very non-linear. For example, as long as armour of tanks can be penetrate by cannon, the cannon is efficient, but when the armour is increased by half, cannon effectiveness drops to zero.
The easiest way how to describe such situation is non-symmetric combat matrix. Combat matrix allows to split evaluation of combat into two parts
Such matrix can be constructed for pairs of unit types (archer vs. pikeman) but also for particular intances of units in particular situation (e.g. the pikeman in the corner of formation on the hill 100m from archer under rain and wind)
In civilization there often fight crossbowman vs. tanks, and are able to hit it. In reality it is completely unrealistic. On the other hand, crossbowman has a chance vs rifleman, and rifle man has a chance vs tank. How to build a model which capture properly this non linearity?
In [ ]:
combat_mat = [
# pikeman archer horseman
[ 1.0, 5.0, 0.1 ], # against pikeman
[ 1.0, 3.0, 10.0 ], # against archer
[ 1.5, 0.2, 1.0 ] # against horseman
]