We introduce a case-based system, BOLERO; that learns both plans and g
oal states. The major aim is that of improving the performance of a ru
le-based diagnosis system by adapting its behavior using the most rece
nt information available about a patient. On the one hand BOLERO gets
knowledge from cases in the form of diagnostic plans that are represen
ted as sequences of decision steps. The advantages of this representat
ion include: (1) retrieval and adaptation of parts of plans (steps) ap
propriate to the current problem state; (2) generation of new plans no
t previously available in memory; and (3) learning from experience, bo
th from successful or failed plans. On the other hand, since goal stat
es are sets of final diagnosis likelihoods they are not known beforeha
nd, i.e. goal states are not defined and the system has to learn to re
cognize them. For this reason BOLERO has a case-based method that uses
solutions of past cases to recognize a diagnostic state as a goal sta
te of a new planning problem. BOLERO and a rule-based system are integ
rated into a meta-level architecture in which we emphasize the collabo
ration of both systems in solving problems. The rule-based system exec
utes the plans generated by BOLERO. As a consequence of the execution
of plans, the rule-based system furnishes BOLERO with new information
with which BOLERO can generate a new plan to adapt the reasoning proce
ss of the rule-based system into correspondence with the recent availa
ble data. All the methods have been designed to be useful for medical
diagnosis and have been tested in the domain of diagnosing pneumonia.