TODO: Randomly select best move (if there are ties) instead of picking the last one we look at.