1 / 31

CS26110 AI Toolbox

CS26110 AI Toolbox. Case-based reasoning. A scenario. You can’t get a computer game to install on your PC What do you do?. P. P. P. P. P. P. P. P. P. S. S. S. S. S. S. S. S. S. How CBR solves problems. New problem can be solved by Retrieving similar problems

teryl
Download Presentation

CS26110 AI Toolbox

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS26110AI Toolbox Case-based reasoning

  2. A scenario... • You can’t get a computer game to install on your PC • What do you do?

  3. P P P P P P P P P S S S S S S S S S How CBR solves problems • New problem can be solved by • Retrieving similar problems • Adapting retrieved solutions • Similar problems have similar solutions ? X

  4. Databases • Database technology would seem ideally suited to the task of retrieving known solutions to problems • Databases are excellent at finding exact matches… but are poor at near or ‘fuzzy’ matches

  5. CBR assumption(s) • The main assumption is that: • Similar problems have similar solutions: • e.g., an aspirin can be taken for any mild pain • Two other assumptions: • The world is a regular place: what holds true today will probably hold true tomorrow • (e.g., if you have a headache, you take aspirin, because it has always helped) • Situations repeat: if they do not, there is no point in remembering them

  6. Problems we solve this way • Medicine • Doctors remember previous patients, especially for rare combinations of symptoms • Law • English/US law depends on precedence • Case histories are consulted • Management • Decisions are often based on past rulings • Financial • Performance is predicted by past results

  7. What CBR can do • Classification tasks (good for CBR) • Diagnosis - what type of fault is this? • Prediction / estimation - what happened when we saw this pattern before? • Synthesis tasks (harder for CBR) • Engineering Design • Planning • Scheduling

  8. New case CBR Cycle Retrieve Matched cases Matched cases matching Matched cases Learn Case base Knowledge and Adaptation rules Retain Reuse no Adapt? yes Closest case Revise Suggest solution

  9. CBR components • Case-base • Database of previous cases (experience) • Retrieval of relevant cases • Index for cases in library • Matching most similar case(s) • Retrieving the solution(s) from these case(s) • Adaptation of solution • Alter the retrieved solution(s) to reflect differences between new case and retrieved case(s)

  10. Case representation • Flat feature-value list • Object Oriented representation • Graph representation • The choice of representation is • Dependent on requirements of domain and task • Structure of already available case data

  11. New case CBR Cycle Retrieve Matched cases Matched cases matching Matched cases Learn Case base Knowledge and Adaptation rules Retain Reuse no Adapt? yes Closest case Revise Suggest solution

  12. Retrieval • Similarity measurement • Purpose: To select the most relevant case • Distances between values of individual features • Problem and case have values p and c for feature f • Distance for numeric features • E.g., d(problem,case) = |p - c|/(max difference) • Distance for symbolic features • d(problem,case) = 0 if p = c = 1 otherwise

  13. What to index? Client Ref #: 64 Client Name: John Smith Address: 39 Union Street Tel: 01224 665544 Photo: Age: 37 Occupation: IT Analyst Income: £ 20000 … • Case Features are: • Indexed • Unindexed Unindexed features Indexed features

  14. CBR example: Property pricing Test instance

  15. Matching • Comparing test instance • distance(5,1) = 3 • distance(5,2) = 3 • distance(5,3) = 4 • distance(5,4) = 5 • Estimate price of case 5 is £25,000

  16. New case CBR Cycle Retrieve Matched cases Matched cases matching Matched cases Learn Case base Knowledge and Adaptation rules Retain Reuse no Adapt? yes Closest case Revise Suggest solution

  17. Reusing retrieved solutions • Single retrieved solution • Reuse this solution • Multiple retrieved solutions • Vote/average of retrieved solutions • Weighted according to: ranking, similarity...

  18. How to revise the solution • Adaptation alters proposed solution: • Manual or interactive adaptation • User adapts the retrieved solution (adapting is easier than solving?) • Automated adaptation • CBR system is able to adapt the retrieved solution • Adaptation knowledge required

  19. Automated adaptation methods • Substitution • Change some part(s) of the retrieved solution • Simplest and most common form of adaptation • Transformation • Alters the structure of the solution

  20. Examples of adaptation • CHEF: CBR system to plan Szechuan recipes • Substitution adaptation • Substitute ingredients in the retrieved recipe to match the menu • Retrieved recipe contains beef and broccoli • New menu requires chicken and snowpeas • Replace chicken for beef, snowpeas for broccoli • Transformation adaptation • Add, change or remove steps in the recipe • Skinning step added for chicken, not done for beef

  21. CBR example: Property pricing Test instance

  22. How adaption rules are generated • There is no unique way of doing it. Here is one possibility: • Examine cases and look for ones that are almost identical • case 1 and case 2 • Rule 1: If recep-rooms changes from 2 to 1 then reduce price by £5,000 • case 3 and case 4 • Rule 2: If Type changes from semi to terraced then reduce price by £7,000

  23. Adapting • Reverse Rule 2 • If type changes from terraced to semi then increase price by £7,000 • Apply reversed Rule 2 • New estimate of price of property 5 is £32,000

  24. New case CBR Cycle Retrieve Matched cases Matched cases matching Matched cases Learn Case base Knowledge and Adaptation rules Retain Reuse no Adapt? yes Closest case Revise Suggest solution

  25. Retention • What can be learned • New experience to be retained as new case • Representing the new case • Contents of new case • Indexing of new case • Forgetting cases • For efficiency or because out of date • Deleting an old case • Old is not necessarily bad • Does it leave a gap?

  26. CBR example: Property pricing Test instance

  27. Learning • So far we have a new case and an estimated price • Nothing is added yet to the case base • If later we find house sold for £35,000 then the case would be added • Could add a new rule • If location changes from 8 to 7 increase price by £3,000

  28. Impact on business at Microsoft • Within 9 months of introducing a CBR system at Microsoft’s call centre in Glasgow, Microsoft reported: • 10% increase in customer satisfaction rating • 28% increase in “first-time-fix” success rate • A significant reduction in the time required to train new agents • More consistent responses delivered by agents, regardless of the problem

  29. Issues for CBR • How should cases be represented? • How should cases be indexed for fast retrieval? • How can good adaptation heuristics be developed? • When should old cases be removed?

  30. Pros and cons • Advantages • Solutions are quickly proposed - derivation from scratch is avoided • Knowledge is in a form understandable to humans • Domains do not need to be completely understood • Cases useful for open-ended/ill-defined concepts • Disadvantages • Old cases may be poor • Library may be biased • Most appropriate cases may not be retrieved • Retrieval/adaptation knowledge still needed

  31. CBR for game AI • Imitating a RoboCup Soccer Player Using Case-Based Reasoning • http://www.youtube.com/watch?v=zNjyXLWVSWI • CBR for Game AI, Google Tech Talk • http://www.youtube.com/watch?v=s9G7DRTuB5s

More Related