def rightActivator(vehicle, distanceSensor, laserSensor): a = cut(laserSensor, OFFSET, 0, 0) b = cut(distanceSensor, DIFFERENTIAL, RADIUS * 2, 0) draw(vehicle) return NATURAL + limit(a + b, 0, DIFFERENTIAL)
def rightActivator(vehicle, leftProximitySensor, rightLightSensor, leftSmellSensor, rightSmellSensor, rightSoundSensor): prox = cut(leftProximitySensor, 0, DISTANCE_CUT, (DISTANCE_CUT - leftProximitySensor) * DISTANCE_BIAS, 0.5, -NATURAL - 1) light = cut(rightLightSensor, 0, LIGHT_CUT, (LIGHT_CUT - rightLightSensor) * LIGHT_BIAS) sound = cut(rightSoundSensor, 0, SOUND_CUT, (rightSoundSensor - SOUND_CUT) * SOUND_BIAS - 0.1) smell_diff = leftSmellSensor - rightSmellSensor smell_sum = leftSmellSensor + rightSmellSensor smell = ((smell_diff * CURVING_FACTOR) + cut(smell_sum, 0, 0.20, cut(abs(smell_diff)/(max(smell_sum,0.0001)/2.0), -sound + 1, 0.05, 0))) * vehicle.sexuality * SMELL_BIAS return VELOCITY_FACTOR*(prox + light + smell + sound + NATURAL)
def rightActivator(vehicle, leftProximitySensor, rightLightSensor, rightSoundSensor, leftSoundSensor): prox = cut(leftProximitySensor, 0, DISTANCE_CUT, (DISTANCE_CUT - leftProximitySensor) * DISTANCE_BIAS, 0.5, -NATURAL - 1) light = cut(rightLightSensor, 0, LIGHT_CUT, (LIGHT_CUT - rightLightSensor) * LIGHT_BIAS) sound = cut(rightSoundSensor, 0, SOUND_CUT, (SOUND_CUT - rightSoundSensor) * SOUND_BIAS) return VELOCITY_FACTOR*(prox + light + sound + NATURAL)