scieee AI-readable full text Open interactive document viewer

Generating predicate suggestions based on the space of plans: an example of planning with preferences

Canal Camprodon, Gerard,Torras, Carme,Alenyà Ribas, Guillem

Abstract

Task planning in human–robot environments tends to be particularly complex as it involves additional uncertainty introduced by the human user. Several plans, entailing few or various differences, can be obtained to solve the same given task. To choose among them, the usual least-cost plan criteria is not necessarily the best option, because here, human constraints and preferences come into play. Knowing these user preferences is very valuable to select an appropriate plan, but the preference values are usually hard to obtain. In this context, we propose the Space-of-Plans-based Suggestions (SoPS) algorithms that can provide suggestions for some planning predicates, which are used to define the state of the environment in a task planning problem where actions modify the predicates. We denote these predicates as suggestible predicates, of which user preferences are a particular case. The first algorithm is able to analyze the potential effect of the unknown predicates and provide suggestions to values for these unknown predicates that may produce better plans. The second algorithm is able to suggest changes to already known values that potentially improve the obtained reward. The proposed approach utilizes a Space of Plans Tree structure to represent a subset of the space of plans. The tree is traversed to find the predicates and the values that would most increase the reward, and output them as a suggestion to the user. Our evaluation in three preference-based assistive robotics domains shows how the proposed algorithms can improve task performance by suggesting the most effective predicate values first.

Full text

