for i = first child to n do
childstatus = Tick(child(i))
if childstatus = running
return running
else if childstatus = success
return success
end
return failure
for i from 1 to n do
childstatus = Tick(child(i))
if childstatus = running
return running
else if childstatus = failure
return failure
end
return success
for i = 1 to N:
state_i = Tick(child[i])
if nSucc(state) >= S:
return SUCCESS
else if nFail(state) >= F:
return FAILURE
else
return RUNNING