Some clarification please. In the bolded passage, what do you mean by "improve the value of the hand as much as possible"?
Does it mean discard the hand so as to maximize the chance of drawing a better hand, and that all better hands count equally? E.g. if we have a pair, then an improvement to 2 pairs counts the same as an improvement to a royal flush?
Does it mean discard some cards so that we maximize the expected 'value' of the new hand for some payoff scale? If so, what is that payoff scale?