def __init__(self, switchRobot, value=False):
     MotivationUnit.__init__(self, "switch", group_name='cognitive_layer')
     self.old_decoupled = value
     self.count_current_state = 0
     self.decoupled = value
     self.call_side_effect_at_iteration = -1
     self.switchRobot = switchRobot
 def __init__(self, name, startValue=0, bias=0, group_name='', delay=5):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     self.delay = delay
     self.current_count = 0
Example #3
0
 def __init__(self, name, startValue=0, bias=0, group_name=''):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     self.__modulatedConnectedTo = []
     self.activation_threshold = 0.5
 def __init__(self, name, startValue=0, bias=0, group_name=''):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     WTAUnitFast.wtaUnitList.append(self)
     if (len(WTAUnitFast.wtaUnitList) > 1):
         WTAUnitFast.weight_other = -1. / (len(WTAUnitFast.wtaUnitList) - 1)
 def __init__(self,
              name,
              startValue=0,
              bias=0,
              group_name='',
              time_window=100,
              threshold=0.5):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     self.time_window = time_window
     self.current_count = 0
     self.threshold = threshold
 def __init__(self, name, startValue=0, bias=0, group_name=''):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     WTAUnit.wtaUnitList.append(self)
     self.weight_vector = []
     if (len(WTAUnit.wtaUnitList) > 1):
         inhib_WTA_param = -1. / (len(WTAUnit.wtaUnitList) - 1)
     else:
         inhib_WTA_param = -1.
     for i in range(0, len(WTAUnit.wtaUnitList)):
         WTAUnit.wtaUnitList[i].weight_vector = [inhib_WTA_param] * len(
             WTAUnit.wtaUnitList)
         WTAUnit.wtaUnitList[i].weight_vector[i] = 1.
 def __init__(self,
              name,
              mod_target,
              threshold=1.0,
              startValue=0,
              bias=0,
              fct_param=None,
              group_name=''):
     MotivationUnit.__init__(self,
                             name=name,
                             startValue=startValue,
                             bias=bias,
                             group_name=group_name)
     # Source of PEP shift is a CoordinationInfluencePepShiftCalculator
     #self.source_activation = source_activation
     self.threshold = threshold
     self.modulated_target_function = mod_target
     self.mod_function_param = fct_param