Defining an Adaptable Framework for Behaviour Support Agents in Default Logic Johanna Wolff1,∗ , Victor de Boer2 , Dirk Heylen1 and M. Birna van Riemsdijk1 1 University of Twente, Drienerlolaan 5, 7522 NB Enschede, The Netherlands 2 Vrije Universiteit Amsterdam, De Boelelaan 1105, 1081 HV Amsterdam, The Netherlands Abstract In order to provide personalised advice, behaviour support agents need to consider the user’s needs and preferences. This user model should be easily adaptable as the user’s requirements will change during the long-term use of the agent. We propose a formal framework for such an agent in which the knowledge and the beliefs of the agent are represented explicitly and can be updated directly. Our framework is based on ordered default logic as defeasible reasoning allows the agent to infer additional information based on possibly incomplete knowledge about the world and the user. We also define updates on each component of the agent’s framework and demonstrate how these updates can be used to resolve potential misalignments between the agent and the user. Throughout the paper we illustrate our work using a simplified example of a behaviour support agent intended to assist the user in finding a suitable form of exercise. Keywords Default Logic, Belief Revision, Behaviour Support Agent 1. Introduction user models are often not explicitly represented, which in turn means that they cannot be updated directly. This The rise of artificial assistants has lead to an increased also makes it difficult for the user to understand ex- interest in behaviour change support agents [1], which actly how their changes will affect the agent’s output can support the user in establishing new routines and [8]. By using knowledge-driven methods, we can for- finding ways to achieve their goals consistently. In order malise changes to the user model within the framework, for these agents to support each user as effectively as pos- similarly for example to the work in [7]. In particular, we sible, the agents need to model the user’s desires, needs use default logic to model an agent with both dynamic and preferences as accurately as possible [2]. Since the knowledge and beliefs. agent should offer support over longer periods of time, it In this paper, we introduce a formal framework for a is likely that both the user and the surrounding context behaviour support agent which includes a model of the will go through changes throughout the agent’s use [3]. world and the user (Section 3.1). We use this framework Based on the emerging design principles of hybrid intelli- to represent the agent’s knowledge and beliefs explic- gence [4],we propose that the agent and the user should itly within a default theory (Section 3.2). We use the be able to collaborate in order to identify and implement defeasible nature of default logic to express beliefs about the updates that are necessary to adapt the agent over both the user and the world, which allows the agent to time. This means that the user is in control of the agent’s reason with incomplete knowledge and provide advice knowledge and beliefs [5], but the agent should be able based on this. In order to make changes to the agent’s to assist the user in determining how each change can knowledge and beliefs possible, we define updates to our be realised and explaining the effects that this will have. formal framework (Section 4). These updates are based While data-driven approaches such as machine learn- on existing work on belief revision updates for default ing, can be used to create a detailed and accurate user logic [9]. We then compare this to previous work on model [6], these models can be hard to adapt when the user-agent misalignment [10, 11] and showcase how the user’s needs change [7]. The concepts captured in these formal updates can be used to resolve potential misalign- ment scenarios (Section 5) . Throughout the paper we 22nd International Workshop on Nonmonotonic Reasoning, November will illustrate the framework using a simple running ex- 2-4, 2024, Hanoi, Vietnam ∗ Corresponding author. ample of a support agent intended to assist the user in Envelope-Open j.d.wolff@utwente.nl (J. Wolff); v.de.boer@vu.nl (V. d. Boer); finding a suitable exercise based on their needs. d.k.j.heylen@utwente.nl (D. Heylen); m.b.vanriemsdijk@utwente.nl (M. B. v. Riemsdijk) Orcid 0009-0005-0178-9570 (J. Wolff); 0000-0001-9079-039X 2. Preliminaries (V. d. Boer); 0000-0003-4288-3334 (D. Heylen); 0000-0001-9089-5271 (M. B. v. Riemsdijk) We begin by introducing some preliminaries about the © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). ordered default logic that we will be using for our agent CEUR Workshop Proceedings http://ceur-ws.org ISSN 1613-0073 CEUR Workshop Proceedings (CEUR-WS.org) CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings framework in Section 3.2. We also present the belief Definition 2. We define 𝑃𝑟𝑒𝑟𝑒𝑞(Δ),𝐽 𝑢𝑠𝑡𝑖𝑓 (Δ) and revision operators that we will be using in Section 4. 𝐶𝑜𝑛𝑠𝑒𝑞(Δ) to be the set of prerequisites, justifications and consequents of the default rules 𝛿 in Δ. We take 𝐺𝐷(𝐷, 𝐸) 2.1. Ordered Default Logic to be the set of default rules which generate the extension 𝐸 and a grounded enumeration (𝛿𝑖 )𝑖∈𝐼 of 𝐺𝐷(𝐷, 𝐸) to be an Default logic was first introduced in [12] to formalise order in which these rules can be applied. inference rules which are usually true but allow for ex- For a theory 𝑇 = (𝐾 , 𝐷, <), an extension 𝐸 ∈ ℰ (𝑇 ) is ceptions. This is done using default rules of the form <-preserving if there is a grounded enumeration (𝛿𝑖 )𝑖∈𝐼 of 𝐺𝐷(𝐷, 𝐸) so that for all 𝑖, 𝑗 ∈ 𝐼 and 𝛿 ∈ 𝐷 ∖ 𝐺𝐷(𝐷, 𝐸) it Prerequisite ∶ Justification 𝛿 holds that Consequent . 1. if 𝛿𝑖 < 𝛿𝑗 then 𝑗 < 𝑖 and This rule states that if the prerequisite is proven and it 2. if 𝛿𝑖 < 𝛿 then 𝑃𝑟𝑒𝑟𝑒𝑞(𝛿) ∉ 𝐸 or 𝐾 ∪ is consistent to assume the justification, then the conse- 𝐶𝑜𝑛𝑠𝑒𝑞({𝛿0 , … , 𝛿𝑖−1 }) ⊢ ¬𝐽 𝑢𝑠𝑡𝑖𝑓 (𝛿). quent is inferred. In the work of [13] there is additionally a strict partial Even if we know that ℰ (𝑇 ) is not empty, this does not ordering 𝛿1 < 𝛿2 on these default rules which expresses ensure that a <-preserving extension of 𝑇 = (𝐾 , 𝐷, <) that 𝛿1 should only be applied if 𝛿2 has already been ap- exists. Intuitively, this is because lower ranked default plied or is inapplicable. This results in an ordered default rules may have a consequent which can be used to infer theory of the form (𝐾 , 𝐷, <) in which 𝐾 is a set of sen- the prerequisite of otherwise inapplicable, higher ranked tences, 𝐷 is a set of default rules and < is an ordering default rules. This means that a higher ranked rule may on the default rules in 𝐷. Intuitively, we understand be applied after the application of a lower ranked rule. the sentences in 𝐾 to describe our, possibly incomplete, As a result, the grounded enumeration of 𝐺𝐷(𝐷, 𝐸) will knowledge of the world while the default rules in 𝐷 allow not satisfy the first condition from Definition 2. us to derive additional information based on our beliefs. In [14] these inference relationships between the de- The ordering < may be used to express either preferences fault rules of a theory are formalised using the depen- or priorities between these beliefs. A theory of this or- dency graph of the theory. The dependency graph dered default logic can be translated into standard default 𝒢 (𝐷, 𝐾 ) captures whether default rules influence the logic, allowing for an implementation in theorem provers applicability of other default rules, either positively by for standard default logic [13]. inferring the prerequisite or negatively by inferring the When working with default theories, we are interested negation of the justification. We take 𝒢 (𝐷, 𝐾 ) to be the in the complete views of the world that are consistent set of directed edges between the default rules in 𝐷. with the initial theory, which we refer to as extensions. In [13] this is used to specify conditions under which For an ordered default theory 𝑇 = (𝐾 , 𝐷, <) and any an order default theory has a <-preserving extension. For set of sentences 𝑆, we define Γ(𝑆) to be the smallest set this, a default theory is considered even if all cycles of satisfying the following properties: the dependency graph have an even number of negative relations. Intuitively this means that the application of 1. 𝐾 ⊆ Γ(𝑆) a default rules does not negatively influence its own ap- 2. 𝑇 ℎ(Γ(𝑆)) = Γ(𝑆) plicability. The ordering < specifies that a lower ranked 𝛼∶𝛽 3. for all default rules 𝛾 ∈ 𝐷, rule is only applicable after all higher ranked rules have if 𝛼 ∈ Γ(𝑆) and ¬𝛽 ∉ 𝑆 then 𝛾 ∈ Γ(𝑆) been applied. This means that for each relation (𝛿 < 𝛿 ′ ), we want to ensure that 𝛿 does not affect the applicability Here 𝑇 ℎ(Γ(𝑆)) stands for the deductive closure of Γ(𝑆). of 𝛿 ′ . We call a set of sentences 𝐸 an extension of the theory 𝑇 if 𝐸 = Γ(𝐸). In the following, we will discuss only the Proposition 1. As proven in [13], an ordered default consistent extensions of a theory. If we restrict ourselves theory 𝑇 = (𝐾 , 𝐷, <) is guaranteed to have a <-preserving to normal default rules where the justification and the extension if the dependency graph 𝒢 (𝐷, 𝐾 ) consequent are the same, [12] has shown that this ensures 1. is even and the existence of a consistent extension. In the following, we will only consider default rules of this form. 2. including the ordering < does not create new cycles, so for all cycles 𝒞 of 𝒢 (𝐷, 𝐾 ) ∪ {(𝛿 ′ , 𝛿) ∣ 𝛿 < 𝛿 ′ }, Definition 1. We define ℰ (𝑇 ) to be the set of all consistent 𝒞 is a cycle of 𝒢 (𝐷, 𝐾 ). extensions of the default theory 𝑇 = (𝐾 , 𝐷, <). Since the ordering < is not necessarily total, it is pos- The consistent extensions we have defined above do sible that there are multiple <-preserving extensions. not yet take the ordering < into account. To include this we use the notion of <-preserving extensions from [13]. 2.2. Belief Revision • The action language ℒ𝐴 over 𝑂 and atoms 𝐴 • The goal language ℒ𝐺 over 𝑂 and atoms 𝐺 The field of belief revision is concerned with formalising • The context language ℒ𝐶 over 𝑂 and atoms 𝐶 changes to knowledge and belief bases. Since the knowl- edge and beliefs of a behaviour support agent are subject • The agent language ℒ over 𝑂 and atoms 𝐴𝑡𝑜𝑚𝑠 to change over time, we want to use update operations A plan for a goal 𝑔 ∈ 𝐺 is a tuple of the form (𝑔, 𝜑), in from belief revision to reflect this. which 𝜑 is a formula from ℒ𝐴 describing the actions that In general, belief revision is used to update a set of sen- must be taken or avoided to achieve the goal 𝑔. tences 𝑆. We will be working with theory base revision operators [15], which do not require 𝑆 to be deductively Definition 5. The set of all possible plans 𝐿𝑃 is defined closed, as opposed to AGM operators [16]. Specifically as follows: 𝐿𝑃 = {(𝑔, 𝜑) ∣ 𝑔 ∈ 𝐺, 𝜑 ∈ ℒ𝐴 , 𝜑 ≢ ⊥}. we will use the operator 𝑆 ∗ 𝜑 to add a sentence 𝜑 to 𝑆 We introduce several types of rules which allow the while ensuring the resulting set remains consistent and agent to infer information based on its initial knowledge. the operator 𝑆 ÷ 𝜑 to remove sentences from 𝑆 until 𝜑 can Each rule is represented as a tuple (𝜑, 𝜓 ) in which 𝜑 is no longer be inferred. the prerequisite and 𝜓 is the consequent. These rules will There is a range of work specifically concerned with capture a form of defeasible reasoning in which we only integrating belief revision methods into default logic such infer the consequent if it is consistent with all other infor- as [17, 18, 19]. In our work we will use the operators mation. This means that if 𝜑 is true and nothing suggests defined in [9], which includes updates to the knowledge otherwise, then 𝜓 is inferred. For all types of rules 𝜑 may base and the default rules of a default theory. be ⊤ to signify that the rule has no prerequisite. If we use theory base revision operators, 𝐾 ∗𝜑 and 𝐾 ÷𝜑 Context assumption rules are of the form (𝜑, 𝜓 ) with on the knowledge base 𝐾 of a default theory 𝑇, [9] shows 𝜑, 𝜓 ∈ ℒ𝐶 describing aspects of the context. We can that this can be used to either add 𝜑 to all extensions of 𝑇 use these rules to make assumptions about the standard or remove 𝜑 from 𝑇 ℎ(𝐾 ). context that the user is in or to represent the beliefs the Additionally, [9] introduces updates on the set of de- agent has about the relation between different contexts. fault rules 𝐷. We use 𝐷 ÷𝛿 = 𝐷 ∖{𝛿} as an operator which removes the default rule 𝛿 from 𝐷 and 𝐷 ∗ 𝛿 = 𝐷 ∪ {𝛿} Definition 6. The set of all possible context assumption which adds a default rule 𝛿 to 𝐷. rules is defined as ℛ𝐶 = {(𝜑, 𝜓 ) ∣ 𝜑, 𝜓 ∈ ℒ𝐶 }. Goal selection rules are of the form (𝜑, 𝑔) with 𝜑 ∈ ℒ𝐶 3. Behaviour Support Agent describing the context and 𝑔 ∈ 𝐺 describing the goal that should be achieved in this context. These are used to In the following section we introduce our framework that describe which goal the user should strive for in a certain can be used to formalise a behaviour support agent. The context, if possible. agent will be able to select a suitable goal for the user to Definition 7. The set of all possible goal selection rules is pursue based on the context that the user is currently in. defined as ℛ𝐺 = {(𝜑, 𝑔) ∣ 𝜑 ∈ ℒ𝑐 , 𝑔 ∈ 𝐺}. The agent will then recommend actions which result in this goal being achieved, based on the user’s preferences. Action selection rules are of the form (𝜑, 𝜓 ) with 𝜑 ∈ ℒ and 𝜓 ∈ ℒ𝐴 . Here 𝜑 describes the circumstances in 3.1. Syntax which the actions described in 𝜓 may be taken, if they are possible. These circumstances can include certain We define a support agent for a set of possible actions context factors, the selected goals and other selected 𝐴 that the agent can recommend, the set of goals 𝐺 the actions depending on the application. user may have and a set of contexts 𝐶 that may affect the user’s goals and actions. Definition 8. The set of action selection rules is defined as ℛ𝐴 = {(𝜙, 𝜓 ) ∣ 𝜙 ∈ ℒ , 𝜓 ∈ ℒ𝐴 }. Definition 3 (Atoms). We define the following sets of propositional atoms: We use ℛ = ℛ𝐶 ∪ ℛ𝐺 ∪ ℛ𝐴 to refer to all rules col- lectively. In order to be able to reason with these rules, • 𝐴 = {𝑎1 , … , 𝑎𝑛 } describing the possible actions, we assign each rule 𝑟 ∈ ℛ a unique name 𝑛(𝑟). For this, • 𝐺 = {𝑔1 , … , 𝑔𝑚 } describing the goals, we define an injective naming function 𝑛 from the set of • 𝐶 = {𝑐1 , … , 𝑐𝑙 } describing different contexts and all rules ℛ to a set of names 𝑁. We use these names to • 𝐴𝑡𝑜𝑚𝑠 = 𝐴 ∪ 𝐺 ∪ 𝐶. define an ordering on the rules. For simplicity of notation Definition 4 (Language). Let 𝑂 = {⊤, ¬, ∧, ∨, →} be a we will use the name and the rule itself interchangeably. standard set of logical operators. We introduce the following We represent the current state of the agent through its propositional languages, defined over the operators 𝑂 and configuration, a tuple which specifies the formulas, rules sets of atoms in the usual way: and orderings that the agent reasons with. Definition 9. The configuration of an agent is a tuple This results in an agent configuration 𝐸𝑥 = Conf = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) where 𝑊 ⊆ ℒ (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) is the world knowledge, 𝐶𝐶 ⊆ 𝐿𝐶 are literals describing the current context, 𝑃 ⊆ 𝐿𝑃 is a set of plans, 𝐷𝐶 ⊆ ℛ𝐶 is a 3.2. Determining the Agent’s Advice set of context assumption rules, 𝐷𝐺 ⊆ ℛ𝐺 is a set of goal selection rules, 𝐷𝐴 ⊆ ℛ𝐴 is a set of action selection rules For a given configuration Conf of the agent, we de- and <𝐶 , <𝐺 , <𝐴 are acyclic orderings on 𝐷𝐶 , 𝐷𝐺 and 𝐷𝐴 . fine a corresponding theory of ordered default logic We also specify that for each goal 𝑔 ∈ 𝐺, there is only one 𝑇 = (𝐾 , 𝐷, <). We define the knowledge base 𝐾 based on plan 𝑝 = (𝑔, 𝜑) ∈ 𝑃. If there are multiple ways to achieve 𝑊, 𝐶𝐶 and 𝑃, the set of default rules based on 𝐷𝐶 , 𝐷𝐺 and a goal this should be specified through disjunctions in 𝜑, 𝐷𝐴 and the ordering < based on <𝐶 , <𝐺 and <𝐴 . We take rather than separate plans. the sentences in 𝐾 to describe the agent’s, possibly incom- plete, knowledge of the world while the default rules in To illustrate the use of each component of the agent’s 𝐷 allow the agent to derive additional information based configuration we introduce a simplified example. We on its beliefs. The ordering < provides a way to prioritise consider an agent which can give the user advice on how between these beliefs, either based on other beliefs about to lead a healthier lifestyle based on the user’s medical the world or based on the the user’s preferences. data. For our purposes we assume that the agent should For this we translate every plan 𝑝 ∈ 𝑃 of the form recommend one exercise for the user each day, but if 𝑝 = (𝑔, 𝜑) into a formula 𝑔 → 𝜑 ∈ ℒ. We write 𝑇 𝑟(𝑃) = the user’s blood pressure is elevated, this should be a {𝑔 → 𝜑 ∣ (𝑔, 𝜑) ∈ 𝑃} for the set of all such translated plans. higher-intensity workout. The agent knows of two types We also translate each rule 𝑟 = (𝜑, 𝜓 ) ∈ 𝐷𝑖 for 𝑖 ∈ {𝐶, 𝐺, 𝐴} of low-intensity exercises, namely walking and yoga, and in the agent’s configuration to a default rule of the form two types of higher-intensity exercises, namely going for a run and weight training. 𝜑 ∶ 𝜓 𝑟 𝜓 . Example 1. The agent is defined for the context factor 𝐶 = {𝐵𝑃} which indicates that the user’s blood pressure is We take the transitive closures <+ + + 𝐴 , <𝐺 , <𝐶 of the order- elevated, the set of goals 𝐺 = {𝐿𝐼 , 𝐻 𝐼 } which stand for low- ings to obtain strict partial orderings and define < as the intensity or higher-intensity workouts and the set of actions series composition partial order of 𝐷 , 𝐷 and 𝐷 . This 𝐶 𝐺 𝐴 𝐴 = {Walk, Yoga, Run, Weights} which are available. means in addition to ordering given in Conf, we also con- The world knowledge is given by 𝑊 = {𝜑1𝑔 , 𝜑1𝑎 }, in sider all rules regarding the context to be ranked higher which the formulas 𝜑1𝑔 , 𝜑1𝑎 express that at most one goal than goal and action selection rules and we rank all goal and one action proposition can be true at the same time selection rules higher than the action selection rules. We and therefore included in the agent’s advice. This is do this to make sure that the agent first considers the needed to ensure that the agent only gives one recom- context it is in, then selects a goal for the user to pursue mended action each day. The current context 𝐶𝐶 con- and then selects actions based on this. tains the blood pressure information of the user. In this example we will assume that the blood pressure is high, Definition 10. We define the ordered default theory so 𝐶𝐶 = {𝐵𝑃}. The plans corresponding to the goals are 𝐷𝐿(Conf) corresponding to the agent whose configuration 𝑃 = {(𝐿𝐼 , 𝑊 𝑎𝑙𝑘 ∨ 𝑌 𝑜𝑔𝑎), (𝐻 𝐼 , 𝑅𝑢𝑛 ∨ 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠)}. is given by Conf = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) to We assume that if we have no information suggesting be 𝐷𝐿(Conf) = (𝐾 , 𝐷, <) where 𝐾 = 𝑊 ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃) is the otherwise, the user’s blood pressure is normal. Therefore knowledge base, 𝐷 = {𝜑 ∶ 𝜓 /𝜓 ∣ (𝜑, 𝜓 ) ∈ 𝐷𝐶 ∪ 𝐷𝐺 ∪ 𝐷𝐴 } is 𝐷𝐶 = {(⊤, ¬𝐵𝑃)}. The goal of a higher intensity work- the set of default rules that make up the belief base and < out should only be selected if 𝐵𝑃 is true, but the goal of a is the series partial order of 𝐷𝐶 , 𝐷𝐺 and 𝐷𝐴 . lower intensity workout can be selected in any situation so 𝐷𝐺 = {(𝐵𝑃, 𝐻 𝐼 ), (⊤, 𝐿𝐼 )}. For the sake of this exam- Based on our definition of a configuration, it is not ple we assume that all the considered actions can be done yet guaranteed that this ordered default theory has a in any context, which gives us the action selection rules consistent extension. We define valid configurations to {(⊤, 𝑊 𝑎𝑙𝑘), (⊤, 𝑌 𝑜𝑔𝑎), (⊤, 𝑅𝑢𝑛), (⊤, 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠)}. be those which do. Since we only have one context assumption rule, we Definition 11. A configuration Conf is valid if 𝑊 ∪ 𝐶𝐶 ∪ do not specify any ordering on this type of rule. The 𝑇 𝑟(𝑃) is consistent. goal of a higher intensity workout, if applicable, is more important than the lower intensity workout so we have Proposition 2. For an ordered default theory 𝐷𝐿(Conf) = (⊤, 𝐿𝐼 ) <𝐺 (𝐵𝑃, 𝐻 𝐼 ) The user has expressed that they prefer (𝐾 , 𝐷, <) based on a valid configuration Conf of an agent, Yoga over Walking and Running over Weights so we specify the unordered default theory (𝐾 , 𝐷) has at least one con- (⊤, 𝑊 𝑎𝑙𝑘) <𝐴 (⊤, 𝑌 𝑜𝑔𝑎) and (⊤, 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠) <𝐴 (⊤, 𝑅𝑢𝑛). sistent extension. This follows directly from [12] as, by definition, 𝐾 is 4. Agent Updates consistent and all default rules in 𝐷 are normal. However, as discussed in Section 2, this does not yet guarantee the In the previous section we have defined the configura- existence of a <-preserving extension. For this we define tion of a behaviour support agent and detailed how this the notion of an effective configuration. determines the advice that the agent gives. In practice, the knowledge and beliefs of the agent change over time, Definition 12. An agent configuration is effective if it is so we need to be able to adapt the configuration of the valid and the ordered default theory 𝐷𝐿(Conf) fulfils the agent. In this section, we define update operations on requirements from Proposition 1. the agent’s configuration which will allow us to add or We argue that an agent which is defined in an intu- remove information from each component individually. itively sensible way, will fulfil these conditions. If the For each of these components, we want the updates dependency graph of the theory 𝐷𝐿(Conf) is not even, or to be defined in such a way that the knowledge base goes against the ordering <, then this signifies an implicit 𝑊 ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃) remains consistent. This is necessary to inconsistency in the reasoning formalised in the agent. ensure that we obtain a valid configuration as the result of However, these conditions are difficult to formalise for the update. Unfortunately, we cannot always guarantee the configuration of the agent, as they require us to con- that the new configuration will also be effective due to the sider the default theory. In future work we hope to deter- requirements from Definition 12. We will formally define mine clear requirements for agent configurations which the updates and also highlight such possible problems. guarantee for the existence of a <-preserving extension. We use the <-preserving extensions of the default the- 4.1. Updates to Knowledge Base ory 𝐷𝐿(Conf) based on the agent’s configuration to de- The knowledge base of the agent is made up of the world termine the advice that the agent should give the user. If knowledge 𝑊, the current context information 𝐶𝐶 and the there are multiple suitable extensions of 𝐷𝐿(Conf) then set of plans 𝑃. We want to be able to update these parts the agent requires a way to choose one of these exten- individually, but as explained above we have to consider sions. This requires a meta-logic above the default logic them all to ensure the updates yield a valid configuration. that we have specified, so we will simply assume that We can update the world knowledge 𝑊 of the agent such a selection can be made. by adding a sentence 𝜑 ∈ ℒ using the following update. Definition 13. For an agent with the effective configura- tion Conf = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) which is Definition 14. For a configuration Conf = translated into the ordered default theory 𝐷𝐿(Conf) with (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a formula 𝜑 ∈ ℒ the <-preserving extension 𝐸, the agent’s advice consists of with {𝜑} ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃) consistent, we define the update op- the set of selected goals 𝒜𝐺 = 𝐺 ∩ 𝐸 and the set of recom- eration Conf ∗𝑊 𝜑 = (𝑊 ′ , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) mended actions 𝒜𝐴 = 𝐿(𝐴) ∩ 𝐸. with 𝑊 ′ = (𝑊 ∗ ({𝜑} ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃))) ∖ (𝐶𝐶 ∪ 𝑇 𝑟(𝑃)). We showcase how the advice is obtained from the con- This means we use the theory base revision opera- figuration of an agent by going through the configuration tor on 𝑊 and update it with 𝜑 but also with 𝑇 𝑟(𝑃) and from Example 1. 𝐶𝐶. While we remove 𝑇 𝑟(𝑃) and 𝐶𝐶 again afterwards, this approach guarantees that 𝑊 ′ ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃) will be Example 2. The configuration 𝐸𝑥 as defined in Example 1 consistent. is translated into the ordered default theory 𝑇 = (𝐾 , 𝐷, <) If we want to remove a formula from the world knowl- with edge 𝑊, this is unproblematic for the consistency of the knowledge base. • 𝐾 = {𝜑1𝑔 , 𝜑1𝑎 , 𝐵𝑃, 𝐻 𝐼 → (𝑅𝑢𝑛 ∨ 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠), 𝐿𝐼 → (𝑊 𝑎𝑙𝑘 ∨ 𝑌 𝑜𝑔𝑎)}, Definition 15. For a configuration Conf = • 𝐷 = { ⊤∶¬𝐵𝑃 ¬𝐵𝑃 1 𝛿 , 𝐵𝑃∶𝐻 𝐼 𝐻𝐼 𝛿 , ⊤∶𝐿𝐼 𝛿 , ⊤∶𝑊 𝑎𝑙𝑘 2 𝐿𝐼 3 𝑊 𝑎𝑙𝑘 4 𝛿 , (𝑊 , 𝐶𝐶, 𝑃, 𝐷 𝐶 , 𝐷 𝐺 , 𝐷 𝐴 , < 𝐶 , < 𝐺 , < 𝐴 ) and a for- ⊤∶𝑌 𝑜𝑔𝑎 ⊤∶𝑅𝑢𝑛 ⊤∶𝑊 𝑒𝑖𝑔ℎ𝑡𝑠 mula 𝜑 ∈ ℒ, we define the update operation 𝛿5 , 𝛿 6 , 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠 7 𝛿 } and 𝑌 𝑜𝑔𝑎 𝑅𝑢𝑛 Conf ÷𝑊 𝜑 = ((𝑊 ÷ 𝜑), 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) to • < = 𝐷𝐶 ; 𝐷𝐺 ; 𝐷𝐴 = {(𝛿𝑖 , 𝛿1 ) ∣ 𝑖 = 2, … , 7} ∪ {(𝛿𝑖 , 𝛿𝑗 ) ∣ remove 𝜑 from 𝑊 and its deductive closure 𝑇 ℎ(𝑊 ). 𝑖 = 4 … , 7; 𝑗 = 2, 3} ∪ {(𝛿3 , 𝛿2 )} ∪ {(𝛿4 , 𝛿5 ), (𝛿7 , 𝛿6 )} We note that by defining the operator in this way, it The default theory (𝐾 , 𝐷) has four possible extensions. We is possible that 𝜑 is still contained in an extension 𝐸 of write only the relevant parts of each extension. These are 𝐷𝐿(Conf’) due to the information in 𝐶𝐶 ∪ 𝑇 𝑟(𝑃) and the 𝐸1 = {𝐻 𝐼 , 𝑅𝑢𝑛}, 𝐸2 = {𝐻 𝐼 , 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠}, 𝐸3 = {𝐿𝐼 , 𝑌 𝑜𝑔𝑎} and rules in 𝐷𝐶 , 𝐷𝐺 and 𝐷𝐴 . 𝐸4 = {𝐿𝐼 , 𝑊 𝑎𝑙𝑘}. However, only 𝐸1 is <-preserving. There- In order to update the current context 𝐶𝐶 we use the fore the agent’s advice consists of the selected goal 𝐻 𝐼 and following operators, similarly to the ones for 𝑊. the recommended action 𝑅𝑢𝑛. Definition 16. For a configuration Conf = 4.2. Updates to the Beliefs (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and context in- The beliefs of the agent are made up of the context as- formation 𝜑 ∈ 𝐿(𝐶) so that {𝜑} ∪ 𝑊 ∪ 𝑇 𝑟(𝑃) sumption rules 𝐷𝐶 , the goal selection rules 𝐷𝐺 and the consistent, we define the update operation action selection rules 𝐷𝐴 . Since all types of rules and Conf ∗𝐶𝐶 𝜑 = (𝑊 , 𝐶𝐶 ′ , 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) their respective orderings are defined and translated in with 𝐶𝐶 ′ = (𝐶𝐶 ∗ (𝜑 ∪ 𝐶𝐶 ∪ 𝑇 𝑟(𝑃))) ∖ (𝑊 ∪ 𝑇 𝑟(𝑃)) the same way, we will only go through the updates of the Definition 17. For a configuration Conf = context assumption rules in detail, the rest are analogous. (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and context in- When adding a new context assumption rule to the formation 𝜑 ∈ 𝐶 ∪ ¬𝐶, we define the update operations agent’s belief base, it is likely that this belief should also Conf ÷𝐶𝐶 𝜑 = (𝑊 , (𝐶𝐶 ÷ 𝜑), 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) to be integrated into the ordering <𝐶 . However, this is not remove 𝜑 from 𝐶𝐶. mandatory and can be done separately with the update operator on <𝐶 that we introduce below. In order to update the plans 𝑃 by adding or remov- ing a plan 𝜋 = (𝑔, 𝜑) we use similar updates as for the Definition 20. For a configuration Conf = knowledge base. When adding a new plan to 𝑃 we need (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a context as- to ensure that the resulting set of plans only contains at sumption rule 𝑟 = (𝜑, 𝜓 ) ∈ ℛ𝐶 we define the update most one plan per goal. This means we have to remove Conf ∗𝐷𝐶 𝑟 = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶′ , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) where any previous plan (𝑔, 𝜓 ) for the goal 𝑔 before adding 𝐷𝐶′ = 𝐷𝐶 ∪ {𝑟}. (𝑔, 𝜑) to 𝑃. We also make sure that the new information is consistent with the other components of the knowl- When an existing context assumption rule 𝑟 needs to edge base. be removed from 𝐷𝐶 , then we have to remove it from the ordering <𝐶 as well. This follows from the requirement Definition 18. For a configuration Conf = that the ordering <𝐶 should be defined on the set 𝐷𝐶 . (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a plan 𝜋 = (𝑔, 𝜑) ∈ 𝐿𝑃 so that {𝑇 𝑟(𝜋)} ∪ 𝑊 ∪ 𝐶𝐶 Definition 21. For a configuration Conf = consistent, we define the update operation (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a context as- Conf ∗𝑃 𝜋 = (𝑊 , 𝐶𝐶, 𝑃 ′ , 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) sumption rule 𝑟 = (𝜑, 𝜓 ) ∈′ ℛ𝐶 we define the update with 𝑃 ′ = (𝑃 ∖ {(𝑔, 𝜓 )} ∪ {𝜋}) to add 𝜋 to 𝑃. Conf ÷𝐷𝐶 𝑟 = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <′𝐶 , <𝐺 , <𝐴 ) where 𝐷𝐶′ = 𝐷𝐶 ∖ {𝑟} and <′𝐶 =<𝐶 ∣𝐷𝐶′ . If we remove a plan 𝜋 = (𝑔, 𝜑) from 𝑃, this will result in a valid configuration. However, it is possible that the Lemma 2. The update operators Conf∗𝐷𝐶 𝑟 and Conf÷𝐷𝐶 𝑟 goal 𝑔 is still the result of a goal selection rule and may are well-defined. If the default theory 𝐷𝐿(Conf) has a be contained in an extension of 𝐷𝐿(Conf). This means consistent extension, then the updated theory will also have the agent may advise the user to pursue the goal, despite a consistent extension. there not being any action recommendation which corre- Proof. This follows directly from the definition and sponds to this. For this reason, this update should usually Proposition 2, since all default rules are still normal and not be performed in isolation in practice. the knowledge base is still consistent. Definition 19. For a configuration Conf = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a plan Unfortunately, when adding a new rule we cannot 𝜋 = (𝑔, 𝜑) ∈ 𝐿𝑃, we define the update operations guarantee the existence of a <-preserving extension as Conf ÷𝑃 𝜋 = (𝑊 , 𝐶𝐶, 𝑃 ′ , 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) with this rule could generate new cycles in the dependency 𝑃 ′ = 𝑃 ∖ 𝜋 to remove 𝜋 from 𝑃. graph that might not be even. However, when removing a rule this does result in a configuration Conf ′ for which Lemma 1. The updates Conf ∗𝐾 𝜑,Conf ∗𝑊 𝜑, Conf ÷𝑊 𝜑, 𝐷𝐿(Conf) has a <-preserving extension. Conf ∗𝐶𝐶 𝜑, Conf ÷𝐶𝐶 𝜑 Conf ∗𝑃 𝜋 and Conf ÷𝑃 𝜋, are well- defined. Additionally, if the default theory 𝐷𝐿(Conf) has Proposition 3. For an effective configuration Conf = a consistent extension, then the updated default theory (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) where 𝐷𝐿(Conf) has a 𝐷𝐿(Conf ′ ) will also have a consistent extension. <-preserving extension and a rule 𝑟 ∈ ℛ𝐶 , the ordered default theory 𝐷𝐿(Conf ′ ) with Conf ′ = Conf ÷𝐷𝐶 𝑟, also Proof. This follows directly from the definitions of ∗𝜑 has a <-preserving extension. and ÷𝜑 and Proposition 2. Proof. To see this we check the conditions of Proposition Unfortunately we cannot make the same claim regard- 1. Removing a rule from the configuration and thereby ing <-preserving consistent extensions. This is because removing a default rule from the default theory, cannot any update to the knowledge base of a theory will affect create any new cycles in the dependency graph. Since the dependency graph 𝒢 (𝐷, 𝐾 ) of the theory 𝐷𝐿(Conf). Conf is an effective configuration, we know that all exist- 5. Resolving Misalignments ing cycles are even, which means that the dependency graph of 𝐷𝐿(Conf ′ ) is even too. Additionally, any cy- With the framework we introduced, the agent is able to cles that are removed from the dependency graph by reason about a user model and a world model in order to removing 𝑟 are also removed from the ordering <, so the provide personalised support to the user. By representing ordering cannot introduce any new cycles. this explicitly, the user can interact with and adapt the agent’s reasoning process directly using the updates that we have defined in the previous section. We chose to use 4.3. Updates to the Ordering default logic for this purpose because this allows the user The ordering of the agent is made up of the orderings to interact with and adapt the agent’s reasoning process <𝐶 , <𝐺 and <𝐴 on 𝐷𝐶 , 𝐷𝐺 and 𝐷𝐴 respectively. We can directly using the updates that we have defined in the update each of these orderings individually and only need previous section. A revision of the agent’s reasoning to ensure that the resulting ordering is acyclic. Since process is necessary if the agent’s advice does not align all three orderings of the agent are defined in the same with the needs and wants of the user because the agent’s way, we will only go through the updates to the context advice contains either an action 𝑎 or a goal 𝑔 that the ordering in detail; the others are analogous. user does not agree with. In the following, we refer We can add a relation to <𝐶 using the following update. to these situations as misalignment scenarios, based on [10, 11]. In this section we will discuss the causes of Definition 22. For a configuration Conf = misalignments that are identified in [10] and discuss how (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a relation (𝑟1 , 𝑟2 ) these can be resolved using the update operators defined with 𝑟1 , 𝑟2 ∈ 𝐷𝐶 and (𝑟2 , 𝑟1 ) ∉ <+ 𝐶 we define the update in the previous section. Conf ∗<𝐶 (𝑟1 , 𝑟2 ) = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <′𝐶 , <𝐺 , <𝐴 ) The three causes for these misalignments that are dif- where <′𝐶 =<𝐶 ∪{(𝑟1 , 𝑟2 )}. ferentiated in [10] are the reasoning process of the agent When removing a relation (𝑟1 , 𝑟2 ) from <𝐶 , we ideally being wrong, the agent’s user model being wrong or want to remove the relation from <+ something having changed in such a way that the agent 𝐶 to make sure it does not appear in 𝐷𝐿(Conf). However, this may require needs to adapt to the new situation. For our purposes, we removing multiple relations from <𝐶 in the process. Since do not need to differentiate whether the misalignments we have multiple choices for this, we will not include occur due to a change or because of a mistake in the this in the update. If necessary, the ordering will need to initialisation of the agent. Formally, these are handled be updated multiple times to fully remove the relation the same way in this framework. We will discuss how from <+ each of the scenarios can be addressed by updating the 𝐶. configuration of the agent. We will give examples of Definition 23. For a configuration Conf = potential misalignments with the advice provided by the (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <𝐶 , <𝐺 , <𝐴 ) and a relation agent we introduced in Example 1 and showcase how the (𝑟1 , 𝑟2 ) with 𝑟1 , 𝑟2 ∈ 𝐷𝐶 we define the update realignment updates affect that configuration. Conf ÷<𝐶 (𝑟1 , 𝑟2 ) = (𝑊 , 𝐶𝐶, 𝑃, 𝐷𝐶 , 𝐷𝐺 , 𝐷𝐴 , <′𝐶 , <𝐺 , <𝐴 ) For the sake of this section we will assume that the where <′𝐶 =<𝐶 ∖{(𝑟1 , 𝑟2 )}. agent and the user are able to identify the exact cause of the misalignment together. While this is not a trivial Lemma 3. The update operators Conf ∗ <𝐶 (𝑟1 , 𝑟2 ) and assumption and still a topic of active research, this is not Conf ÷<𝐶 (𝑟1 , 𝑟2 ) are well-defined. The resulting ordering something that can be achieved purely within the logical <′𝐶 is acyclic. If the default theory 𝐷𝐿(Conf) has a consis- framework of an agent, making it out of the scope of this tent extension, then the updated theory will also have a paper. For simplicity, we also assume that there is only consistent extension. one misalignment at a time. Proof. This follows directly from definition as the knowl- edge base is still consistent and the default rules are still 5.1. Incorrect Reasoning normal. The reasoning process of the agent is based on logical When adding a new relation to the ordering <𝐶 , this inference, which cannot be incorrect by itself. However, may create new cycles when combined with the depen- if the world model of the agent is incorrect, then the dency graph of 𝐷𝐿(Conf), which means we cannot guar- agent may draw the wrong conclusions even if the user antee that the resulting configuration will be effective. model is correct. This may refer to either the knowledge On the other hand, it is obvious that removing a relation or the beliefs about the world, the latter including the does not have this issue, meaning that a useful configu- prioritisation of these beliefs. ration will be updated to another useful configuration. 5.1.1. Incorrect World Knowledge specify that unless we have other knowledge, we assume it The first misalignment scenario we consider is the situa- is not raining. We use the update 𝐸𝑥 2 = 𝐸𝑥 1 ∗𝐷𝐶 ⊤∶¬𝑅𝑎𝑖𝑛 ¬𝑅𝑎𝑖𝑛 8 𝛿 . tion in which the agent has incorrect knowledge about We remove the action selection rule 𝛿6 which is concerned the world. This means that there is either a sentence with running through 𝐸𝑥 3 = 𝐸𝑥 2 ÷𝐷𝐴 𝛿6. We add the 𝜑 ∉ 𝑊 that the agent does not know or the agent incor- modified action selection rule and obtain 𝐸𝑥 4 = 𝐸𝑥 3 ∗𝐷𝐴 ¬𝑅𝑎𝑖𝑛∶𝑅𝑢𝑛 rectly accepts 𝜑 ∈ 𝑊 as known. 𝑅𝑢𝑛 }. We now restore the ordering by including 𝛿7 < If the agent is missing the information 𝜑, we can up- 𝛿9 . This gives us the final updated configuration 𝐸𝑥 ′ = date the configuration Conf of the agent using Conf ∗𝑊 𝜑. 𝐸𝑥 5 ∗<𝐴 (𝛿7 , 𝛿9 ) By definition, this update requires 𝜑 to be consistent with The resulting default theory 𝐷𝐿(𝐸𝑥 ′ ) only has one <- 𝐶𝐶 ∪ 𝑇 𝑟(𝑃). If we assume that 𝜑 is the only cause of preserving extension 𝐸 ′ = {𝐻 𝐼 , 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠}. misalignment then this requirement also makes sense intuitively. In order for the agent to also be able to give 5.1.2. Incorrect Beliefs about the world advice, there are the additional requirements of the ef- fective configuration. While we have explained above The agent’s beliefs about the world, modelled as context that these requirements are reasonable, they might be assumption rules in 𝐷𝐶 , may also be incorrect. hard for the user to understand, especially if the agent If a new belief 𝛿 needs to be adopted, then this can be becomes more complex. In future work we hope to look done using the update Conf ∗𝐷𝐶 𝛿. This will cause the into ways to identify problematic cycles in the agents dependency graph of the agent to change, which may configuration and assist the user in resolving them. mean that the resulting configuration is not effective. This brings similar problems as a change in the world Example 3. In Example 2, we have identified that the knowledge. agent’s advice would be to pursue higher intensity exercis- A belief 𝛿 can be removed from the agent’s configura- ing and specifically to go for a run. However, the user may tion with the update Conf ÷𝐷 𝛿. While this will produce 𝐶 be unable to go for a run because their regular running an effective configuration, this may lead to the agent’s route is under construction. While this is related to a certain advice being less specific towards the user’s context. context in a way, which we discuss later on, we can treat The beliefs about the world may also need to be priori- this as direct information about the world. This means we tised differently, by updating the ordering <𝐶 . While we update the agent’s configuration with 𝐸𝑥 ′ = 𝐸𝑥 ∗𝑊 ¬𝑅𝑢𝑛. have introduced updates Conf ∗< (𝛿𝑖 , 𝛿𝑗 ) and Conf ÷< As a result, {𝐻 𝐼 , 𝑅𝑢𝑛} is no longer an extension of 𝐸𝑥 ′ , and (𝛿𝑖 , 𝛿𝑗 ) to add or remove a relation to the ordering, in prac- 𝐶 𝐶 the agent’s advice will instead be based on the extension tice we will likely want to make more complex changes. 𝐸 ′ = {𝐻 𝐼 , 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠}. While these can all be broken down into multiple appli- Next we consider that the agent has wrongly identified cations of the two updates we have defined, this may the current context 𝐶𝐶. If the mistake concerns a context be too complicated for the user to oversee themselves. factor 𝑐 that is already in 𝐶, this can easily be resolved Additionally, we also need to make sure that the relation using the updates Conf ∗𝐶𝐶 𝑐 and Conf ÷𝐶𝐶 𝑐, similarly to remains acyclic and does not contradict the implicit or- the updates to the knowledge base we described above. dering of the default theory modelled in the dependency However, if the user thinks that a new context factor graph. should be considered which is not yet in the language Example 5. So far the agent’s configuration has included of the agent, then simply adding it to the current con- the context assumption rule 𝛿 that unless other information 1 text 𝐶𝐶 is not enough. We likely need to add a context is available, the user’s blood pressure is normal. For this we assumption rule which specifies whether this context remove the original rule 𝛿 using 𝐸𝑥 1 = 𝐸𝑥 ÷ 𝛿 and then 1 𝐷𝐶 1 factor is normally assumed to be true or false. Addition- ′ = 𝐸𝑥 1 ∗ ⊤∶𝐵𝑃 . This means ally, we probably want to include this context factor in add the new rule through 𝐸𝑥 𝐷𝐶 𝐵𝑃 the relevant goal and action selection rules. Since we that even if the agent does not know the blood pressure do not have an update that can modify individual rules, levels of the user, so 𝐵𝑃 ∉ 𝐶𝐶, it will still recommend this needs to be achieved by deleting the original rule, higher intensity exercises. then including the modified rule and lastly reinstating the relevant orderings. 5.2. Incorrect User Model Example 4. We consider that the user does not want to go The user model of our agent contains information about for a run because it is raining. The original configuration of the user’s goals, the user’s possible actions and the prefer- the agent did not account for the context of rain, so we need ences regarding these. While humans may have goals and to perform a series of updates to include this. We begin by preferences that are not strictly logical, the formal frame- adding 𝑅𝑎𝑖𝑛 to the description of the current context using work of the agent requires the goals to be consistent with 𝐸𝑥 1 = 𝐸𝑥 ∗𝐶𝐶 𝑅𝑎𝑖𝑛. We add a context assumption rule to the current context and the knowledge about the world and the dependency graph to fulfil the requirements from updates Conf∗𝐷𝐴 and Conf÷𝐷𝐴 . If the preferences of the Proposition 1. The agent will need to collaborate with user regarding the actions need to be changed, this can the user to ensure that the user model is as accurate as be handled analogous to the change of the ordering <𝐶 , possible while still meeting the formal requirements. using the updates Conf∗<𝐴 and Conf÷<𝐶 . Example 7. In Example 3, the user was not able to go for 5.2.1. Incorrect Goals a run and we added ¬𝑅𝑢𝑛 to the agent’s world knowledge. The goals of the user are what motivates the advice that This time we will remove the action selection rule for 𝑅𝑢𝑛 the agent gives, but they are also subject to change as the instead. By performing the update 𝐸𝑥 ′ = 𝐸𝑥 ÷𝐷𝐴 𝛿6 , the ac- needs and desires of the user develop. Each goal 𝑔 ∈ 𝐺 has tion selection rule and its corresponding ordering in <𝐴 are to correspond to a plan 𝜋 ∈ 𝑃, so that the agent knows removed. This leads to the same < −preserving extension how each goal can be achieved. Additionally, a goal as in Example 3, 𝐸 ′ = {𝐻 𝐼 , 𝑊 𝑒𝑖𝑔ℎ𝑡𝑠}. While these updates should occur in the consequent of a goal selection rule, formally have the same result, they intuitively mean differ- otherwise it cannot be considered in the agent’s advice. ent things. In Example 3 the user is not able to run due to Any changes to the goals of the user therefore have to be outside circumstances from the world that may be resolved captured in the set of plans and the goal selection rules. at some point. We can remove ¬𝑅𝑢𝑛 from the knowledge If a new goal 𝑔 is added, this goal needs a correspond- base 𝑊 and are still able to use the previous user model. The ing plan 𝜋, which can be added with the update Conf ∗𝑃 𝜋. update in this example on the other hand removes running Usually we will also add a goal selection rule (𝜑 ∶ 𝑔/𝑔) 𝛿𝑔 , as a possible action from the user model, indicating that for a sentence 𝜑 ∈ ℒ𝐶 describing the context in which the user no longer views this as an option. the goal can be selected, by Conf ∗𝐷𝐺 𝛿𝑔 . The goal selec- tion rule will then likely need to prioritised adequately, by adding relations to the ordering <𝐺 using Conf∗<𝐺 6. Discussion and Conf÷<𝐺 . Each of these updates will affect the de- We have introduced a formal framework which can be pendency graph, which means there is a risk that the used to specify the configuration of a behaviour sup- resulting agent is not effective. port agent. The configuration can be translated into a If the user no longer wants to pursue a goal 𝑔, then the theory of ordered default logic and the <-preserving ex- relevant goal selection rules as well as their orderings pansions of this theory determine the advice that the need to be removed using the appropriate update. agent presents to the user. We have also defined updates If a plan or a goal selection rule needs to be changed, on the configuration of the agent which can add or re- the original rule has to be deleted and the new version move information from each of the components. These needs to be added in separate updates as for updates to updates can be used to resolve misalignments between the world model. the user and the agent. Example 6. We want the agent to consider the additional In order to use the updates for realignment, it is neces- goal Rest when giving advice. This goal is achieved if no sary for the agent and the user to accurately identify the exercise is done, so the plan is 𝜋 = (Rest, ¬𝑊 𝑎𝑙𝑘 ∧ ¬𝑌 𝑜𝑔𝑎 ∧ precise cause of the misalignment. While this problem ¬𝑅𝑢𝑛 ∧ ¬𝑊 𝑒𝑖𝑔ℎ𝑡𝑠). For now we do not have any context needs to be addressed through communication between requirements for this goal to be selected but we prioritise it the agent and the user [10], we want to facilitate this above the other goal selection rules. We begin by including process using the formal framework of the agent. In fu- the plan 𝑝 in the set of plans using 𝐸𝑥 1 = 𝐸𝑥 ∗𝑃 𝑝. We then ture work we hope to study whether the structure of the include the goal selection rule ⊤ ∶ 𝑅𝑒𝑠𝑡/𝑅𝑒𝑠𝑡 𝛿𝑔 with the framework is understandable to users, how we can for- update 𝐸𝑥 2 = 𝐸𝑥 1 ∗𝐷𝐺 𝛿𝑔 . Lastly, we include the relations mally identify potential causes of misalignment and how (𝛿2 , 𝛿𝑔 ) and (𝛿3 , 𝛿𝑔 ) in the ordering <𝐺 through the update we can explain problematic cycles in the dependency 𝐸𝑥 ′ = 𝐸𝑥 2 ∗<𝐺 {(𝛿2 , 𝛿𝑔 ), (𝛿3 , 𝛿𝑔 )}. This results in an effective graph to assist the user in resolving these. configuration 𝐸𝑥 ′ with the <-preserving extension 𝐸 ′ = So far we have only included the basic updates which {𝑅𝑒𝑠𝑡, ¬𝑊 𝑎𝑙𝑘, ¬𝑌 𝑜𝑔𝑎, ¬𝑅𝑢𝑛, ¬𝑊 𝑒𝑖𝑔ℎ𝑡𝑠}. add or remove information from each component of the agent’s configuration. However, in [9] there are also other updates on default theories, such as introducing a 5.2.2. Incorrect Actions possibility by ensuring that there is at least one consis- The actions that are recommended by the agent are deter- tent extension which contains a sentence 𝜑. It may be mined by the plans for the selected goals and the action interesting to see whether these updates can be adapted selection rules. The user may either want to change the for ordered default logic and what they would mean for context prerequisites for selecting certain actions, add a the agent’s configuration. The updates we have used so new action selection rule or remove an existing action far have also each been permanent changes of the agent’s selection rule. These can each be achieved using the configuration. In practice there may be situations which require different advice in the moment but should not L. van der Gaag, F. van Harmelen, H. van Hoof, be considered in the future. These might require dif- B. van Riemsdijk, A. van Wynsberghe, R. Verbrugge, ferent types of updates to optimise the computational B. Verheij, P. Vossen, M. Welling, A research agenda complexity of the agent. for hybrid intelligence: Augmenting human intel- In order to further demonstrate the potential of our lect with collaborative, adaptive, responsible, and framework, we also hope to implement the example agent explainable artificial intelligence, Computer 53 we have presented in this paper. Since ordered default (2020) 18–28. doi:10.1109/MC.2020.2996587 . logic can be translated into regular default logic using the [5] S. S. Sundar, Rise of Machine Agency: A Framework process described in [13], we can use existing solvers for for Studying the Psychology of Human–AI Interac- default logic to implement the reasoning of the agent. By tion (HAII), Journal of Computer-Mediated Com- combining this with implementations of belief revision munication 25 (2020) 74–88. doi:10.1093/jcmc/ operators, we can study how our framework behaves in zmz026 . a real application. For this, we will likely also need to op- [6] D. Goldenberg, K. Kofman, J. Albert, S. Mizrachi, timise the agent to reduce the computational complexity. A. Horowitz, I. Teinemaa, Personalization in prac- A first step for this is to consider the work of [14] which tice: Methods and applications, in: Proceedings discusses specific types of default theories for which an of the 14th ACM International Conference on Web extension can be found in polynomial time. Search and Data Mining, WSDM ’21, Association for Computing Machinery, New York, NY, USA, 2021, p. 1123–1126. Acknowledgments [7] E. Fermé, M. Garapa, M. D. L. Reis, Y. Almeida, T. Paulino, M. Rodrigues, Knowledge-driven profile This research was partly funded by the Hybrid Intelli- dynamics, Artificial Intelligence 331 (2024) 104117. gence Center, a 10-year programme funded by the Dutch doi:10.1016/j.artint.2024.104117 . Ministry of Education, Culture and Science through the [8] P. B. De Laat, Algorithmic decision-making based Netherlands Organisation for Scientific Research, https:// on machine learning from big data: can trans- hybrid-intelligence-centre.nl, grant number 024.004.022. parency restore accountability?, Philosophy & tech- nology 31 (2018) 525–541. References [9] G. Antoniou, On the dynamics of default rea- soning, International Journal of Intelligent Sys- [1] H. Oinas-Kukkonen, Behavior change support tems 17 (2002) 1143–1155. doi:https://doi.org/ systems: A research model and agenda, in: 10.1002/int.10065 . T. Ploug, P. Hasle, H. Oinas-Kukkonen (Eds.), Per- [10] P.-Y. Chen, M. Tielman, D. Heylen, C. Jonker, suasive Technology, Springer Berlin Heidelberg, M. Riemsdijk, Acquiring semantic knowledge for Berlin, Heidelberg, 2010, pp. 4–14. doi:10.1007/ user model updates via human-agent alignment 978- 3- 642- 13226- 1\_3 . dialogues: An exploratory focus group study, in: [2] N. Albers, M. A. Neerincx, W.-P. Brinkman, Per- HHAI 2023: Augmenting Human Intellect - Pro- suading to prepare for quitting smoking with a vir- ceedings of the 2nd International Conference on tual coach: Using states and user characteristics Hybrid Human-Artificial Intelligence, IOS Press, to predict behavior, in: Proceedings of the 2023 2023, pp. 93–108. doi:10.3233/FAIA230077 . International Conference on Autonomous Agents [11] J. Wolff, V. De Boer, D. Heylen, M. B. Van Riemsdijk, and Multiagent Systems, AAMAS ’23, International Using default logic to create adaptable user models Foundation for Autonomous Agents and Multiagent for behavior support agents, HHAI 2024: HYBRID Systems, 2023, p. 717–726. HUMAN AI SYSTEMS FOR THE SOCIAL GOOD [3] M. B. van Riemsdijk, C. M. Jonker, V. Lesser, Cre- (2024) 350. ating socially adaptive electronic partners: Inter- [12] R. Reiter, A logic for default reasoning, Artifi- action, reasoning and ethical challenges, in: Pro- cial Intelligence 13 (1980) 81–132. doi:https://doi. ceedings of the 2015 International Conference on org/10.1016/0004- 3702(80)90014- 4 , special Is- Autonomous Agents and Multiagent Systems, AA- sue on Non-Monotonic Logic. MAS ’15, International Foundation for Autonomous [13] J. P. Delgrande, T. Schaub, Expressing pref- Agents and Multiagent Systems, Richland, SC, 2015, erences in default logic, Artificial Intelligence p. 1201–1206. 123 (2000) 41–87. doi:https://doi.org/10.1016/ [4] Z. Akata, D. Balliet, M. de Rijke, F. Dignum, S0004- 3702(00)00049- 7 . V. Dignum, G. Eiben, A. Fokkens, D. Grossi, K. Hin- [14] C. H. Papadimitriou, M. Sideri, Default theories that driks, H. Hoos, H. Hung, C. Jonker, C. Monz, always have extensions, Artificial Intelligence 69 M. Neerincx, F. Oliehoek, H. Prakken, S. Schlobach, (1994) 347–357. doi:https://doi.org/10.1016/ 0004- 3702(94)90087- 6 . [15] M.-A. Williams, Iterated theory base change: A computational model., Proceedings of the Four- teenth International Joint Conference on Artificial Intelligence (1995) 1541–1549. [16] C. E. Alchourrón, P. Gärdenfors, D. Makinson, On the logic of theory change: Partial meet contraction and revision functions, The Journal of Symbolic Logic 50 (1985) 510–530. [17] T. I. Aravanis, P. Peppas, Belief revision in answer set programming, in: Proceedings of the 21st Pan- Hellenic Conference on Informatics, PCI ’17, Asso- ciation for Computing Machinery, New York, NY, USA, 2017. doi:10.1145/3139367.3139387 . [18] P. Krümpelmann, G. Kern-Isberner, Belief base change operations for answer set programming, in: L. F. del Cerro, A. Herzig, J. Mengin (Eds.), Logics in Artificial Intelligence, Springer Berlin Heidelberg, Berlin, Heidelberg, 2012, pp. 294–306. [19] S. Pandžić, On the dynamics of structured ar- gumentation: Modeling changes in default justi- fication logic, Lecture Notes in Computer Sci- ence (including subseries Lecture Notes in Arti- ficial Intelligence and Lecture Notes in Bioinfor- matics) 12012 LNCS (2020) 222 – 241. doi:10.1007/ 978- 3- 030- 39951- 1_14 .