Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 RBS CS 331/531 Dr M M Awais Production Systems  Symbolic based Rule based system  Based on simple working principle  System consists of:  production.

Similar presentations


Presentation on theme: "1 RBS CS 331/531 Dr M M Awais Production Systems  Symbolic based Rule based system  Based on simple working principle  System consists of:  production."— Presentation transcript:

1 1 RBS CS 331/531 Dr M M Awais Production Systems  Symbolic based Rule based system  Based on simple working principle  System consists of:  production rules  working memory  recognise-act control cycle.

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

3 3 RBS CS 331/531 Dr M M Awais 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

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

5 5 RBS CS 331/531 Dr M M Awais Recognise – Act Cycle Initialise Working Memory Productions - Conditions Conflict Set Conflict Resolution (if the two match) (one pattern taken at a time) (Enabled) Production - (Fired) 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

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

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

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

9 9 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.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 cbbc a cb cca bc cc

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

11 11 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

12 12 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

13 13 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

14 14 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

15 15 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

16 16 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

17 17 RBS CS 331/531 Dr M M Awais Example: Production Set: 1.ba  ab 2.ca  ac 3.cb  bc Iteration#WMConflict SetRule Fired 0cbaca1,2,31 1cabca22 2acbca2,32 3acbac1,31 4acabc22 5aacbc33 6aabccNIL

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

19 19 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Data Driven: Production Set: Iteration#WMConflict SetRule Fired 0start66 1start,v,y,q6,55 2start,v,r,q,s6,5,22 3start,v,r,q,s,p6,5,2,11 4start,v,r,q,s,p, goal 6,5,2,1NIL

20 20 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Data Driven: Production Set: Iteration#WMConflict SetRule Fired 0start66 1start,v,r,q6,55 2start,v,r,q,s6,5,22 3start,v,r,q,s,p6,5,2,11 4start,v,r,q,s,p, goal 6,5,2,1NIL

21 21 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Data Driven: Production Set: Iteration#WMConflict SetRule Fired 0start66 1start,v,r,q6,55 2start,v,r,q,s6,5,22 3start,v,r,q,s,p6,5,2,11 4start,v,r,q,s,p, goal 6,5,2,1NIL

22 22 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Data Driven: Production Set: Iteration#WMConflict SetRule Fired 0start66 1start,v,y,q6,55 2start,v,r,q,s6,5,22 3start,v,r,q,s,p6,5,2,11 4start,v,r,q,s,p, goal 6,5,2,1NIL

23 23 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Data Driven: Production Set: Iteration#WMConflict SetRule Fired 0start66 1start,v,y,q6,55 2start,v,r,q,s6,5,22 3start,v,r,q,s,p6,5,2,11 4start,v,r,q,s,p, goal 6,5,2,1NIL

24 24 RBS CS 331/531 Dr M M Awais start qrv

25 25 RBS CS 331/531 Dr M M Awais start qrv s

26 26 RBS CS 331/531 Dr M M Awais start qrv s p

27 27 RBS CS 331/531 Dr M M Awais start qrv s p goal

28 28 RBS CS 331/531 Dr M M Awais start qrv s p goal

29 29 RBS CS 331/531 Dr M M Awais start qrv s p goal

30 30 RBS CS 331/531 Dr M M Awais start qrv s p goal

31 31 RBS CS 331/531 Dr M M Awais Production Set: 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.Start  v ^ r ^ q GOAL Driven Search in Production System

32 32 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

33 33 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

34 34 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

35 35 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

36 36 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  q 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

37 37 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  p 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

38 38 RBS CS 331/531 Dr M M Awais 1.p ^ q  goal 2.r ^ s  p 3.w ^ r  p 4.t ^ u  q 5.v  s 6.start  v ^ r ^ q Goal Driven: Production Set: Iteration#WMConflict SetRule Fired 0Goal11 1Goal,p,q1,2,3,42 2Goal,p,q,r,s1,2,3,4,53 3Goal,p,q,r,s,w1,2,3,4,54 4Goal,p,q,r,s,w,t,u1,2,3,4,55 5Goal,p,q,r,s,w,t,u,v1,2,3,4,5,66 6Goal,p,q,r,s,w,t,u,v,start1,2,3,4,5,6NIL

