ensure num allies graph is never NaN