minimax prune with dynamic depth