optimize least_valuable_attacker()