Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution)

Similar presentations


Presentation on theme: "Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution)"— Presentation transcript:

1 Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution) resolution)putdeductions into WM put facts into WM match WM with RHS of rules select one rule (conflict resolution) resolution) put premises as sub-goals into WM put goal into WM ForwardChaining BackwardChaining

2 Conflict Resolution (Recap)  conflict set the set of rules which match the WM content in each cycle  not just rules, but rules with variable instantiations deterministic rule set  at most 1 rule matched at each cycle (i.e. 0 or 1) non-deterministic rule set  more than 1 matching rule  inference engine (interpreter) must select one rule to apply using its conflict resolution strategy

3 Choice of Conflict Resolution Strategy  determine how the ES search in the problem space how quick to find the solution if the system will find a solution  and if found, which solution  should be chosen to fit your application  desirable properties stability  follow a line of reasoning sensitivity  react quickly to any change in WM

4 Common Conflict Resolution Strategies  textual order  refractoriness  recency  breadth  MEA  specificity  LEX  simplicity  priority (salience)  strategies can be combined!

5 Textual order  assume that rules are ordered (linearly)  fire the first matching rule  most important rules should be placed early in the KB

6 Recency  rules that use recently added data are favoured (depth-first)  if >1 rule use the same (most) recent data, the next most recent data used in each of the rules is used to determine which one is preferred  pursues the current line of reasoning rather than being side-tracked by other deductions

7 Breadth Strategy  rules which have been activated for a long time are preferred to newly activated ones  i.e. rules that match old facts are preferred than rules that match new facts  tends to search in a breadth-first manner

8 MEA  "Means-Ends Analysis" an early AI technique for backward reasoning  rules whose 1 st condition uses recently added data are favoured

9 Specificity (complexity)  more specific rules are preferred to more general rules rules with greater number of conditions rules with fewer variables are more specific more instantiated by the WM are more specific  more specific rules should be applied earlier because they use more data and so can be used for special cases or exceptions to general rules

10 LEX  apply recency  if there is still conflict, apply specificity

11 Priority (salience)  in some systems, rules can have a priority (salience) attached, indicating how likely the rule is to be a good solution  fire rule with highest priority  priority should be used to: emphasise the importance of a rule delay firing of a non-promising rule NOT to establish the order in which all the rules should fire

12 Conflict Resolution in CLIPS  CLIPS fires rules from the agenda in order of their salience.  Salience is normally defined implicity by the conflict resolution strategy.  CLIPS offers a variety of CR strategies. recency (depth), breadth, LEX, MEA, complexity, simplicity & random strategies. default is recency.  You can also explicitly set the salience of a rule  In the CLIPS IDE you can set the CR strategy: Commands -> Option -> Salience Evaluation  You can also set it at the prompt. It will return the previous strategy. CLIPS> (set-strategy breadth) depth CLIPS>

13 13 Lab exercise 1:  Download “newsnow.clp” from the class webpage. This is a slightly modified version of the snow program.  Start the CLIPS IDE and load the newsnow.clp file.  Watch the facts and agenda windows and step through an execution (using Run 1).  Change the salience strategy and do it again. Try several strategies.  Which seems like the best choice? Worst? Why?

14 14 Lab Exercise 2:  Modify the newsnow program using salience to force all the user input questions to be first.  What form of conflict resolution is this most similar to?  Now modify it to reach a conclusion as soon as possible.  What form of CR do you have now?


Download ppt "Conflict Resolution  what to do if there is more than 1 matching rule in each inference cycle? match WM with LHS of rules select one rule (conflict resolution)"

Similar presentations


Ads by Google