Case-Based Reasoning JL Kolodner (1993), Chapters 1-3 of Case-Based Reasoning, Morgan Kaufmann Publishers, San Mateo, CA presented by Akash Shah What is CBR? • Old solutions -> New problems • Old cases -> Explain new situations • Old cases -> Critique solutions • Reason from precedents -> Interpret new situation • Equitable solution -> New problem Reasoning depends on 5 things – Experiences – Understand new situations in terms of old experiences – Adapt – Evaluate and repair – Store Experiences • More experiences > Less ? – Creative in understanding & adaptation – At least some relevant experience • Should start with a representative set – Goals and subgoals – Successful and failed attempts Understand a problem • Recalling old experiences – Indexing problem • Interpretation – New problem compared with old ones – Not needed much when a problem is well understood Adapt • Old solution – Add – Delete – Substitute Evaluation & Repair • Right solution/Wrong solution • Feedback Storing • Storing cases helps in becoming – More efficient • Steps required to solve new problem need not be repeated – More competent • Better answers over time • Anticipate mistakes by prediction Case • Case is a contextualized piece of knowledge representing an experience that teaches a lesson fundamental to achieving the goals of the reasoner • Knowledge tied to a context, not general • When to store a case? – Difference causes a difference – Teaches a lesson for the future (useful lesson) Case based reasoning cycle Advantages • Quick • Domains not completely understood • No algorithmic method available Advantages (cont.) • Open ended/ill defined concepts • Warning • Focus reasoning on important parts of the problem Disadvantages • Use old cases blindly • Bias towards old cases for new problems • New user may not reminded of most appropriate set • Does not fully explore the solution space. So most optimal solution may not be found CBR & People • Planners, economists, stock-market analysts • We can use CBR to aid people – Retrieval tool to augment memories – Teaching based on examples – People can learn CBR to allow them to not blindly trust past cases. Justification. Evaluation. Building CBRs Types of CBRs Fully automated Retrieval only Reasoning using cases • What kind of tasks does CBR support? • Tasks can be categorized as: – Problem solving : design, planning, diagnoses – Interpretive : understanding, justification Planning • Sequence of steps to achieve some state in the world • A plan must have a sequence of steps. A later step cannot undo the work of an earlier one • CBR helps in providing plans that have already worked, minor fixes required • Previous plans are saved and indexed by conjunction of goals they achieved – so we may be able to solve achieve several goals at the same time • Planning vs execution – Put off some planning until execution – CHEF, PLEXUS, TRUCKER, MEDIC CHEF – case based planner CHEF (cont.) • Beef and broccoli – Include beef + Broccoli + Stir - fry • Finds beef + green beans – Include beef + stir fry – Partial – Include vegetables (adaptation) • Suggests recipe with • Tender beef, Crisp broccoli, etc. CHEF (cont.) • FAIL!!! – Broccoli was soggy • Tries to understand what went wrong • Repairs it by using repair strategy CHEF (cont.) • Adds the lesson learnt to library • Uses it next time to make chicken + snow peas recipe CHEF (cont.) • Powerful case library • Strategies to repair failures (SPLIT-REFORM) • Semantic memory (crisp, vegetable) Design • Problems defined as set of constrains • Remember old design case that was created with constrains similar to the current ones • Starting from scratch can be very tedious as constrains may be violated due to interactions between parts • Cases provide a glue to hold the solution together • JULIA, CYCLOPS, KRITIK, CADET, ARCHIE, CLAVIER • Mediators too fall under design category as over constrained problems – MEDIATOR, PURSUADER JULIA (case based designer) • User given constraints (general and specific) – food should be tasty, max number of calories, vegetarians coming • Cases + object prototypes (American dinner = 3 courses – salad + main course + dessert) • Focuses on some aspect of solution by recalling cases that fulfill particular constraint • Adapt, put in ongoing solution, resolve conflicts by adapt, then by relaxing some constraint, then by backtracking JULIA (cont) • Interrupts – Client : Akash, a vegetarian, is joining us for dinner! (JULIA begins to panic ) • Tries to repair to accommodate, treats this just like a conflict – Own retriever : Potential for failure • For example, a case might warn that a vegetarian may come for dinner (she learnt from her previous mistake). JULIA will then pause, maybe ask the user if that is the case, if yes, then above situation. CLAVIER • A number of parts need to be cured in an autoclave at Lockheed • CLAVIER will take the list of parts as input and design layouts for several loads of the autoclave that will cure all the parts, getting as many of them cured at a time as possible • Started with 20 cases, collection over a 100 more CLAVIER (cont) • Looks if any previous load had current table + some piece from input that still needs curing CLAVIER (cont.) • Context determination and context matching – Global knowledge : material used, grouping – Local context : where is the table in the oven, size of the parts it holds • Allows less experienced autoclave operators to load an autoclave like an expert Explanation & Diagnosis • Credit/Blame assignment problem • Remember similar phenomenon, borrow its explanation and adapt • Diagnosis is an explanation problem where symptoms are given and system is told to explain them • When small number of explanations, this becomes a classification problem • CASEY, PROTOS CASEY (case based diagnostics) • CASEY is built on top of a model-based diagnostic program called Heart Failure Program that diagnoses heart failure • If similar case exists, then make a diagnosis, else pass it to Heart Failure Program. • Return result to CASEY CASEY (cont.) • For new patient, try and match old patient • Try and reconcile the differences • Indexes cases based on both surface features (blood pressure, age, etc) and internal states (tries to see if some symptom is as a result of something else and thus reconcile difference) • As accurate as Heart Failure Program, but 2-3x times more efficient PROTOS (case based classification, case based knowledge acquisition) • Description of situation -> Classify into type • Misclassify -> consult expert -> correct • 4 kinds of connections between cases and categories – Reminding links : features to categories – Prototype links : connect categories to items – Difference links : differences between items – Censor links : rule out connections Interpretive CBR • Evaluate situations in context of previous ones • Justify arguments – proof of rightness of an argument - HYPO • Projection – predict effects of a solution i.e. provide a way to project results based on what has been true in the past • Common theme in all is argumentation. Some cases will support one stand, some the other. HYPO (interpretive reasoner) • Legal situation -> argument for client (defendant/plaintiff) • Take best point in favor, best point against • Difference between cases are examined, cases addressing those differences in favor are chosen Retrieval only systems • Architect’s assistant • Dispute mediator’s assistant • Real aiding systems – Battle Planner, help desk implementations, … Comparison with other heuristic methods • Rule based reasoning – Knowledge extracted from experts and encoded in rules. – Importance on form of knowledge, not content. – Should match input exactly – Can give rule chains as explanations whereas CBR can only give cases from where it got solution • Model based reasoning – Store models of domains – Applicable when domain is well understood – Can verify solution, but generation is unguided That’s all folks!