fix infinite loop in evaluating random end-game