The score is computed based on the difference of the cost of units in both armies which survived the battle. So when you reduce the total cost of one army, then even if it performs better, the score will be lower... So i guess i have to change the scoring system based on the damages done...
EDIT: Okey, this should work (pseudo):
Code:
if a wins:
a_cost / a_orig_cost
else:
- b_cost / b_orig_cost
where cost is the value of the army after the battle and orig_cost the value before the battle...
Good point on that... So, the [22, 4.4] does not seem to catch [20, 10] even at 500%, although the difference is minimal... Guess i should try every build with the same cost instead... Anyways, here is the code:
http://pastebin.com/LutgLRLHThe score is now in range of -1 to 1, where -1 is loss without dealing a single point of damage, 0 is a tie and 1 is flawless victory.