Page 175 - DCAP310_INTRODUCTION_TO_ARTIFICIAL_INTELLIGENCE_AND_EXPERT_SYSTEMS
P. 175

Unit 9: Search and Control Strategies




          IF there is less than 4l in the 4l container THEN fill the 4l container.              Notes
          Adding preconditions to operators => generation of production rules.
          Forwarded form of rule # 1:
            IF (x,y| x?4) THEN (4,y)

          The forwarded set of production rules:
            R1 IF (x,y| x?4) THEN (4,y)
            R2 IF (x,y| y?3) THEN (x,3)
            R3 IF (x,y| x>0) THEN (0,y)
            R4 IF (x,y| y>0) THEN (x,0)
            R5 IF (x,y| x+y>=4 ? y>0 ? x?4) THEN (4,y-(4-x))
            R6 IF (x,y| x+y>=3 ? x>0 ? y?3) THEN (x-(3-y),3)
            R7 IF (x,y| x+y?=4 ? y>0) THEN (x+y,0)
            R8 IF (x,y| x+y?=3 ? x>0) THEN (0,x+y)

          In certain states, more than one rule can be applied.
          e.g.: (4,0) satisfies the preconditions of R2, R3 ? R6
          Control or Search Strategy: Selecting rules; keeping track of those sequences of rules that have
          already been tried and the states produced by them. Goal state provides a basis for the termination
          of the problem solving task.
          (i)  Pattern Matching Stage: Execution of a rule requires a match.

               preconditions                match              content of
               of a rule                    <=====>            the working memory.
               when match is found          => rule is applicable
               several rules may be applicable
          (ii)  Conflict Resolution (Selection Strategy) Stage: Selecting one rule to execute;

          (iii)  Action Stage: Applying the action part of the rule => changing the content of the workspace
               =>new patterns, new matches => new set of rules eligible for execution
               Recognize-act control cycle

          Production System

          1.   Content of workspace => candidate rules for execution (search strategy)

          2.   Each rule surveys the entire workspace
          3.   A rule activates itself when its condition matches the content of the workspace
          Adv: Adding, deleting, revising rules without disturbing the rest of the system.

          Water Container Problem

             Production Rules                                    Facts in Working Memory
             IF (x<4) THEN FILL x                                                  (4,y)
             IF (y<3) THEN FILL y                                                  (x,3)
             IF (x>0) THEN EMPTY x                                                 (0,y)
             IF (y>0) THEN EMPTY y                                                 (x,0)
             IF (x+y>=4 AND y>0) THEN FILL x FROM y                            (4,y-(4-x))
            IF (x+y>=3 AND x>0) THEN FILL y FROM x                             (x-(3-y),3)




                                           LOVELY PROFESSIONAL UNIVERSITY                                   169
   170   171   172   173   174   175   176   177   178   179   180