示例#1
0
    def __init__(self, name, goal, max_move, variability=.5):
        super().__init__(name, goal, max_move, max_detect=max_move)

        self.my_filter = lambda n: isinstance(n, self.other)

        self.new_stance = vs.VectorSpace()
        self.other = None
        self.variability = variability
示例#2
0
 def survey_env(self):
     """
     Look around and see what surrounds us.
     """
     super().survey_env()
     other_pre = vs.VectorSpace()
     for other in self.neighbor_iter(view=self.my_view,
                                     filt_func=self.my_filter):
         # accumulate prehensions:
         other_pre = other.visible_stance().prehend(other_pre)
     return other_pre
示例#3
0
 def __init__(self, name, goal, max_move=1, max_detect=1):
     super().__init__(name, goal, max_move, max_detect)
     self.my_filter = None
     self.stance = vs.VectorSpace()