22
CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but not perfect, solution to meet the needs of a current problem Input The current problem description A not-quite-right past problem solution The problem description for the past solution (optional) Output A solution for the current problem description Method Adjust the not-quite-right solution to make it fit the needs of the current problem

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

Embed Size (px)

Citation preview

Page 1: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 1

Chapter 11: Adaptation Methods and Strategies

• Adaptation is the process of modifying a close, but not perfect, solution to meet the needs of a current problem

• Input• The current problem description• A not-quite-right past problem solution• The problem description for the past solution (optional)

• Output• A solution for the current problem description

• Method• Adjust the not-quite-right solution to make it fit the needs of the

current problem

Page 2: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 2

Types of Adaptation

• There are several adaptation methods, which fit into three major categories:

• Substitution

• Transformation

• Other

• Substitution is the easiest type of adaptation to use, when it works

• Substitution methods include:

• Reinstantiation

• Parameter adjustment

• Local Search

• Query Memory

• Specialized Search

• Case-based substitution

Page 3: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 3

Reinstantiation

• Problem: Roles in the new case are filled differently than in the old

• Solution: Substitute role bindings in the new case for those in the old one, as follows:

• Abstract the framework of the old problem and solution

• Compute correspondences between the roles of the two problem statements

• Instantiate the framework of the old problem and solution based on computed correspondences

• Note that you have to do the first two steps anyway, in order to retrieve the old case from memory in the first place

• The last step is simply to replace the values in the original solution with their corresponding values in the new problem

• The example is from MEDIATOR

Page 4: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 4

Page 5: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 5

Page 6: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 6

Page 7: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 7

Page 8: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 8

Page 9: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 9

Parameter Adjustment

• Problem: Parameters in the new case are different from those in the old one

• Solution: Adjust the old solution as follows:

• Compare the old and new problems and extract differences

• For each difference, apply a specialized adjustment heuristic to the old solution to create a new one

• Parameters are the values for features

• Parameter adjustment is typically used for numeric features

• Examples:

• A baseball player’s salary might be 25% higher than it would otherwise be if he is popular with the fans

• A house with a recreation room might be priced 10% higher than a comparable house without one

Page 10: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 10

Local Search, Query Memory and Specialized Search

• Search methods for substitution can be used when you know there is an element of the old solution that needs to be replaced, but you don’t know what to replace it with

• The primary strategy, local search, uses abstraction hierarchies to find suitable substitutions (as in CHEF)

• Query memory is related, but uses an abstract description of the desired case component to look for a matching substitution

• In specialized search, special search heuristics are encoded to tell the system how and where to look for substitutions

• In all search methods, you find one or a few possible replacements for the not-right element of the old solution and evaluate whether or not the replacement would result in an improvement

• A drawback to all search methods is potential inefficiency

Page 11: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 11

Case-Based Substitution

• Again, you know that there’s some element of the old solution that needs to be replaced, and you don’t know what to replace it with

• Here, you look in the case base for a suitable replacement

• JULIA used dishes from different past menus when it had an almost-right menu with a not-right component

• The next example is from CLAVIER

Page 12: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 12

Page 13: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 13

Transformation Strategies

• Besides finding total replacements for parts of a proposed solution that do not meet current needs, there are other adjustments we can make

• We may need to add something to a solution, delete something from a solution, or change the order of steps in a plan

• There are two general transformation strategies:

• Common sense transformation

• Model guided repair

Page 14: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 14

Common Sense Transformation

• We think of common sense as things that everyone knows without being taught

• Common sense is not at all common in computers

• To use common sense transformation, you have to encode rules, or heuristics, that would make sense to people knowledgeable about the problem domain

• These rules use knowledge about the relative importance and functions of different components of an artifact

• JULIA uses common sense transformation as follows:

• It transfers a solution from an old case to the new case and then checks for constraint violations

• It uses common sense transformation heuristics to remove the violations

Page 15: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 15

Some Common Sense Transformation Heuristics

1) Delete secondary component. A secondary component that does not serve a necessary functional role may be deleted. Example: If you’re serving poppy seed rolls and someone hates poppy seeds, you can serve plain rolls.

2) Substitute component. Replace any component with another that can fulfill the same functions. Example: If you’re serving sandwiches and someone is allergic to wheat, you could wrap a sandwich in a corn tortilla.

3) Add component. Add needed components, making sure their effects don’t counter the necessary functions of other components. Example: If you’re serving vanilla ice cream, and you need to use up strawberries, the strawberries could go on top of the ice cream.

4) Adjust the amount of a component. This is essentially parameter adjustment in the small. Example: If you are serving ice cream with fruit to dieters, you could include less ice cream and more fruit.

Page 16: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 16

Model Guided Repair

• Problem: Features of the old case are different from those of the new one. A causal model describing the relationships between component solutions is available.

• Solution: Adjust the old solution as follows:1) Compare the old and new problems and find differences2) Evaluate and characterize the differences using the causal model3) For each difference, apply the appropriate model-guided repair

heuristic to the old solution to obtain a new one• As in common sense transformation, you use rules to define the

transformations you can make• The difference is that the rules are based on a formal model, rather

than on what makes sense to people• This narrows down the number and kinds of things the computer

has to understand• The example is from CASEY

Page 17: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 17

Page 18: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 18

Page 19: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 19

Page 20: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 20

Page 21: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 21

Other Adaptation Strategies

• Two other strategies discussed by Kolodner are:

• Special purpose adaptation and repair

• Derivational replay

• Special purpose adaptation and repair techniques are specific to a single domain

• Example: CHEF knows that when duck is included in a recipe, it should always be defatted. This is not useful for other types of planning problems, but it makes duck recipes come out better

• From an AI standpoint, we prefer more broadly applicable heuristics that can be developed once and used many times

• From a system building perspective, it can be quicker and easier to solve a specific problem than a general one

• In practice, we combine approaches

Page 22: CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling1 Chapter 11: Adaptation Methods and Strategies Adaptation is the process of modifying a close, but

CS 682, AI:Case-Based Reasoning, Prof. Cindy Marling 22

Derivational Replay

• Problem: Some element of the old case does not fit the needs of the new case

• Solution: To compute a substitute element for the new case, recall how the old value was computed and replay that computation

• To get an intuitive feel for this, consider mathematical domains in which the formulas are more important than the numeric answers

• The most significant system to use derivational replay was Manuela Veloso’s PRODIGY/ANALOGY system at Carnegie Mellon

• This was a general purpose planning system, tested in the transportation domain

• This is perhaps the most difficult type of adaptation strategy to implement, because you need to store and index the methods used to solve past cases, as well as the past problems and solutions themselves