blob: ee38bc4c82faf2680349e44d403fa618785d7581 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from operationscore.Behavior import *
class RecursiveDecay(Behavior):
def processResponse(self, sensorInputs, recursiveInputs):
ret = []
for response in sensorInputs:
if not 'ResponsesLeft' in response:
response['ResponsesLeft'] = self['InitialResponseCount']
else:
response['ResponsesLeft'] -= 1
if response['ResponsesLeft'] > 0:
ret.append(response)
return (ret, recursiveInputs) #no direct ouput
|