Added planning logic: select the best value in a list of candidates that get the lowest cost according to the heuristics calculations