Page 66 - Introduction to AI Robotics
P. 66

2.2 Attributes of the Hierarchical Paradigm
                                       operator           preconditions     add-list       delete-list  49
                                       OP1:               INROOM(IT,rk)     NEXTTO(IT,dx)
                                       GOTODOOR(IT,dx)    CONNECT(dx,rk,rm)
                                       OP2:               CONNECT(dx,rk,rm)  INROOM(IT,rm)  INROOM(IT,rk)
                                       GOTHRUDOOR(IT,dx)  NEXTTO(IT,dx)
                                                          STATUS(dx, OPEN)
                                                          INROOM(IT,rk)
                                        This difference table says the robot is programmed for only two opera-
                                      tions: go to a door, and go through a door. The GOTODOOR operator can be
                                      applied only if the following two preconditions are true:

                                        INROOM(IT, rk) The robot is in a room, which will be assigned to the
                                         identifier rk.
                                        CONNECT(dx, rk, rm) There is a door, which will be assigned to the
                                         identifier dx, which connects rk to some other room called rm.

                                        The label IT is used to constrain the predicates. Notice that only the vari-
                                      ables dx and rk get bound when GOTODOOR is called. rm can be anything.
                                      If GOTODOOR is executed, the robot is now next to the door called dx. Noth-
                                      ing gets deleted from the world state because the robot is still in room rk,
                                      the door dx still connects the two rooms rk and rm. The only thing that has
                                      changed is that the robot is now in a noteworthy position in the room: next
                                      to the door.
                                        The difference table specifies that the GOTHRUDOOR operator will only work
                                      if the robot is in the room next to the door, the door is open, and the door con-
                                      nects the room the robot is in to another room. In this case, predicates must
                                      be added and deleted from the world model when the operator executes.
                                      When the robot is in room rk and goes through the door, it is now in room
                                      rm (which must be added to the world model) and is no longer in room rk
                                      (which must be deleted).
                                        So far, the world model and difference table should seem reasonable, al-
                                      though tedious to construct. But constructing a difference table is pointless
                                      without an evaluation function for differences. (Notice that there wasn’t a
                                      column for the difference in the above table.) The difference evaluator in
                                      the travel example was Euclidean distance. In this example, the evaluator is
                                      predicate calculus, where the initial state is logically subtracted from
                                      the goal state. The logical difference between the initial state goal
                                      state is simply:

                                         :INROOM(IT, R2) or INROOM(IT, R2)=FALSE
   61   62   63   64   65   66   67   68   69   70   71