if (time_out OR (NOT sub_goal_active)) then
|
⊳ Select non-achieved sub-goal |
(sub_goal_image, sub_goal_position) ← Scan(goal) |
|
focus_image ← ScanEnvironmentWithSameFocusAsSubGoal(environment) |
|
sub_goal_active ← GoalNotAchievedCheck(sub_goal_image, focus_image) |
|
end if
|
|
if (sub_goal_active = TRUE) then
|
|
(object_image, object_position) ← Scan(environment) |
⊳ Select object |
(sub_goal_achievable, action) ← ActionPlanning(predictors, action_list,… |
|
sub_goal_image, sub_goal_position, object_image, object_position) |
⊳ Plan action |
if (sub_goal_achievable = TRUE) then
|
|
object_utility ← ComputeUtility(object_affordance, sub_goal_value) |
|
if (max_utility_estimatation = TRUE) then
|
⊳ Computing the maximum possible utility |
if (object_utility ≥ potential_utility) then
|
|
potential_utility ← LeakyAverage(potential_utility, object_utility) |
⊳ Increase utility expectation |
end if
|
|
else
|
⊳ Acting if high utility is attainable |
if (object_utility ≥ potential_utility) then
|
|
ExecuteAction(object_image, object_position, action) |
|
end if
|
|
potential_utility ← LeakyAverage(potential_utility, 0) |
⊳ Decrease utility expectation |
end if
|
|
sub_goal_active = FALSE |
|
end if
|
|
end if
|
|