Page 178 - Introduction to AI Robotics
P. 178

5.2 Behaviors as Objects in OOP



                                                                    follow corridor                   161
                                                                vector summation of MS





                                                       Motor         Motor         Perceptual
                                                     Schema 1:      Schema 2:      Schema 1:
                                                    perpendicular    uniform       find-walls
                                                                                  (polar plot)

                                                                       a.


                                                                    follow corridor
                                                                vector summation of behaviors




                                                       Behavior 1:               Behavior 1:
                                                       follow-wall               follow-wall
                                                         (left)                    (right)






                                                            Motor             Perceptual
                                                           Schema:             Schema:
                                                          follow-wall         find-walls
                                                          (which-side)        (polar plot)


                                                                       b.


                                      Figure  5.2 Class  diagrams  for  two   different  implementations  of
                                      follow_corridor: a.) use of primitive fields, and b.) reuse of fields grouped into a
                                      follow_wall behavior.
   173   174   175   176   177   178   179   180   181   182   183