User Modeling and User-Adapted Interaction (2023) 33:333–357 https://doi.org/10.1007/s11257-022-09327-w Generating predicate suggestions based on the space of plans: an example of planning with preferences Gerard Canal1·Carme Torras2·Guillem Alenyà2 Received: 12 December 2020 / Accepted in revised form: 23 April 2022 / Published online: 31 May 2022 © The Author(s) 2022 Abstract Task planning in human–robot environments tends to be particularly complex as it involves additional uncertainty introduced by the human user. Several plans, entailing few or various differences, can be obtained to solve the same given task. To choose among them, the usual least-cost plan criteria is not necessarily the best option, because here, human constraints and preferences come into play. Knowing these user preferences is very valuable to select an appropriate plan, but the preference values are usually hard to obtain. In this context, we propose the Space-of-Plans-based Suggestions (SoPS) algorithms that can provide suggestions for some planning predicates, which are used to define the state of the environment in a task planning problem where actions modify the predicates. We denote these predicates as suggestible predicates, of which user preferences are a particular case. The first algorithm is able to analyze the potential effect of the unknown predicates and provide suggestions to values for these unknown predicates that may produce better plans. The second algorithm is able to suggest changes to already known values that potentially improve the obtained This work has been partially supported by the ERC project Clothilde (ERC-2016-ADG-741930); by MCIN/AEI/10.13039/501100011033 under the project CHLOE-GRAPH (PID2020-118649RB-l00); by the European Union NextGenerationEU/PRTR under the project ROB-IN (PLEC2021-007859); and by the CHIST-ERA project COHERENT (EPSRC EP/V062506/1). Gerard Canal has also been supported by the Spanish Ministry of Education, Culture and Sport by the FPU15/00504 doctoral grant and by the Royal Academy of Engineering and the Office of the Chief Science Adviser for National Security under the UK Intelligence Community Postdoctoral Research Fellowship programme. BGerard Canal [email protected]; [email protected] Carme Torras [email protected] Guillem Alenyà [email protected] 1Department of Informatics, King’s College London, London, United Kingdom 2Institut de Robòtica i Informàtica Industrial, CSIC-UPC, Llorens i Artigas 4-6, 08028 Barcelona, Spain 123 334 G. Canal et al. reward. The proposed approach utilizes a Space of Plans Tree structure to represent a subset of the space of plans. The tree is traversed to find the predicates and the values that would most increase the reward, and output them as a suggestion to the user. Our evaluation in three preference-based assistive robotics domains shows how the proposed algorithms can improve task performance by suggesting the most effective predicate values first. Keywords Planning suggestions ·Preference-based planning ·Space of plans tree search 1 Introduction Artificial intelligence planning has proved useful to solve different problems in robotics and computer science. Planning systems were traditionally handled by experts in the field, but this trend is now changing as technology evolves and gets closer to lay users. Therefore, as robots and complex decision-making systems enter our homes, a need for communication and explanation of the reasons behind the system’s decisions arises. Suggestions are an example of this kind of communication. A non-expert user may not know all the possible configurations the system may have. Hence, the system itself may suggest potential configurations that could improve its performance, taking into account the configuration values that have already been set (user-provided). Such suggestions can also be used for explanation purposes. In this case, the system could use suggestions that improve the performance to explain why the performance of the system was not good. Or it can use such elements to show why a specific configuration is better than a different one, which would perform worse. In this paper, we analyze the case of providing suggestions for predicates in planning domains. A predicate is an assertion that may be true or false depending on the values of the variables that occur in it. In a planning problem, predicates are used to describe the domain, and the values assigned to them define the state at any given moment. This state can then be modified by applying actions, which have effects that modify the values of these predicates of the state. We define suggestions as predicate assignments that improve the plan’s reward, such as preferences over the task execution. As an example, such predicates can be the desired speed in a robotics task. We propose two algorithms capable of providing suggestions. The first one finds out values for unassigned predicates that produce better plans; the second one proposes reasonable changes to already assigned predicates by suggesting values close to the current ones. To do so, our algorithms process a portion of the Space of Plans in search of the best assignment of values to predicates. A Space of Plans is a set of possible plans that bring the system from a start state to a goal state. This subset of the Space of Plans is expressed as a Space of Plans Tree structure that provides a compact representation very convenient for searching and traversing. Then, we demonstrate the ability of the proposed methods to improve the reward obtained by the planner, even when low-performance configurations are initially provided. The methods are evaluated in three simulated robotic-assistive tasks, namely shoe-fitting, user feeding and assisted dressing, where the suggestions relate to user preferences that the planner uses to guide 123 Generating predicate suggestions… 335 the search. To perform an extensive evaluation, user-specified preference values have also been simulated. These kinds of robot-assistive tasks are particularly complex as they usually involve close contact with human users. Therefore, there is an inherent danger for the user, and planning the task beforehand permits coping with unexpected behaviors (Canal et al. 2018). Allowing the robot to modify its behavior to adapt to the user can improve the performance of the task when assisting a user (Gao et al. 2015; Andriella et al. 2020; Rossi et al. 2017). Preferences have been used to modify the robot behavior through planning (Canal et al. 2019a), and their usefulness has been evaluated by Canal et al. (2021). However, the acquisition of user preferences has proven difficult. The methods we propose in this paper can amend this shortcoming by initializing the user model based on a few preferences and then improving this model by employing the suggested values. The paper is organized as follows. Section 2reviews related work in the field, and Sect. 3analyzes further the motivation behind this work. In Sect. 4the proposed algorithms are described, while Sect. 5evaluates their performance. Finally, Sect. 6 provides conclusions of this work and envisaged further research. 2 Related work Our proposed work is closely related to and inspired by different topics. We build on top of the concept of planning “excuses” (Göbelbecker et al. 2010), which are defined as the changes needed in the state to find a solution when no plan could be found. This concept was explored by Martínez et al. (2017) to guide a human teacher when the plan could not be solved. These excuses were also used to find alternative models to explain unexpected states. Similarly, we seek the predicates that can improve the planning performance and provide them as suggestions to the user. We do so by finding the differences between planning states that may cause the largest differences in the plan’s reward. Therefore, our proposed methods are related to the concept of human-aware task planning and human-in-the-loop planning, where the planner takes into account both the human and the robot’s actions and abilities to improve task performance. Alami et al. (2006) proposed a scheme to integrate humans in the robot control architecture. In it, the abilities and constraints from the users, their needs and their preferences are taken into account in the planning process. The preferences are defined over states, resulting in some states being preferred to others, or as preferred and disliked action sequences along with costs. The authors do not specify how are such preferences represented. In contrast, our approach specifies concrete preference values that are used by the planner to adapt the action selection to them based on the expected produced reward. Cirillo et al. (2010) proposed a planner able to take into account forecasted human actions that constrain the planner allocation of tasks to the robot, but also create new robot goals. Other examples include the Hierarchical Agent-based Task Planner (HATP) (De Silva et al. 2015), where agents are taken into account as first-class entities and user-defined social rules describe the acceptable behaviors of the agents, allowing the creation of plans that take the user safety and comfort into consideration. Fiore et al. 123 336 G. Canal et al. (2016) presented a system designed to consider human preferences in human–robot collaboration tasks. In it, the robot can assume different roles and plan the actions for the human, to which it suggests which actions to perform, and also acts as a human assistant. The system can compute a plan for the robot while taking the human into account, but preferences and adaptation are not considered. Chakraborti et al. (2018) show how to project robot intentions during plan executions to assist human–robot interactions using an augmented reality system. The proposed system can reduce the ambiguity over possible plans during task execution and plan generation. In this system, the robot can combine the plan cost with the ability to reveal intentions to improve interaction and task performance. Their goal is to reduce ambiguity over a plan. In contrast, we aim to provide suggestions of preference values that would improve plan performance. The works above mainly assume that the values of the user preferences, if present, are known. Contrarily, in this work we use the concept of suggestions to assess how the task performance could be improved when there are unassigned predicates, such as preferences, which may be unknown. Users are fully modeled by Umbrico et al. (2020), where a user profile is built into an ontology that includes semantics for representing the physical and cognitive capabilities of a person. The proposed system is able to adapt the robot behavior to the user profile in socially assistive robotics scenarios. This work describes a wide framework composed of several modules including planning for action selection based on user need. Conversely, our proposal focuses on the planning part and deals with specific tasks where the preferences help to select how is the task performed, and in discovering what preference values improve the task’s performance. Our algorithms are based on analyzing the Space of Plans in search of general predicate suggestions, that is, predicates that are missing but that knowing them would help produce better plans. In this paper, we use the example of preference predicates in assistive scenarios. This could also be seen as a preference elicitation process, where we obtain preference suggestions based on already known values. Das et al. (2019) propose a method for eliciting preferences from a human expert while planning. Their approach uses hierarchical task network (HTN) planning to identify when and where the expert guidance will be useful and seek expert preferences to improve the planner decisions. In our case, we similarly suggest user preferences based on the planner reward function without the need of recurring to the human expert during the planning process. However, in our approach, the expert is the one generating the reward function that uses the preferences. Similar to our approach, Kim et al. (2018) perform a search in the space of possible plans to learn to infer final plans in human team planning. They the cost of plan candidates as the reinforcement learning signal, while we perform a search on the space of plans itself to find suggestions to planning predicate values that improve plan’s reward. Another example of the use of plan trees is the one by Shmaryahu et al. (2016), where those are employed for network penetration testing. The use of preferences to guide search has been investigated by other authors too. Domshlak et al. (2011) review the use of preferences in AI. In the case of planning, PDDL3 (Gerevini and Long 2005) explicitly integrated preferences in the language. They are represented as conditions that do not need to be true to achieve a goal or precondition, but achieving them is desirable. In contrast, we do not use preferences as conditions but we see them as predicates that guide the search by modifying the 123 Generating predicate suggestions… 337 associated costs and rewards, allowing the use of general purpose planners. Baier and McIlraith review preference-based planning (PBP) in Baier and McIlraith (2008), where preferences are used to distinguish plans by quality and argue for the need for reasoning over preferences when generating a plan, obtaining the most preferred plan. In this case, preferences are specified by an ordering function over the space of plans, where some plans are preferred to others. In our case, preferences are explicit and modify the plan, representing preferences over the task rather than on the plan. We do not use the concept of preferred plan, but the one of preferences that affect the resulting plan. Bidoux et al. (2019) use the PDDL3 language to model preferences over the plans, like in PBP. They use multi-attribute utility criteria (MAUT) to then plan with these preferences using a multiple criteria decision analysis (MCDA). More examples of uses of preferences include another method proposed by Sohrabi et al. (2011), which generates preferred explanations for the observed behavior of the system using planning. A survey on preference-based reinforcement learning by Wirth et al. (2017) reviews works using preference-based reward functions obtained from experts. Monte Carlo Tree Search algorithm using preferences to guide search can be found in Joppen et al. (2018). In this case, an ordinal MDP is solved where the reward function is defined on a qualitative scale, where states can only be compared preference-wise (i.e., one state is preferred to another). Therefore, here the preferences are over states and allow them to be compared, similarly to the concept of preferences in PBP. Another reinforcement learning algorithm that benefits from the use of preferences is presented by Pinsler et al. (2018). Their method learns the reward functions from the robot and human perspectives (user preferences). Preference feedback is used instead of absolute feedback, where preferences are stated over the space of outcomes. Besides planning, preferences have been also used for different applications such as the meeting scheduling problem. An example of this problem can be found in BenHassine and Ho (2007), where a multi-agent approach is used to solve the meeting scheduling with conflicting preferences by allowing the relaxation of some of these preferences. Preferences are represented as soft constraints, in the form of weights reporting the degree of preference of having a meeting on a specific date. Preferences are also used to guide search in BDI agents by Visser et al. (2016). In this case, the preferences are specified in terms of properties of goals and resource usage, allowing users to choose between different plans and determine the order in which to pursue different goals. Preferences specify values that must appear in the plan. In the case of this work, preferences affect the types of actions that are selected by the planner, but the planner does not compute the values of such variables. Behnke et al. (2017) present a mixed-initiative planning approach where the interaction between the user and the planner as a process to determine user preferences toward the plan. The proposed idea is to use the interaction to elicit the preferences of the user while planning. In our case, we intend to find the best values to those user preferences through exploring the space of plans. However, using preference values may also be seen as mixed-initiative planning where the human input is used by the planner to compute the best plan. In robotics, (Jiang and Arkin 2015) present mixed-initiative human–robot interaction (MI-HRI) as a collaboration strategy between humans and robots. In it, they achieve a common goal by exploiting their complementary capabilities. Our approach does not actively use the human but instead relies on offline data of computed plans to find 123 338 G. Canal et al. the best suggestions to preferences. Similar to our idea of suggestions, (Chun et al. 2003) propose a method for preference estimation. In them, they find optimal solutions to the meeting scheduling problem with unknown preferences. Their method works with analyzing responses given during negotiation to estimate the preference values, which are values that must appear in the decision outcome, such as meeting times. Our proposal also looks into the estimation of preference values, but focusing on the impact of the preferences in the plan performance. Finally, we have also found inspiration from the Explainable AI (XAI) and Explainable AI Planning (XAIP) communities. In XAIP (Fox et al. 2017), the goal is to present the user with explanatory answers to questions regarding action selection, action alternation, efficiency or affordability of the proposed plans. One way of answering such questions is by proposing alternative plans, by replanning from a user-provided state. Some works have tackled the explainability problem by analyzing the space of possible plans, such as Eifler et al. (2019) who look into explaining the space of possible plans by using plan properties. These properties are Boolean functions that capture the aspects of the plan the user cares about. This concept is closely related to that of user preferences, and we find possible extensions of the proposed work to XAIP. Our Space of Plans representation may be used to analyze the space of possible plans and provide for quick comparisons between plans (known as contrastive explanations). Our methods look into differences between plans to find those with maximal reward, but this could also be applied to compare plans and find the differences that explain the action selection to the user. We believe our algorithms can help to provide information on why some plans may have a better performance than others, thus contributing to plan explanations and avoiding failures. Even though there has been a lot of research involving preferences, we believe our proposed method is novel in the use of suggestions for improving task performance for planning and decision making, and the use of preferences is a good example of it. 3 Motivation There are not many examples in classical planning where the initial state can be modified at will before starting the task. In classical planning, the planner tries to modify the state using the available actions and operators. However, some elements of the task may be modified when facing the real world. A clear example of it may be that of robotics and, more specifically, collaborative and assistive robotics where humans take part in the planning process. In such a context where human help can be used, the system or robot can benefit from human interactions and provide information relevant to the task. Therefore, given a state that is not ideal, it can suggest changes or additions to the initial state that may lead to a better performance in the task. These suggestions could be obtained either by questioning the user, asking for a change, or just guessing the state of some unknown predicate, knowing that such information may improve the execution performance. A clear example, which we will use to illustrate the methods of the paper, would be one of preference and user limitations in an assistive robotics task. 123 Generating predicate suggestions… 339 3.1 Planning with preferences and limitations First, we want to ground the definition of preference in the case of our planning domains. Preferences in planning can be defined as soft goals and conditions as in PDDL3 (Gerevini and Long 2005), or can be related to plan ordering (Baier and McIlraith 2008). Definition 1 A task planning problem =S,A,T,s0,gis defined by the set of discrete states S,thesetAof actions that modify the state, the state transition function T:S×A→S, the initial state s0∈Sand the goal state g∈S. A solution to this problem is an action sequence starting at s0that modifies the state using the actions in Ato achieve the goal state g. Each state s∈Sis a subset of a set of predicates P, and each action ai∈A;ai=pai,eaiis a pair composed of the preconditions pai, the predicates that must be true for the action to be applicable, and the effects eai,the predicates that reflect the state changes produced by the execution of the action. State predicates not appearing in the effects of an action remain unchanged by the application of that action. This is known as the STRIPS assumption to avoid the representational frame problem. For more generality, we will denote the preference predicates as suggestible predicates. We define a suggestible predicate or preference as a predicate that is assigned a certain value, appears along with a certain action in the plan and produces some reward when it is present in the state. Such suggestible predicates do not affect the possibility to reach the goal but affect how the goal is reached and which actions are selected. They are used to guide the search and, instead of being conditions that must hold or identifying a plan as most preferred, they are predicates that may or may not hold and as a consequence produce different rewards or costs. Our notion of preferences is the one defined in Canal et al. (2017), where the preferences are used either to guide the action selection process or to modify how a specific action is executed (as a parameter to the action). We will use the example of the robot’s movement speed preference, which may take the values of quick, slow or medium. Those three values are the domain of the predicate. The planning domain may have some reward or penalization when using some specific actions. For instance, using a quick movement action when the preference is set to slow would penalize the final reward. However, the planner may still choose that action to complete the task, and the predicate is not required by any of the actions. Thus, speed is a suggestible predicate. Other preferences may include but are not limited to robot proxemics and verbosity. Appendix A1 shows further examples of the link between preferences, actions, and the obtained reward. Definition 2 A suggestible predicate p∈Pis a predicate such that there is no action ai∈Ain which p∈eaior p∈paiand p/∈g, but it can be that pappears in R, where Ris a reward or metric function to be maximized. The definition of preferences as suggestible predicates allows them to be used by the planner to guide the search, without constraining or forcing the planner to choose those actions that comply with the preferences. This also allows the use of almost any available planner, as preferences are not represented as soft constraints. This means 123 340 G. Canal et al. that the planner can use actions that may help achieve the goal even when those do not satisfy the preferences, for instance in cases where those that satisfy them may not be applicable or helpful to reach the goal. 4 Providing suggestions In this section, we propose the Space of Plans Suggestions (SoPS) algorithm to provide suggestions to a set of predicates Q⊆S. Definition 3 A suggestion q={(p,v) |p∈Q,v ∈Domain(p)}is a set of value assignments to predicates such that the reward increases when planning using them. In our example, a suggestion may be q={(speed,quick)}. Definition 4 A Space of Plans is a set of valid action sequences that bring the system from an initial state s0to a goal state g. The algorithm analyses a subset of the Space of Plans to provide the suggestions. Its goal is to determine which predicates have more impact on the reward, to suggest those first. Therefore, it needs as an input a subset of the Space of Plans corresponding to the plans obtained by combining the different suggestible predicates and obtaining a plan with them, along with their associated plan reward. This subset of the Space of Plans is compiled as a tree for efficient suggestion search. In the case of the speed preference, the Space of Plans would include all the plans achievable with all the combinations of speed values and the values for the rest of suggestible predicates. 4.1 The space of plans tree We compile the subset of the Space of Plans into a tree data structure where each branch is a complete plan, similar to the policy trees used in contingent planning (Hoffmann and Brafman 2005). Therefore, all the plans with a common prefix or starting sequence of actions begin at the root node and branch when the plans differ. Accordingly, all the leaves of the tree are actions that produce a goal state. Each node of the tree keeps a list with the set of suggestible predicates that produced the plan, along with the plan’s reward. This information is kept at each node for all the plans that reach the node. Moreover, the maximum reachable reward is kept at each node for efficient retrieval from the node’s branch. This ensures by construction that the reward of all the children nodes is taken into account. An example of a Space of Plans Tree is shown in Fig. 1. As it can be observed, each node stores the matrix of predicates for all the plans that go through it, and the index to the maximum reward child. For instance, for the a1node, maxRa1=max(maxRa4,maxRa5,maxRa6). This representation provides a compact and efficient data structure on which we can perform the search. In order to populate the tree, the subset of the Space of Plans is generated by executing the planner with changing conditions in the problem file. Therefore, for all the combinations of suggestible predicates, we generate one or more plans (depending 123 Generating predicate suggestions… 341 Fig. 1 Example of a Space of Plans Tree. Each node airepresents an action of the tree. Nodes labeled as goal are leaves whose branch is a complete plan to the goal on whether stochastic planners are being used). In the speed predicate example, we would obtain a plan setting the predicate to all of its possible values (quick, slow, and medium), along with the combinations for the rest of the suggestible predicates. Then, the list of plans is traversed to build the tree, adding new action nodes when new branches are found. When the action node already exists in the tree, the suggestible predicates of the plan along with their associated rewards are added to the node. The computation subset of the Space of Plans may be computationally expensive and is computed offline as a preprocessing step. We only consider a subset of the whole space due to ease make its computation more feasible. 4.2 Max-reward traversal The SoPS algorithm (see Algorithm 1) performs a maximum reward traversal of the Space of Plans Tree to obtain a set of suggestions to unknown suggestible predicates that improve the plan’s reward. For this reason, the already known predicates belonging to the suggestible set Qare fixed along the tree. To this end, all the branches belonging to plans generated with predicates whose value is different to the fixed one are pruned, and their rewards are discarded, keeping only the branches belonging to unknown predicates. To start, the algorithm searches for the promising nodes in the tree (see the Get- PromisingNodes procedure). A promising node is a node of the tree such that it is a child with a maximum reachable reward. 123 348 G. Canal et al. Fig. 4 Results with different setups for the shoe-fitting domain. This domain has some predicates that do not improve the reward, and those are suggested at the end when the maximum reward has been obtained for predicate 4 (which was already suggested in the previous iteration). Therefore, the reward of both predicates is obtained when the second one is suggested. Finally, Fig. 4shows the same behavior regarding the random pre-assignment of predicates and the algorithm, but plateaus can be observed at the end of the assignments. This is due to the superfluous predicates present in the domain. These superfluous predicates do not increase the reward. Therefore, those are obtained as a suggestion once the useful predicates have been already suggested. A more detailed analysis of the superfluous predicates can be found in Sect. 5.4. 5.3 Improvements by allowing changes with SoPS-change A new experiment has been performed to analyze the effects of allowing changes in fixed suggestible predicates with the SoPS-change algorithm. These changes are suggestions to already assigned predicates keeping into account the current value. The SoPS-change experiment will be performed, as in the previous section, generating random assignments for the value of the preferences. However, this time changes will be allowed if the suggested predicate was already assigned. In general, any change can be allowed by specifying enough distance as a parameter. Given that our domains include physical scenarios, we believe big changes should not be allowed. Therefore, for this experiment suggested changes are only accepted when the suggestion obtained is at distance one from the assigned value, so bigger changes are not allowed. In case there is a suggested change that cannot be accepted, we fix that preference to the already assigned value and continue with the following suggestions. Figure 5shows the maximum obtainable reward for the feeding case when preference values are fixed, starting with Npreassigned predicates (horizontal axis) and 123 Generating predicate suggestions… 349 Fig. 5 Results for the feeding domain allowing changes. As the number of fixed predicates increases, the reward decreases (as they may not be optimal). Suggesting changes close to the fixed predicates allows to improve the obtained reward using the suggested predicates from the algorithms to assign the rest. The figure compares the changes approach to the standard SoPS version. In both cases, the reward values are obtained from the tree, and they represent the maximum obtainable reward as stated in the Space of Plans Tree. Therefore, no new plans are computed this time. Observe that, as in the previous section, the higher the number of random fixed predicates the lower the reward is. But, when changes are allowed, the reward decay is much slower. Notice this happens even in a conservative approach in which only small changes are allowed (so when the suggestion is highly different from the fixed predicate, the suggestion is ignored.) The same behavior can be observed for the other domains, in Figs. 7and 6. 5.4 Finding superfluous suggestions The results obtained from the shoe-fitting domain in Fig. 4show that predicates that do not provide much reward get suggested at the end (as the most promising ones are suggested earlier). To confirm this and analyze its implications, we performed another experiment where more suggestible predicates that do not help to increase the reward were added. We will refer to these suggestible predicates as superfluous predicates. To this end, we have run the same experimental setup of Sect. 5.2 with slightly modified domains. In them, we added two predicates which are not taken into account in the reward function but allow them to be suggested, being added to the Space of Plans Tree. Later we have executed the SoPS algorithm in them, the results of which are shown in Fig. 8. 123 350 G. Canal et al. Fig. 6 Results for the shoe-fitting domain allowing changes. This domain shows a similar trend, successfully improving the obtained reward with the suggested changes Fig. 7 Results for the jacket-dressing domain allowing changes. Change suggestions to the fixed values with a distance of one are enough to improve the final reward As it can be seen, the reward function tends to saturate around the last predicates, while keeping the same shape as in the previous experiment. In the case of shoe-fitting, it is clear that there are many superfluous predicates. The feeding case also shows a third potential superfluous or less-useful predicate, while the jacket-dressing shows that most of the predicates are useful. Slight variations of the tails of the reward plots 123 Generating predicate suggestions… 351 Fig. 8 Results with the different domains including superfluous predicates. Our method is able to maximize the reward ignoring the predicates not providing more reward, which are suggested at the end are due to the stochasticity of the results (which are again an average of all the plan executions). Consequently, it can be seen that the SoPS algorithm can also be used to determine whether there are superfluous predicates in a domain, which can be used to decrease the size of the search space. However, it can be seen that superfluous predicates cannot usually be detected while obtaining the suggestions, but only when all the suggestible predicates have been obtained. Even so, the computation of all the suggestions is efficient and quick enough to be possible to pre-compute the superfluous predicates beforehand. 6 Discussion and conclusions In this work, we have presented an algorithm to provide suggestions for assigning values to predicates in planning domains. We have defined the concept of suggestible predicates, which are those predicates that help the planner by guiding the search to obtain more reward under some circumstances. Then, we have introduced the SoPS algorithm that uses a Space of Plans Tree built from a pre-computed subset of the Space of Plans. The algorithm traverses the tree to obtain suggestions for predicates such that the final plan’s reward is maximized. A variation of this algorithm (SoPS- change) that suggests changes to already assigned predicates has also been proposed. These changes are considered taking into account the currently assigned value to the predicate. The algorithms were evaluated in three assistive robotics domains in which the suggestible predicates are preferences of the user that define the robot’s behavior. 123 352 G. Canal et al. Our results show that using the values selected by the algorithms improve more the reward in comparison with a random simulation of user selection of the values when computing new plans. The focus of the evaluation was on the ability of the proposed algorithm to provide suggestions to preference values given a preference-based reward function. A more comprehensive evaluation could also be performed by evaluating the preference-based reward function and taking into account feedback from users. This is left as future work. The proposed methods have their drawbacks. We do not consider the Space of Plans computation as part of the algorithms but as an offline pre-computation step. However, the algorithms need the subset of the Space of Plans as an input, we acknowledge the fact that obtaining such Space of Plans is not computationally cheap. We want to emphasize that we use a subset of it due to the intractability of obtaining the whole space, and the more suggestible predicates the more costly this becomes, which is a limiting factor. This could be partially overcome by starting with a smaller subset of the space and integrating new plans as they are computed during the system’s execution. This would imply that the suggestions might not be the best ones with an incomplete Space of Plans but could be improved over time. Another limitation is the need for a preference-based reward function. We consider this as an input to the system and created by experts, but the quality of the suggestions will depend on how good is the reward function in terms of consistency between the effect of the preferences and the related actions. If the reward function is not appropriate, the suggestions will still maximize the reward of the system but may not be consistent with what users might expect. Some approaches that adapt the cost or reward function from user interaction to improve the use of preferences (Canal et al. 2019a) could reduce the impact of a poorly defined reward function, but more work can be done in this direction. The methods proposed in this paper can be used in many other domains apart from those already shown here. We believe the algorithms can also be used to foster plan explainability. For instance, the suggestions provided by our algorithms could also be used to explain to a non-expert user why the planner took an action or another in terms of gained reward, as well as to help the user in selecting the best configuration based on their needs, explaining that assigning a specific value to a predicate can lead to better plans. Although some more work shall be done in this direction, we believe these algorithms can be useful for providing plan explanations, as well as powerful algorithms to analyze the Space of Plans. Acknowledgements The authors thank Mr. Alejandro Suárez and Dr. Javier Segovia-Aguas for fruitful discussions. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. 123 Generating predicate suggestions… 353 Appendix A1 Preferences to guide action selection through the reward function This section details how the reward function can be defined such that the suggestible predicates help in the action selection process of the planner. For this, we have used the Relational Dynamic Influence Diagram Language (RDDL) (Sanner 2010), which allows the definition of rich reward functions. Such reward function is computed at each time step to provide an immediate value to the metric function that is being optimized. In the case of the reward, the goal of the planner is to maximize its value. Therefore, actions that lead to states providing more reward will be favored. This allows the use of suggestible predicates to appear along with actions in the reward function, such that when the suggestible predicate is present with a specific action, it will provide a positive or negative reward. This will encourage or penalize the use of the action. In RDDL, we can do this by defining an if-then-else reward function. The function will have a case for each action and related preference value with the form if (action ∧(preference_name == @preference_value)) then R, where Ris the value that is obtained when the action is executed and the preference_name predicate is present and has the @preference_value. To ease the description of such predicates in the reward function, we defined a rulebased format that consists of the action, the preference application and the immediate reward value R. This is then formatted and added to the domain automatically. As an example, one could define: getFood, ((?speed ∼= p_speed) ∧(p_speed ∼= @tl_unknown)) | ((?force ∼= p_force) ∧(p_force ∼= @tl_unknown)), -15, which specifies that the action getFood receives a penalization with a value of 15 when either the speed or force preferences are not unknown and they have a different value than the one provided by the preference. Another example of the jacket dressing task is: approachBothArms , (p_motor_rightarm == @high) ∧ (p_motor_leftarm == @high), 20, which describes that the approachBothArms action is rewarded when the user’s arms mobility is defined as high. This will then be converted to:4 if (exists_{?speed: t_threelevel , ?force: t_threelevel} [approachBothArms(?speed , ?force) ∧((p_motor_rightarm == @high) ∧(p_motor_leftarm == @high))]) then 20. Consequently, this process simplifies the definition of the reward function, which can become long and complex. Note that in our approach, we expect an expert in the domain to define the rules that will be compiled into the reward function to successfully lead the planner to choose those actions that receive more reward thanks to the preferences. 4t_threelevel is defined as an enumerable type with three levels: @high,@medium and @low. 123 354 G. Canal et al. A2 Actions in the feeding task domain The feeding task domain contains the following actions: – Get Food: uses the cutlery to get the food. – Approach straight: approaches the food to the user frontally. – Approach from below: approaches the food to the user from below (less intrusively). – Approach from the side: approaches the food to the user sideways, being always visible but not frontally to avoid intimidating the user. – Feed straight: feeds the user by moving in a straight line and exiting in the same way. – Feed scooping: feeds the user and performs a scooping action when exiting to ensure emptying of the cutlery. – Wait for user feeding: waits for the user to get the food. – Move away: the robot moves back to the starting position. A3 Actions in the shoe-fitting task domain The shoe-fitting task domain includes the following actions: – Request foot reachable: requests the user to move the foot closer. – Request foot visible: requests the user to put the foot in the robot’s sight. – Grasp shoe: it grasps the shoe (from the user, as a handover). – Approach from top: it approaches the user’s foot from the top. – Approach right/left: it approaches the user from either side. – Approach from below: approaches the user from below. – Insert straight: inserts the shoe in a straight movement, without forcing the ankle. – Insert curved: shoe insertion forcing a bit the ankle to fit correctly the heel. – Insert right/left: inserts from the side following the foot’s shape. – Release simple: releases the shoe and moves away. – Release push: it pushes the shoe a bit before releasing it to ensure fit. A4 Actions in the shoe-fitting task domain The jacket-dressing task domain consists of the following actions: – Approach single-arm frontal: approaches a sleeve to a single arm from the front (visible to the user). – Approach single-arm rear: approaches the sleeve to the arm from behind (more comfortable as less movement is involved). – Approach arm side: approaches a sleeve from the side (from outside the body to the right/left arm). – Approach both arms: approaches both sleeves together from behind. – Insert sleeve from the front: inserts the sleeve in a frontal manner (doing so makes it impossible to insert the other sleeve frontally). 123 Generating predicate suggestions… 355 – Insert sleeve straight: inserts a sleeve from the side, with the stretched arm. – Insert both sleeves: inserts both sleeves together from behind. – Drag forearm frontal: drags the sleeve in the forearm from the front. – Drag forearm straight: drags the forearm sideways. – Drag both forearms: drags both forearms together. – Drag upper arm: drags an upper arm. – Drag both upper arms: drags both upper arms together. – Release: Drags the cloth to the shoulders and releases the garment. References Alami, R., Clodic, A., Montreuil, V., Sisbot, EA., Chatila, R.: Toward Human-Aware Robot Task Planning. In: AAAI spring symposium, pp. 39–46 (2006) Andriella, A., Torras, C., Alenya, G.: Cognitive system framework for brain-training exercise based on human–robot interaction. Cognit. Comput. 12, 793–810 (2020) Baier, J.A., McIlraith, S.: Planning with preferences. AI Mag. 29(4), 25–36 (2008) Behnke, G., Leichtmann, B., Bercher, P., Höller, D., Nitsch, V., Baumann, M., Biundo, S.: Help me make a dinner! Challenges when assisting humans in action planning. In: Proceedings of the International Conference on Companion Technology, Ulm, vol. 11. https://doi.org/10.1109/ICCT42709.2017.9151907 (2017) BenHassine, A., Ho, T.B.: An agent-based approach to solve dynamic meeting scheduling problems with preferences. Eng. Appl. Artif. Intell. 20(6), 857–873 (2007). https://doi.org/10.1016/j.engappai.2006. 10.004 Bidoux, L., Pignon, J.P., Bénaben, F.: Planning with preferences using Multi-Attribute Utility Theory along with a Choquet Integral. Eng. Appl. Artif. Intell. 85, 808–817 (2019). https://doi.org/10.1016/ j.engappai.2019.08.002 Canal, G., Alenyà, G., Torras, C.: A taxonomy of preferences for physically assistive robots. In: IEEE International Symposium on Robot and Human Interactive Communication (RO-MAN), pp. 292– 297, https://doi.org/10.1109/ROMAN.2017.8172316 (2017) Canal, G., Cashmore, M., Krivi´c, S., Alenyà, G., Magazzeni, D., Torras, C.: Probabilistic Planning for Robotics with ROSPlan. In: Towards Autonomous Robotic Systems, Springer, Cham, pp. 236–250. https://doi.org/10.1007/978-3-030-23807-0_20 (2019b) Canal, G., Pignat, E., Alenyà, G., Calinon, S., Torras, C.: Joining high-level symbolic planning with lowlevel motion primitives in adaptive HRI: application to dressing assistance. In: IEEE International Conference on Robotics and Automation (ICRA), pp 3273–3278, https://doi.org/10.1109/ICRA.2018. 8460606 (2018) Canal, G., Alenyà, G., Torras, C.: Adapting robot task planning to user preferences: an assistive shoe dressing example. Auton. Robots 43(6), 1343–1356 (2019). https://doi.org/10.1007/s10514-018-9737-2 Canal, G., Torras, C., Alenyà, G.: Are preferences useful for better assistance?: A physically assistive robotics user study. ACM Trans. Human–Robot Interact. (THRI) 10(4), 1–19 (2021). https://doi.org/ 10.1145/3472208 Chakraborti, T., Sreedharan, S., Kulkarni, A., Kambhampati, S.: Projection-aware task planning and execution for human-in-the-loop operation of robots in a mixed-reality workspace. In: 2018 IEEE/RSJ International conference on intelligent robots and systems (IROS), IEEE, pp. 4476–4482 (2018) Chun, A., Wai, H., Wong, R.Y.: Optimizing agent-based meeting scheduling through preference estimation. Eng. Appl. Artif. Intell. 16(7), 727–743 (2003). https://doi.org/10.1016/j.engappai.2003.09.009 Cirillo, M., Karlsson, L., Saffiotti, A.: Human-aware task planning: an application to mobile robots. ACM Trans. Intell. Syst. Technol. (TIST) 1(2) (2010) Das, M., Odom, P., Islam, M.R., Doppa, J.R.J., Roth, D., Natarajan, S.: Planning with actively eliciting preferences. Knowl.-Based Syst. 165, 219–227 (2019). https://doi.org/10.1016/j.knosys.2018.11.028 De, Silva L., Lallement, R., Alami, R.: The HATP hierarchical planner: Formalisation and an initial study of its usability and practicality. In: 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 6465–6472, https://doi.org/10.1109/IROS.2015.7354301 (2015) 123 356 G. Canal et al. Domshlak, C., Hüllermeier, E., Kaci, S., Prade, H.: Preferences in AI: an overview. Artif. Intell. 175(7), 1037–1052. https://doi.org/10.1016/j.artint.2011.03.004, representing, Processing, and Learning Preferences: Theoretical and Practical Challenges (2011) Eifler, R., Cashmore, M., Hoffmann, J., Magazzeni, D., Steinmetz, M.: Explaining the Space of Plans through Plan-Property Dependencies. In: ICAPS-19 Workshop on Explainable Planning (2019) Fiore, M., Clodic, A., Alami, R.: On planning and task achievement modalities for human–robot collaboration. In: Experimental Robotics: The 14th International Symposium on Experimental Robotics, Springer, Cham, pp. 293–306. https://doi.org/10.1007/978-3-319-23778-7_20 (2016) Fox, M., Long, D., Magazzeni, D.: Explainable planning. In: IJCAI-17 Workshop on Explainable AI (2017) Gao, Y., Chang, HJ., Demiris, Y.: User modelling for personalised dressing assistance by humanoid robots. In: 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 1840– 1845. https://doi.org/10.1109/IROS.2015.7353617 (2015) Gerevini, A., Long, D.: Plan constraints and preferences in PDDL3. Tech. rep., Department of Electronics for Automation, University of Brescia (2005) Göbelbecker, M., Keller, T., Eyerich, P., Brenner, M., Nebel, B.: Coming up with good excuses: what to do when no plan can be found. In: Proceedings of the Twentieth International Conference on International Conference on Automated Planning and Scheduling, AAAI Press, pp. 81–88 (2010) Hoffmann, J., Brafman, R.: Contingent planning via heuristic forward search with implicit belief states. In: Proceedings of the 15th International Conference on Planning and Scheduling (ICAPS), vol. 15, pp. 71–88 (2005) Jiang, S., Arkin, RC.: Mixed-initiative human–robot interaction: definition, taxonomy, and survey. In: 2015 IEEE International Conference on Systems, Man, and Cybernetics, pp. 954–961. https://doi.org/10. 1109/SMC.2015.174 (2015) Joppen, T., Wirth, C., Fürnkranz, J.: Preference-based Monte Carlo tree search. In: KI 2018: Advances in Artificial Intelligence. Springer, pp. 327–340 (2018) Keller, T., Eyerich, P.: PROST: Probabilistic planning based on UCT. In: Proceedings of the 22nd International Conference on Planning and Scheduling (ICAPS), vol. 22, pp. 119–127 (2012) Kim, J., Woicik, ME., Gombolay, MC., Son, SH., Shah, JA.: Learning to infer final plans in human team planning. In: Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI- 18, pp. 4771–4779. https://doi.org/10.24963/ijcai.2018/663 (2018) Martínez, D., Alenyà, G., Torras, C.: Relational reinforcement learning with guided demonstrations. Artif. Intell. 247, 295–312 (2017) Pinsler, R., Akrour, R., Osa, T., Peters, J., Neumann, G.: Sample and feedback efficient hierarchical reinforcement learning from human preferences. In: 2018 IEEE International Conference on Robotics and Automation (ICRA), IEEE, pp. 596–601 (2018) Rossi, S., Ferland, F., Tapus, A.: User profiling and behavioral adaptation for HRI: A survey. Pattern Recognit. Lett. 99, 3–12 (2017). https://doi.org/10.1016/j.patrec.2017.06.002 Sanner, S.: Relational dynamic influence diagram language (RDDL): language description, unpublished ms. Aust. Natl. Univ. 32, 27 (2010) Shmaryahu, D., Shani, G., Hoffmann, J., Steinmetz, M.: Constructing plan trees for simulated penetration testing. In: The 26th International Conference on Automated Planning and Scheduling, vol. 26 (2016) Sohrabi, S., Baier, JA., McIlraith, SA.: Preferred explanations: Theory and generation via planning. In: Proceedings of the 25th AAAI Conference on Artificial Intelligence, vol. 25 (2011) Umbrico, A., Cesta, A., Cortellessa, G., Orlandini, A.: A holistic approach to behavior adaptation for socially assistive robots. Int. J. Soc. Robot. 12(3), 617–637 (2020) Visser, S., Thangarajah, J., Harland, J., Dignum, F.: Preference-based reasoning in BDI agent systems. Auton. Agents Multi-Agent Syst. 30(2), 291–330 (2016). https://doi.org/10.1007/s10458-015-9288- 2 Wirth, C., Akrour, R., Neumann, G., Fürnkranz, J.: A survey of preference-based reinforcement learning methods. J. Mach. Learn. Res. 18(1), 4945–4990 (2017) Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Gerard Canal (https://gerardcanal.github.io) is a Lecturer (Assistant Professor) in Autonomous Systems at the Department of Informatics of King’s College London, where he also obtained a Royal Academy of 123 Generating predicate suggestions… 357 Engineering UK IC Postdoctoral Research Fellowship in 2021. He received a PhD degree in Robotics from UPC in 2020, with work on adapting robot behaviour to user preferences in assistive scenarios. Before that, he completed an MSc in Artificial Intelligence from UPC, UB, and URV, and a BSc in Computer Science from UPC. He has participated in different international and national projects such as I-DRESS and THuMP, and he is a Researcher Co-Investigator in the COHERENT project. His research focuses on applying task planning to robotics, assistive robotics, robot behaviour adaptation, and explainability of robot behaviour. Carme Torras (www.iri.upc.edu/people/torras) is Research Professor at the Institut de Robótica i Informática Industrial (CSIC-UPC) in Barcelona, where she leads a research group on assistive and collaborative robotics. She received MSc degrees in Mathematics and Computer Science from the University of Barcelona and the University of Massachusetts, respectively, and a PhD degree in Computer Science from the Technical University of Catalonia (UPC). Prof. Torras has published six research books and more than three hundred papers on robotics, machine learning, geometric reasoning, and neurocomputing. She has supervised 19 PhD theses and led 16 European projects, the latest being her ERC Advanced Grant project CLOTHILDE—Cloth manipulation learning from demonstrations. Prof. Torras is IEEE and EurAI Fellow, member of Academia Europaea and the Royal Academy of Sciences and Arts of Barcelona. She has served as Senior Editor of the IEEE Transactions on Robotics and Associate Vice-President for Publications of the IEEE Robotics and Automation Society. Currently, she is Vice-President of CSIC Ethics Committee and a member of the Spanish Advisory Committee for AI. Convinced that science fiction can help promote ethics in robotics and AI, one of her novels—winner of the Pedrolo and Ictineu awards— has been translated into English with the title The Vestigial Heart (MIT Press, 2018) and published together with online materials to teach a course on “Ethics in Social Robotics and AI”, which are being used in several universities worldwide. Guillem Alenyà (http://www.iri.upc.edu/people/galenya) is Researcher and Director at the Institut de Robotica i Informática Industrial (IRI), a joint centre of the Spanish Scientific Research Council (CSIC) and Polytechnic University of Catalonia (UPC). He received a PhD degree (Doctor Europeus) from UPC in 2007 with a work on mobile robot navigation using active contours, which he partly developed at the Robosoft company in France, where he was supported by a EU-FP6 Marie-Curie scholarship. He has been visitor at KIT—Karlsruhe (2007), INRIA—Grenoble (2008), and BRL—Bristol (2016). He has participated in numerous scientific and technological transfer projects involving image understanding, next-best view, rule learning from human examples, and planning execution tasks. He is coordinator of the SIMBIOTS project on cooperative robots and principal investigator of the SOCRATES project (on quality of interaction for social robots), BURG (about textile manipulation benchmarking), and HuMoUR (on human-to-robot skills transfer). 123