Presentation is loading. Please wait.

Presentation is loading. Please wait.

Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.

Similar presentations


Presentation on theme: "Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you."— Presentation transcript:

1 Production Rules Rule-Based Systems

2 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you should do or what you could conclude in different situations. Take the form of IF-THEN rules Take the form of IF-THEN rules A rule-based system consists of A rule-based system consists of a collection of IF-THEN rules, a collection of IF-THEN rules, a collection of facts, and a collection of facts, and some interpreter controlling the application of the rules, given the facts some interpreter controlling the application of the rules, given the facts

3 3 Rule-Based Systems Forward Chaining Forward Chaining start with the initial facts, and keep using the rules to draw new conclusions (or take certain actions) given those facts start with the initial facts, and keep using the rules to draw new conclusions (or take certain actions) given those facts Backward Chaining Backward Chaining start with some hypothesis (or goal) to be proved, and keep looking for rules that would allow to conclude that hypothesis start with some hypothesis (or goal) to be proved, and keep looking for rules that would allow to conclude that hypothesis

4 4 Forward Chaining Systems Facts -- represented in a working memory Rules -- possible actions to take when specified conditions hold Conditions -- usually patterns that must match items in the working memory Actions -- usually involve adding or deleting items from the working memory Interpreter -- controls the application of the rules, given the working memory

5 5 Conflict Resolution Recognize-Act cycle Recognize-Act cycle find all the rules whose conditions hold, given the current state of working memory select one and perform the actions in the action part of the rule Conflict resolution: Conflict resolution: The selection of a rule to be applied, based on fixed strategies

6 6 Some conflict resolution strategies :  Don't apply a rule twice on the same data.  Apply rules on more recent working memory elements before older ones.  Apply rules with more specific preconditions before ones with more general preconditions.  Use priorities

7 7 Exercise 1. IF coughing THEN smoky 2. IF wet AND not raining THEN burst_pipe 3. IF not coughing AND alarm_rings THEN burglar 4. IF smoky AND hot THEN fire goals: burglar, fire, burst_pipe Iinitial working memory: (hot) (coughing) (wet)

8 8 Backward Chaining Systems The algorithm: Given a goal state, See if it is a fact in the database. If YES - the goal is proved. If NO, find a rule, whose conclusion matches the goal. If no such rule exists, the goal fails. If a rule is found, take its premises as a new goal and try to prove it, using this algorithm.

9 9 Conclusion Definition: Knowledge representation languages: high level representation formalisms to represent knowledge required for AI problem solving. There is an on-going debate whether semantic nets, frames and production rules can be considered knowledge representation languages

10 10 General Considerations Semantic nets, frames and production rules reflect the perspective for a given problem. Semantic nets and frames : structure and properties of objects. Production rules : action with objects -- what to do when. Predicate logic : provides the inference engines for the other three basic schemes.

11 11 Implementation Any language can be used, however efforts are required to implement the inference mechanisms.


Download ppt "Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you."

Similar presentations


Ads by Google