1 / 77

Production Systems

Production Systems. Symbolic based Rule based system Based on simple working principle System consists of: production rules working memory recognise-act control Cycle. Production Rules (Productions). Production Rules are: Condition – Action Pair .

colin
Download Presentation

Production Systems

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. Production Systems • Symbolic based Rule based system • Based on simple working principle • System consists of: • production rules • working memory • recognise-act control Cycle. CS 331/531 Dr M M Awais

  2. Production Rules (Productions) • Production Rules are: • Condition – Action Pair Pattern that determines when to apply rule Defines the associated problem-solving step. CS 331/531 Dr M M Awais

  3. Working Memory • Contains the description of current state • WM state is compared with the condition part of the production rules to determine the type of action required. • Always changes when productions are applied CS 331/531 Dr M M Awais

  4. Recognise – Act Cycle Initialise Working Memory • Productions - Conditions (if the two match) (Enabled) Conflict Set (one pattern taken at a time) Production - (Fired) Conflict Resolution Match the WM memory with the conditions of rules CS 331/531 Dr M M Awais

  5. Recognise – Act Cycle Initialise Working Memory • Productions - Conditions (if the two match) (Enabled) Conflict Set (one pattern taken at a time) Production - (Fired) Conflict Resolution Productions can only fire when conditions in production-conditions are matched in the working memory (WM). If they match a subset of productions is formed called Conflict Set. Part of Production That Are Enabled CS 331/531 Dr M M Awais

  6. Recognise – Act Cycle Initialise Working Memory • Productions - Conditions (if the two match) (Enabled) Conflict Set (one pattern taken at a time) Production - (Fired) Conflict Resolution It chooses a rule from conflict set for firing. Selection of any rule may be based on complex rule selection heuristics. CS 331/531 Dr M M Awais

  7. Recognise – Act Cycle Initialise Working Memory • Productions - Conditions (if the two match) (Enabled) Conflict Set (one pattern taken at a time) Production - (Fired) Conflict Resolution Fire a rule and update the WM CS 331/531 Dr M M Awais

  8. P A1 P A2 - - - - Pattern Action WM Patterns Feedback in the Systems in which no conflict resolution remains. All conflicts are resolved A Production System CS 331/531 Dr M M Awais

  9. acbcc abccc Example: • Production Set: • ba  ab • ca  ac • cb  bc • (whenever a pattern on the LHS appears replace it with the one on the RHS ) • Working Memory = acbcc • Conflict Set = 3 • Rule fired = 3 CS 331/531 Dr M M Awais

  10. Example:Production Set: • ba  ab • ca  ac • cb  bc CS 331/531 Dr M M Awais

  11. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  12. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  13. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  14. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  15. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  16. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  17. ba  ab • ca  ac • cb  bc Example:Production Set: CS 331/531 Dr M M Awais

  18. Data Driven Search in Production System • Production Set: • p ^ q  goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • Start  v ^ r ^ q • IF symbols on the LHS appear then add the symbols on the RHS to the WM CS 331/531 Dr M M Awais

  19. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  20. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  21. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  22. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  23. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  24. start v r q CS 331/531 Dr M M Awais

  25. start v r q s CS 331/531 Dr M M Awais

  26. start v r q s p CS 331/531 Dr M M Awais

  27. start v r q s p goal CS 331/531 Dr M M Awais

  28. start v r q s p goal CS 331/531 Dr M M Awais

  29. start v r q s p goal CS 331/531 Dr M M Awais

  30. start v r q s p goal CS 331/531 Dr M M Awais

  31. GOAL Driven Search in Production System • Production Set: • p ^ q  goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • Start  v ^ r ^ q CS 331/531 Dr M M Awais

  32. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  33. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  34. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  35. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  36. p ^ q goal • r ^ s  p • w ^ r  q • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  37. p ^ q goal • r ^ s  p • w ^ r  p • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  38. p ^ q goal • r ^ s  p • w ^ r  p • t ^ u  q • v  s • start  v ^ r ^ q Data Driven: Production Set: CS 331/531 Dr M M Awais

  39. goal p q CS 331/531 Dr M M Awais

  40. goal p q w r CS 331/531 Dr M M Awais

  41. goal p q w s r r CS 331/531 Dr M M Awais

  42. goal p q u w t s r r CS 331/531 Dr M M Awais

  43. goal p q u w t s r r v CS 331/531 Dr M M Awais

  44. goal p q u w t s r r v start CS 331/531 Dr M M Awais

  45. goal p q u w t s r r v start CS 331/531 Dr M M Awais

  46. Hearsay – II (Erman et.al 1980) • One of the first developed project • AIMED at speech recognition system CS 331/531 Dr M M Awais

  47. Rule Based System • Modeled as Production systems • Production Systems implemented as Cause-Effect rules • RBS have IF-THEN rules in their structures • Working principle is same as production system • Capable of handling vague concepts CS 331/531 Dr M M Awais

  48. Rule Based System • Find all the rules which have the IF part satisfied • Select one rule using conflict resolution • Perform action and modify the Working memory • Repeat until all the rules have been fired or the goal have been reached. CS 331/531 Dr M M Awais

  49. Example: RBS with 5 Rules • R1: If hot and smoky then add fire • R2: If alarmbeepsthen add smoky • R3: If fire then add switch on the sprinklers • R4: If dryThen add switch on humidifier • R5: If switch on sprinklers then Delete dry • Given Facts: Alarm beeps, hot, dry • If you associate every fact with symbols it becomes a production system CS 331/531 Dr M M Awais

  50. R1: If hot and smoky then add fire • R2: If alarm beepsthen add smoky • R3: If fire then add switch on the sprinklers • R4: If dryThen add switch on humidifier • R5: If switch on sprinklers then Delete dry • Given Facts: Alarm beeps, hot, dry Forward Chaining:Rule firing • R2 and R4 can be fired • If R2 fired then • R1, R3, and R5 will follow • As a result: Dry will be deleted from WM • If R4 is fired • R2, R1, R3, and R5 will be fired • As a result: Dry will be deleted from WM • R4 is fired Aimlessly CS 331/531 Dr M M Awais

More Related