# Deliberative and Conceptual Inference in Service Robots
## 6 Non-Monotonic Knowledge-Base Service
When a node \(S_{i}\) has been selected, a rigorous analysis of \(B\) is performed. For each basic action in B, check if the following preconditions are satisfied: * Two subsequent navigation moves are banned. If the action is a _move_ or a \(search(user)\), discard if the last action of \(P\) is a _move_ or a \(search(user)\). * Only useful observations. If the action is a \(search(object)\), discard if the last action of \(P\) is a \(search(object)\), \(search(user)\), or if the robot actually has objects in both hands. * Only deliveries after taking. If the action is \(deliver(o_{i})\), the action \(take(o_{i})\) should be included previously in the plan. * Only take actions if at least one hand is free. 3. For each basic actions of \(B\) not discarded using the preconditions, generate a successor node \(S_{ij}\) in this way: * If the basic action is \(move(s)\) or \(search(user)\) change the current location of the robot to \(s\) or the user position, respectively. If not, the current location of the robot in \(S_{ij}\) is the same as \(S_{i}\). * Update the state of the right and left hand if the basic action is a _take_ or a \(deliver\). * If the basic action was a \(deliver\), delete the associated element in the list \(R\) of remaining \(CO\cup TO\). If the list gets empty, a solution has been found. * Remove the basic action used to create this node from \(B\). * Add the basic action to the plan \(P\). 4. Return to step 1 to select a new node. When a solution has been found in the tree the plan \(P\) is post processed to generate a list of actions specified in terms of \(SitLog\) basic behaviors, which can be used by the dispatcher. A video showing a demo of the robot Golem-III performing as a supermarket assistant, including all the features described in this section is available at [[http://golem.iimas.unam.mx/inference-in-service-robots](http://golem.iimas.unam.mx/inference-in-service-robots)]([http://golem.iimas.unam.mx/inference-in-service-robots](http://golem.iimas.unam.mx/inference-in-service-robots)). The KB-system and the full Sitlog's code are also available at [[https://bit.ly/deliberative-inference](https://bit.ly/deliberative-inference)]([https://bit.ly/deliberative-inference](https://bit.ly/deliberative-inference)). We could have employed a ready-to-use planning systems for the implementation (e.g., Reference [65]) instead of the particular planning algorithm presented here, which we acknowledge is focused in the particular scenario, but our model is stated at the functional system level in opposition to particular algorithms that are used at the algorithmic level, and these two system levels should not be confused. ## 9 Conceptual Inference

This inference strategy is illustrated with a home scenario in which the robot plays the role of a butter, as follows:

1. The home has a number of rooms \(R=\{r_{1},...r_{n}\}\); a finite set of shelves \(S=\{s_{1},...s_{n}\}\) at their corresponding locations \(L=\{l_{1},...,l_{n}\}\), which may be within any arbitrary room, each having an arbitrary number of objects \(\{o_{1},...,o_{n}\}\) of a particular designated class \(c_{i}\in C\), the set of classes;
2. The human user, who may require assistance;
3. The human user has a child that plays at home and misplaces objects on wrong tables;
4. The robot has a number of conversational, task, and cognitive obligations, which are the same as in the supermarket scenario, but, in addition, it may provide the user plausible explanations about the causes of unexpected observations;
5. The user has a number of preferences that are stored in the robot's KB, which can be changed dynamically; in addition, the robot may know about general health recommendations that can be deployed along the execution of a task. The details of the implementation of the home scenario, including the use of the conditional defaults in the KB and the way they are managed, are explained in B. The roles played by the agents and the speech acts involved are analogous to those of the supermarket scenario.