Page 64 - Introduction to AI Robotics
P. 64

relevant to the problem is represented by facts, or axioms, in predicate logic.
                             AXIOMS   2.2 Attributes of the Hierarchical Paradigm                      47
                          PREDICATES  Predicates are functions that evaluate to TRUE or FALSE. By years of AI pro-
                                      gramming convention, predicates are usually written in uppercase.
                                        Consider the problem of a robot named IT in a room, R1, who needs to go
                                      to another room, R2, in the house shown in Fig. 2.4. In order to solve this
                                      problem using Strips, the robot has to be given a way of representing the
                                      world, which will in turn influence the difference table, a difference evalu-
                                      ator, and how the add and delete lists are written. The world model in the
                                      previous example was never formally defined.
                                        A world model is generally built up from static facts (represented as pred-
                                      icates) from a set of candidates, and things in the world, like the robot. The
                                      robot’s name is in all capitals because it exists (and therefore is TRUE). Low-
                                      ercase identifiers indicate that the thing is a variable, that a real thing hasn’t
                                      been assigned to that placeholder yet.
                                        Suppose the robot was limited to knowing only whether a movable object
                                      was in a room, next to a door or another movable object, and whether a door
                                      was open or closed and what rooms it connected. In a programming sense,
                                      there would be only three types of things in the world: movable_object
                                      (such as the robot, boxes it should pick up), room,and door. The robot’s
                                      knowledge could be represented by the following predicates:

                                        INROOM(x, r)         where x is an object of type movable_object,
                                                             r is type room
                                        NEXTTO(x, t)         where x is a movable_object,
                                                             t is type door or movable_object
                                        STATUS(d, s)         where d is type door,
                                                             s is an enumerated type: OPEN or CLOSED
                                        CONNECTS(d, rx, ry) where d is type door,
                                                             rx, ry are the room

                                        With the above predicates, the world model for the initial state of the world
                                      in Fig. 2.4 would be represented by:



                                      initial state:
                                      INROOM(IT, R1)
                                      INROOM(B1,R2)
                                      CONNECTS(D1, R1, R2)
                                      CONNECTS(D1, R2, R1)
                                      STATUS(D1,OPEN)
   59   60   61   62   63   64   65   66   67   68   69