Although much research in machine learning has been carried out on acquiring knowledge for problem-solving in many problem domains, little effort has been focused on learning search-control knowledge for solving optimization problems. This paper reports on the development of SHAPES, a system that learns heuristic search guidance for solving optimization problems in intractable, under-constrained domains based on the Explanation-Based Learning (EEL) framework. The system embodies two new and novel approaches to machine learning. First, it makes use of explanations of varying levels of approximation as a mean for verifying heuristic-based decisions, allowing heuristic estimates to be revised and corrected during problem-solving. The provision of such a revision mechanism is particularly important when working in intractable and under-constrained domains, where heuristics tend to be highly over-generalized, and hence at times will give rise to incorrect results. Second, ii employs a new linear and quadratic programming-based weight-assignment algorithm formulated to direct search toward optimal solutions under best-first search. The algorithm offers a direct method for assigning rule strengths and, in so doing, avoids the need to address the credit-assignment problem faced by other iterative weight-adjustment methods.