{'fraction_non_alphanumeric': 0.040230955485192774, 'fraction_numerical': 0.007946855404482523, 'mean_word_length': 4.073385826771654, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Utility Functions for Human/Robot Interaction

In this paper, we place ourselves in the context of human robot interaction and address the problem of cognitive robot modelling. More precisely we are investigating properties of a utility-based model that will govern a robot's actions. The novelty of this approach lies in embedding the responsibility of the robot over the state of affairs into the utility model via a utility aggregation function. We describe desiderata for such a function and consider related properties.


Should you push babies into lakes?
Imagine the following scenario. You have bought the latest e-nanny robot that promises to keep your children busy, happy, away from dangerous screens, and to free up time for adults. Such a motivating scenario is not far fetched as existing robots, such as Kasper [1,2,3], have already shown great success when interacting with autistic children. Another example is the Elias robot-teachers employed, in Finnish schools, to teach children foreign languages. Moreover, many robots on the market (e.g. iPal) are now equipped with an "emotion management system" that is able to detect a child's emotions and respond appropriately [4].
In our scenario, the robot interacts with children based on the design of an interdisciplinary team of computer scientists, psychologists, neuro-scientists, and roboticists. Such a robot needs to decide how to act and which goals to pursue, and utility-based decision theory provides a well understood approach to implementing such a reasoning system. The robot therefore attempts to maximise its net utility over time. We observe that -if naively implemented -such an approach could lead to the robot (for example) pushing a child into a lake in order to find itself in the rewarding scenario where it can save them. In this paper, we highlight the fact that designing an appropriate utility function for a robot which interacts with humans is (surprisingly) difficult.
Human robot interaction has received much interest from the research community. In the past years, many works in robotics, neurosciences and computer science recognised the need for a human centered interaction. While most such work focuses on physical joint interaction, i.e. manipulating heavy objects in an industrial setting [5,6] or helping mobility reduced people [7,8] among others, the important topic of joint cognitive interaction has only been getting attention recently [9,10,11]. In this setting the robot needs to collaborate with the human for solving a problem or making a decision. The design of such robot needs to be done with care taking into account aspects such as the trustworthiness of the artificial partner, transparency, accountability and ethical dimension.
The aim of this short paper is twofold. First, we wish to demonstrate that a standard approach to utility, where utilities are associated with specific states, can lead to undesirable behaviour, and that one must instead consider as a property aggregated over multiple states. We then demonstrate that several possible aggregations are unable to capture all possible desirable properties that one may wish them to obtain. We therefore argue that important notions in human-robot interaction, such as responsibility and accountability, are difficult to capture using standard utility-based approaches, and argue that more research in this area is needed.
Let us model our fictitious scenario to show why it poses a problem. By definition, if our robot is utility maximising, it will select those actions which maximise its overall utility. Arguably, saving the child's life nets the robot a very high (positive) utility. Similarly, having the child drown would yield a very negative utility to the robot. Now assume that having the child wet provides a small negative utility. Clearly then, if the robot is confident of its ability to save the child, pushing them into the water and then rescuing them would yield a high positive utility, while not pushing the child in would result in a utility of 0 for the robot. In this paper, we argue that the utility function over sequences of actions should be specified by looking not just at outcomes, but also by considering some notion of blame, accountability and/or responsibility. The core research question we are addressing is how to appropriately model the domain and specify the utility function in order to capture this intuition.
The structure of the paper is as follows. In Section 2, we put the basis for the formalisation we will use throughout the paper allowing us to easily capture the notions of possible worlds and actions (transitions between such possible worlds). The reason why we provided our own formalism as opposed to other models, such as situation calculus, was that we wanted to be able to keep the model as light as possible, to focus on the aggregation functions over utilities. In Section 3, we introduce desirable properties that an aggregation function over utilities should satisfy and define two new aggregation functions. The paper concludes with a discussion on the usefulness of our model in the context of ethical decision making.

Background notions
Let P be a finite set of propositions having their truth values in {⊤, ⊥}. A possible world w ⊆ P is a subset of propositions where each proposition is true.
Definition 1 (Possible world) A possible world in P is w ⊆ P such that for every p ∈ w, it holds that p = ⊤.
In this paper, we consider the negation by default, i.e., the absence of a proposition from a possible world means that it is false. We denote the set of all possible worlds by W ⊆ 2 P . An action is represented by the set of proposition describing the context in which the action can take place and the set of propositions that represent its consequences.
We denote the set of all possible actions by A. An action a ∈ A is applicable to a world w ′ ∈ W iff P − a ⊆ w ′ . Let w, w ′ ∈ W, w is directly accessible from w ′ iff there exists an action a ∈ A such that a is applicable to w ′ and P + a ⊆ w. The closure of a set of worlds by a set of actions is the set of all possible worlds that can be reached by the repeated application of applicable actions.
Definition 3 (Closure) If A ⊆ A and W ⊆ W, the closure of W by A, denoted by W A , is the minimal (for set inclusion) subset of W such that both the following conditions hold: We will assume that the sets A and W are finite.

Example 1 Let us consider the following example about rescuing babies, where
• p 1 : "John rescued the baby" • p 2 : "The baby is in the water" • p 3 : "John is at home" The meaning of the actions a 1 , a 2 and a 3 are "pushing the baby in the water", "rescuing the baby", and "going home" respectively. The world w 2 is directly accessible from w 1 (this represents the situation where John will push the baby in the water after rescuing it), and w 3 is directly accessible from w 1 (this represents the situation where John will go home after rescuing the baby). The closure of Multiple worlds can be accessed from a single world using one action. This allows for external influence and unexpected results. The next example illustrates this intuition.
is "John has to do his homework", p ′ 2 is "John did his homework", p ′ 3 is "John obtained a good grade for his homework" and p ′ 4 is "John obtained a bad grade for his homework".
A world w ′ may also be directly accessible from the world w using multiple actions. This is represented in Example 3.
In this paper, we assume that such actions can be "fused", i.e. if there exists w, w ′ ∈ W, a 1 , a 2 ∈ A such that w is directly accessible from w ′ , a 1 and a 2 are applicable to w ′ and P + a1 , P + a2 ⊆ w then it holds that there exists In the next definition, we formalise the notion of maximal actions.
Definition 4 (Maximal action) Let w, w ′ ∈ W and a ∈ A. a is the maximal action from w to w ′ iff (1) a is applicable to w, (2) P + a ⊆ w ′ and (3) for every a ′ ∈ A such that a ′ is applicable to w and P + a ′ ⊆ w ′ , it holds that P − a ′ ⊆ P − a and P + a ′ ⊆ P + a . We now assume that we only deal with maximal actions.   N ((w, w ′ )).

Example 4 Let us consider
We now define the notion of sequence of worlds.
The set of all non-empty sequence of worlds in TS based on W is TS W . Note that if TS has cycles then TS W is infinite. Let S 1 = [w 0 , . . . , w n ] and S 2 = [w ′ 0 , . . . , w ′ m ] be two sequences of worlds, the concatenation of S 1 and S 2 is S 1 ⊕ S 2 = [w 0 , . . . , w n , w ′ 0 , . . . , w ′ m ]. The size of S 1 is denoted by |S 1 | = n. The number of occurrences of the world w in a sequence of worlds S is denoted by occ(w, S). A sequence of maximal actions corresponding to a sequence of worlds S = [w 0 , . . . , w n ] in TS is S ′ = [a 0 , . . . , a n−1 ] such that for every 0 ≤ i ≤ n − 1, N ((w i , w i+1 )) = a i . There is a unique sequence of maximal actions for any given sequence of worlds. However, multiple sequence of worlds can share the same sequence of maximal actions. The set of sequences of worlds corresponding to a sequence of maximal actions S ′ is denoted by W S ′ .
From the initial world w o , a robot has to choose between the set of available actions a in A such that a is applicable to w o and so on. The selected action can be determined via a utility function on worlds u : W → [−1, 1] which assigns a score to each world. The set of all possible utility functions on W is denoted by U W . In the context of the von Neumann-Morgenstern utility theorem, an robot will always prefer an action that maximises the utility function defined over the worlds [12]. However, a robot will not always choose the immediate preferred action from a world w but plan to maximise the rewards given by the utility function in the long term.

Aggregation over utilities
In the real world, it is very complicated to define an robot's utility functions as they usually do not not include the responsibility of the actions that led the robot to the respective world. Let us illustrate this on the next example formalising the motivating example given in the introduction. In the world w 1 , the baby is rescued and thus u(w 1 ) = 0.5. In the world w 2 , the baby is in the water and thus u(w 2 ) = −0.2. Notice here that |u(w 2 )| < |u(w 1 )| as the baby might not necessarily drown when in water. Clearly, the world where the baby is rescued is better than the world where the baby is in the water. Thus, it would not be surprising that a robot aiming to maximise its rewards will deliberately push the baby in the water to rescue it afterward. This is represented in Figure 1. In order to capture the responsibility of robots in a transition system TS, we now consider that there is an aggregation function σ : TS W × U W → [−1, 1] that scores how "good" a sequence of worlds is w.r.t. a utility function on worlds. The set of aggregation functions for a transition system TS is denoted by Σ W . Equipped with this utility on sequences of worlds, it is now possible to express that rescuing a baby is better than purposely pushing a baby in the water to rescue it, i.e. σ([w 2 , w 1 ], u) > σ([w 2 , w 1 , w 2 , w 1 ], u). The research question we will answer in the reminder of this paper is: "How do we define σ such that it is not advisable for a robot to redo the cycle (rescue, push) because redoing the action does not give them more rewards?". To this end we will propose two kinds of families of properties: based on cardinality and based on the value of utility function on the possible worlds. We analyse these properties and propose three examples of aggregation functions that respect a subset of such properties.

Cardinality properties
In this section, we investigate cardinality-based properties that an aggregation function over utility values of possible worlds can satisfy. The first property captures the notion that adding worlds to a sequence of worlds (induced by the subsequent actions) can only decrease its score. The underlying idea is that it is not possible to recover the loss induced by bad actions.
Property 2 states that if the score of a sequence of worlds decreased after the addition of some worlds then the added sequence of worlds should have a negative score.
Property 3 states that repeatedly going through the same sequence of worlds should have a reduced effect on its score and Property 4 states that the score of a sequence should not be affected by worlds not in the sequence.
Sequence of worlds S σ mean σ blame σ occ 0.08 -0.13 -0.06 Table 1: Aggregated values for sequences on worlds as defined in the transition system of Figure 1.
Property 5 states that the benefits gained by adding worlds should be decreasing. Property 6 states that the disadvantages obtained by adding worlds should be increasing and, finally, property 7 states that the score of the sequence containing only one world should be zero.

Property 5 (Decreasing benefits)
We say that σ ∈ Σ W satisfies decreasing benefits iff for every u ∈ U W , w, w ′ ∈ W and S 1 ∈ TS W such that Property 6 (Increasing losses) We say that σ ∈ Σ W satisfies increasing losses iff for every u ∈ U W , w, w ′ ∈ W and S 1 ∈ TS W such that

Value-based properties
In this section, we investigate value-based properties that an aggregation function can satisfy, i.e. how much the score of a sequence of worlds respects a utility function on worlds.
Property 8 states that the score of a sequence with only one world should be equal to the utility of that world.

Property 8 (Value initialisation)
We say that σ ∈ Σ W satisfies value initialisation iff for every u ∈ U W and w ∈ W, it holds that σ([w], u) = u(w).
Property 9 states that adding a world with a positive (resp. negative) utility to a sequence must increase (resp. decrease) its score.
Let u ∈ U W , S = [w 0 , . . . , w n ] ∈ TS W and K = {w ∈ S | u(w) < 0}. The aggregation functions that we consider in this paper are defined as follows: min(0,u(wi)) |K|×occ(wi,[w0,...,wi]) if K > 0 0 otherwise In Table 1, we show the values returned for the three aggregation functions defined in the paper. In the Table 2, we show how the properties proposed in this paper are satisfied by the three aggregation functions defined above.

Discussion
Standard decision theoretic approaches associate utilities with individual states. As shown above, a naive application of such approaches can lead to undesirable behaviour. Instead, a reasoner seems to require a more complex utility function which aggregates the utility from multiple states in a non-trivial manner to obtain a final utility. However, even in such cases, we are unable to satisfy even relatively simple desirable properties. In other words, we argue that it is far from trivial to define the utility functions that will allow the robots to take the "best" course of action.
In a human-centric setting, an individual would not (for example) push a baby into a pond as they recognise that they will be blamed for the situation, and not rewarded, even if they rescue the child afterwards. These concepts are intimately tied into notions such as responsibility, blame and accountability, and also encapsulate concepts such as causality, blameworthiness, deontic concepts (e.g., permissions, obligations and prohibitions), and -perhaps most importantly -intentionality. In [13] a definition of blameworthiness is provided based on a causal framework. There are other ways to define degree of blameworthiness; for example, through probability with which the harm could have been prevented [14], [15].
This paper gathers some preliminary ideas, and aims to serve as a "call-to-arms" to the community to examine edge cases in utility-based reasoning and ensure that they do not lead to paradoxical or undesirable behaviour. Significant avenues of future work remain open, including the integration of uncertainty into such utility-based systems, and we believe that philosophical work dealing with decision theory [16], as well as work on computational ethics [17], can serve to provide additional ideas to deal with the problem highlighted in this paper.