39 39 RBS CS 331/531 Dr M M Awais goal qp

40 40 RBS CS 331/531 Dr M M Awais goal qp r w

41 41 RBS CS 331/531 Dr M M Awais goal qp r w s r

42 42 RBS CS 331/531 Dr M M Awais goal qp r w s r t u

43 43 RBS CS 331/531 Dr M M Awais goal qp r w s r t u v

44 44 RBS CS 331/531 Dr M M Awais goal qp r w s r t u start v

45 45 RBS CS 331/531 Dr M M Awais goal qp r w s r t u start v

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

47 47 RBS CS 331/531 Dr M M Awais 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

48 48 RBS CS 331/531 Dr M M Awais 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.

49 49 RBS CS 331/531 Dr M M Awais Example: RBS with 5 Rules R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then 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

50 50 RBS CS 331/531 Dr M M Awais 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 R4 is fired Aimlessly R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry

51 51 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry

52 52 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry

53 53 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 fire R1 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry

54 54 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 fire R1 Switch_on_sprinklers R3 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry

55 55 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 fire R1 Switch_on_sprinklers R3 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry Delete dry

56 56 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 fire R1 Switch_on_sprinklers R3 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry Delete dry

57 57 RBS CS 331/531 Dr M M Awais Forward Chaining: Rule firing Alarm beepsHot dry Switch_on_humdifiers R4 smoky R2 fire R1 Switch_on_sprinklers R3 R1: If hot and smoky then add fire R2: If alarm beeps then add smoky R3: If fire then add switch on the sprinklers R4: If dry Then add switch on humidifier R5: If switch on sprinklers then Delete dry Given Facts: Alarm beeps, hot, dry Delete dry Invalid rule

58 58 RBS CS 331/531 Dr M M Awais Forward Chaining End up firing more than required rules Generally applied when lots of facts are known about the system

59 59 RBS CS 331/531 Dr M M Awais Backward chaining From the goal find the initial conditions that satisfy the goal. Goals are divided into sub-goals and then further sub-goals are found until the initial conditions are reached Applied when the goal is exactly known

60 60 RBS CS 331/531 Dr M M Awais Backward chaining Hypothesize that the goal is true and then try to prove the hypothesis Start from the GOAL and see if the WM supports the facts required to make the goal true

61 61 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers

62 62 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts

63 63 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts

64 64 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts

65 65 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts

66 66 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts No rule available but present in the facts

67 67 RBS CS 331/531 Dr M M Awais Example R1: if smoky and hot then add fire R2: If alarm beeps then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Switch on sprinklers fire R4 smokyhot R1 Alarm beeps R2 No rule available but present in the facts No rule available but present in the facts HENCE THE GOAL IS SATISFIED

68 68 RBS CS 331/531 Dr M M Awais Example IF (lecturing X) and (marking practicals X) Then Add (overworked X) If (month feb) then add (lecturing ali) If (month feb) Then add (marking practical ali) IF (overworked X) or (sleepless X) Then (bad mood X) If (bad mood X) then Delete (happy X) If (lecturing X) the Delete (researching X) IF (year 2004) then (economy bad) Fact Set 1: (month feb), (happy ali), (researching ali) Fact set 2: (month feb), (year 2004) Goal: find whether Ali is in bad mood or not

69 69 RBS CS 331/531 Dr M M Awais Conflict Resolution General Approaches: General Conflict Resolution strategies Problem Specific Conflict Resolution Strategies Rules that control the resolution process are called META rules

