Page 248 - DCAP310_INTRODUCTION_TO_ARTIFICIAL_INTELLIGENCE_AND_EXPERT_SYSTEMS
P. 248

Introduction to Artificial Intelligence & Expert Systems




                    Notes          y are variables matching any character of the input string alphabet. Matching resumes with P1
                                   once the replacement has been made.
                                   The string “ABC”, for instance, undergoes the following sequence of transformations under
                                   these production rules:
                                     $ABC (P6)
                                     B$AC (P5)
                                     BC$A (P5)
                                     $BC$A (P6)
                                     C$B$A (P5)
                                     $C$B$A (P6)
                                     $$C$B$A (P6)
                                     *C$B$A (P1)
                                     C*$B$A (P3)
                                     C*B$A (P2)
                                     CB*$A (P3)
                                     CB*A (P2)
                                     CBA* (P3)
                                     CBA (P4)

                                   In such a simple system, the ordering of the production rules is crucial. Often, the lack of control
                                   structure makes production systems difficult to design. It is, of course, possible to add control
                                   structure to the production systems model, namely in the inference engine, or in the working
                                   memory.

                                   13.3.2 Frame Architecture

                                   In a toy simulation world where a monkey in a room can grab different objects and climb on
                                   others, an example production rule to grab an object suspended from the ceiling would look
                                   like:
                                     (p Holds::Object-Ceiling
                                       {(goal ^status active ^type holds ^objid <O1>) <goal>}
                                       {(physical-object
                                          ^id <O1>
                                          ^weight light
                                          ^at <p>
                                          ^on ceiling) <object-1>}
                                       {(physical-object ^id ladder ^at <p> ^on floor) <object-2>}
                                       {(monkey ^on ladder ^holds NIL) <monkey>}
                                       -(physical-object ^on <O1>)
                                      -- >
                                       (write (crlf) Grab <O1> (crlf))
                                       (modify <object1> ^on NIL)
                                       (modify <monkey> ^holds <O1>)
                                       (modify <goal> ^status satisfied)
                                     )
                                   In this example, data in working memory is structured and variables appear between angle
                                   brackets. The name of the data structure, such as “goal” and “physical-object”, is the first literal
                                   in conditions; the fields of a structure are prefixed with “^”. The “-” indicates a negative condition.
                                   Self Assessment


                                   State whether the following statements are true or false:
                                   7.  A production system also contains a database called working memory.
                                   8.  The “-” indicates a positive condition.
                                   9.  The lack of control structure makes production systems difficult to design.




          242                               LOVELY PROFESSIONAL UNIVERSITY
   243   244   245   246   247   248   249   250   251   252   253