70 70 RBS CS 331/531 Dr M M Awais General Conflict Resolution strategies: META Rules Law of Recency Prefer rules for which the facts have been added recently Law of Specificity Prefer more specific rules, i.e, rules that have more conditions

71 71 RBS CS 331/531 Dr M M Awais Examples: Recency Rule1: Credit History Rule: IF X has had credit for less than 3 years THEN X’s credit history is very low Rule2: High Risk Rule IF X’s credit history is very low AND X has been unemployed for more than half of his adult years THEN X is a high credit risk customer Rule 3: Age Rule IF X’s age is less than 25 years THEN X is young

72 72 RBS CS 331/531 Dr M M Awais Examples: Recency Rule1: Credit History Rule: IF X has had credit for less than 3 years THEN X’s credit history is very low Rule2: High Risk Rule IF X’s credit history is very low AND X has been unemployed for more than half of his adult years THEN X is a high credit risk customer Rule 3: Age Rule IF X’s age is less than 25 years THEN X is young 1.Atif is 25 years old 2.Atif has 1 yr of credit history 3.Atif unemployed for 3/5 of his adult life

73 73 RBS CS 331/531 Dr M M Awais Examples: Recency Rule1: Credit History Rule: IF X has had credit for less than 3 years THEN X’s credit history is very low Rule2: High Risk Rule IF X’s credit history is very low AND X has been unemployed for more than half of his adult years THEN X is a high credit risk customer Rule 3: Age Rule IF X’s age is less than 25 years THEN X is young 1.Atif is 25 years old 2.Atif has 1 yr of credit history 3.Atif unemployed for 3/5 of his adult life 1.Atif is 25 years old 2.Atif has 1 yr of credit history 3.Atif unemployed for 3/5 of hisadult life 4.Atif’s credit history is very low R1 Newly added fact Why wasn’t the Rule 3 fired?, will be answered later

74 74 RBS CS 331/531 Dr M M Awais Examples: Recency Rule1: Credit History Rule: IF X has had credit for less than 3 years THEN X’s credit history is very low Rule2: High Risk Rule IF X’s credit history is very low AND X has been unemployed for more than half of his adult years THEN X is a high credit risk customer Rule 3: Age Rule IF X’s age is less than 25 years THEN X is young 1.Atif is 25 years old 2.Atif has 1 yr of credit history 3.Atif unemployed for 3/5 of his adult life 1.Atif is 25 years old 2.Atif has 1 yr of credit history 3.Atif unemployed for 3/5 of hisadult life 4.Atif’s credit history is very low R1 Newly added fact R2 To be added: Atif is a high credit risk customer

75 75 RBS CS 331/531 Dr M M Awais Specificity Prefer rules with more specific conditions I.e., rules having more antecedents R1: if smoky and hot then add fire R2: If alarm beeps and hot then add smoky R3: If alarm beeps then add ear plugs R4: If fire then add switch on sprinklers R5: If smoky then add poor visibility Facts: Alarm beeps, hot Goal: Switch on sprinklers Which rule is preferred R2 or R3? R2 is more specific, so prefer R2

76 76 RBS CS 331/531 Dr M M Awais Problem Specific Conflict Resolution strategies: META Rules Prefer rules with credit history over others Rule1: Credit History Rule: IF X has had credit for less than 3 years THEN X’s credit history is very low Rule2: High Risk Rule IF X’s credit history is very low AND X has been unemployed for more than half of his adult years THEN X is a high credit risk customer Rule 3: Age Rule IF X’s age is less than 25 years THEN X is young

77 77 RBS CS 331/531 Dr M M Awais Decision Trees Vs RBS Decision trees also implement rules Decision trees also implement the decision strategies Sequence of rule firing is built in RBS does not have the sequence built in, the conflict resolution strategies are developed.


Download ppt "1 RBS CS 331/531 Dr M M Awais Production Systems  Symbolic based Rule based system  Based on simple working principle  System consists of:  production."

Similar presentations


Ads by Google