Abstract
An intelligent system intended to provide assistance to an elderly user in their home is presented. This multi-agent system is designed to monitor the interaction between the user and other agents, and regulate itself based on the estimated level of mental engagement of the user in order to contribute to help them maintain adequate levels of awareness and interaction with their home environment. The agents are devices programmed to preserve the security, comfort and health of the user, who is also conceptualized as one of the agents in the system. The user engagement level is estimated through fuzzy inference, that is, by means of a set of fuzzy membership functions and rules applied over the interaction of the user with different categories of agents. The system incorporates several dozen agents and is tested using two different datasets of real interactions between users and devices in their home environments. A uniform parameter configuration yielded very positive results for diverse scenarios and subsequently the parameters of the system were automatically optimized to show that improved performance, in the form of a more efficient system regulation and increased certainty in adjustment estimation, is obtained.
Introduction
Through the sharing of knowledge and technology, modern-day societies have achieved stable rates of development, leading to improved quality of life, including more security, better medicine and health services, more comfort, etc. With increasingly better living conditions, life expectancy has also increased over time, and consequently, today the world faces ageing populations that pose a number of needs which were not as prominent in past decades. Furthermore, family structures have also changed over time, with increasing numbers of young and middle-aged adults living on their own, supporting mono-parental families, maintaining high inter-city mobility and showing, in general, more independence from their parents than previous generations. All of this coupled with the ever-increasing time-consuming aspects of modern life, such as work, raising children, education, and leisure, causes a large imbalance between the elder population requiring special care and the proportion of the younger population with the availability and resources required to take care of their elder relatives.
Unfortunately, the scenario described above implies that a significant proportion of the elder population, including those that may require continuous care, is forced to live on their own. Besides the obvious risks connected with such a situation, there is also evidence supporting the association between isolation (a measurable lack of social relationships)/loneliness (perceived social isolation) and poor mental health [12]. In particular, living in isolation is linked to highly prevalent mental disorders in the elderly population, such as anxiety and depression [51], as well as to some degrees of cognitive impairment and dementia [5,50]. In turn, said disorders, as well as isolation itself in older adults, negatively affect their health, including all-cause mortality [34,39,47].
On the positive side, some of the negative effects of isolation, particularly on mental health conditions, can be avoided to some degree with relative ease by means of all forms of social support (pecuniary, emotional, functional, structural) [14] as well as support-group activities, including animal-assisted activities [21,31]. A key concept encountered throughout all these preventive and therapeutic activities is the need to maintain an active mental engagement of the subject.
At times or circumstances for which a support group or animal companion may not be available or accessible to senior citizens living on their own, modern-day technologies, particularly intelligent systems deployed in the form of mobile applications [22], smart-home technology and ad-hoc systems, offer a range of potential solutions designed to assist the user in their day-to-day activities, as well as to alleviate the risks and negative health-effects of isolation. The range of technology solutions available is very wide. For instance, there are projects ranging from monitoring physical activity to “happy aging” through home automation systems. Home automation endeavors to provide a response to the requirements of today’s way of life through multifunctional and flexible home designs [7,18], including energy efficiency [6], information processing and management [19,35,36,38], etc. The designs emphasize the use of artificial intelligence [13,37], sensor networks and multiple information acquisition techniques [23,29,49,54,55].
Some of the systems are specifically designed for elder care and people with physical disabilities [1,8,16,17,46]. However, these systems generally involve large amounts of information processing and centralized implementation schemes [15]. Additionally, recent studies show that while there is significant interest in applications focused on improving cognitive functioning and treat mental illness, one of the main reasons not to adopt said technologies is a concern about data privacy [22]. This suggests that there exists an opportunity to develop intelligent systems able to simultaneously provide assistance to the users in everyday tasks as well as to help them improve or maintain cognitive functioning, but without requiring to process large amounts of information, particularly, sensitive data.
In this work, the focus is on systems that follow an agent-based approach, particularly, multi-agent systems [44]. This approach is highly popular because agents allow one to model and simulate complex systems with relative ease. A multi-agent system designed to provide assistance to an elderly user in their home is described. The agents in this Intelligent Assistance System (IAS) can monitor the user behavior and regulate accordingly, with the overall goal of contributing to help them maintain adequate levels of mental engagement; this topic is discussed in detail in Section 2.
The rest of this paper is organized in five sections: background concepts and related work are reviewed in Section 2; the development of our system (including a practical example of the required computations) is described in Section 3; our simulation methodology to evaluate the standard system and an optimized version is presented in Section 4; the results of such simulations, accompanied by the corresponding discussion, are reported in Section 5; finally, our conclusions and possibilities for future work are offered in Section 6.
Background and related work
A review of the basic theoretical concepts and of relevant related works in the recent literature is provided in this section. Because of its central importance for the proposed system, the concepts of user engagement and user perception of the system are discussed in Section 2.3.
Background concepts
Smart agents A unit that either in hardware or software can work independently of others is considered an agent. Agents are developed to target individual objectives that contribute towards a global objective, and their behavior is adjusted according to the objectives and the behavior of other agents. Intelligent agents possess some important features that characterize them: each agent is able to understand its own situation and adapt to changing environments through self-reconfiguration. The perception of said situation is achieved through learning and contextual modeling of event data. A set of contextual bases is learned from high-dimensional event data, so that the grouped contextual coefficients can represent different scenarios. Each agent has a behavior state machine and a behavior library, so that they can choose the tasks they should carry out depending on the identified scenarios.
Another important concept is that of the autonomy of an agent. Intelligent agents should possess some degree of autonomy with respect to other agents and to a central control unit. The autonomy level can be adjusted. Mostafa et al. [27] presented a general framework for formulating adjustable autonomy of multi-agent systems based on fuzzy logic.
Fuzzy logic control A Fuzzy Logic Controller can be understood as a mapping from a set of multi-dimensional inputs usually provided as qualitative or linguistic information, into control outputs that are precise enough to guide the behavior of different devices [11]. This process is usually achieved by defining a set of membership functions that capture the designer’s understanding of the system (or that can be learnt by the system itself through machine learning algorithms), and a set of fuzzy rules that perform the actual mapping between the inputs and control signals. In our current application, this method can be employed to convert the system’s goals and environment information into a set of beliefs (understanding of the environment), desires (individual goals) and intentions (a set of actions to be carried out) for each agent.
Physical implementation and communications protocol Regarding the physical implementation of a multi-agent system for elderly care, many of these are realized as smart homes and environments with dedicated sensor/actuator networks. Another popular alternative are the so-called virtual assistants and assistive devices, that differ from the smart homes in the extent and way in which the agents (including sensors and actuators) are deployed and interconnected to form the system, for instance, through the use of the Internet of Things (IoT) scheme as the communications protocol [28].
Due to some advantages (such as economy of the implementation, complexity, goals of the system, etc.) the IAS in this work is developed as an IoT system that offers great flexibility to add and remove agents to scale up or down the system without much difficulty. A previous and much smaller version of this system includes a customized device in the form of a pill dispenser to monitor and automate the administration of drugs to the user and a few other agents [24]. A complete description of the proposed assistance system is presented in the following section.
Related work
In the recent literature, there exist numerous proposals of intelligent systems designed to assist and provide users with increased comfort, security and healthcare. Many of those describe complex inhabited environments and homes [40,43]. Additionally, smart monitoring and platforms for elderly health care play a crucial role in nowadays needs, especially those based on wearables devices [3], and using IoT and mobile technologies [2,9,32,33,42,45,52].
Numerous IoT-based systems focus on providing support for ailments related to old age, particularly Alzheimer’s and Parkinson’s diseases, dementia, cardio vascular disease, frailty and falls; a recent review where the solutions are categorized by health focus, IoT technologies, aims, etc. is found in [45].
Several of such systems employ wearable devices and biometric sensors. For instance, Yacchirema et al. [52] described an IoT-based fall detection system that includes a wearable device with an embedded accelerometer whose readings are processed by a Big Data analyzer; their system achieved results above 90% accuracy, precision and recall. Another recent example is the work of Saraubon et al. [42] of a smart system using IoT and mobile technologies for fall detection; the authors compared one microphone-based approach against one accelerometer-based approach in terms of accuracy, precision and recall, and reported that, on average, the latter obtained about 15% better results than the first. This type of systems could prevent situations that can cause impairment for elderly people, such as falls that are not attended promptly. The system proposed in this paper is different in that it does not attempt to detect such situations; instead, our system is aimed at maintaining the user’s healthy mental state.
Other intelligent systems, under the category of smart homes, have been designed to provide support to people that already suffer from some degree of reduced autonomy. For instance, Brenon et al. [4] presented an adaptive decision making system based on deep reinforcement learning that employs a convolutional neural network to extract context from a graphical representation of the environment state, so that the system can decide the appropriate action to take (among 33 possible actions) in response to a user’s voice command; when validated on real data, the system obtained promising results (F-score = 0.675). A recent survey of support systems for the elderly in their home environment is found in [3]. Our system is not described as a smart home because it does not consider important features that typically characterize these, such as remote control, automation, and activity recognition. Instead, our system is described as an intelligent Assistant System, which can exhibit similar features than those of a smart home, but in limited scale and scope, as discussed below.
User’s perception and engagement toward the system
In a recent study, Curumsing et al. [9] discussed the emotion-oriented requirements involved in developing a smart home system for the elderly, and presented the SofiHub smart home platform for elderly people. Because of the similar goals and features, their study is very relevant to our current proposal and it serves as a reference for our system’s design w.r.t. the user emotional expectations and how these can affect their engagement toward the system.
First, it should be specified that the term emotional expectation is not equivalent to emotion. An emotion is an instinctive basic feeling, such as fear, surprise, anger, disgust, etc. produced by a singular event, while emotional expectation is understood as the equally subjective but more complex way in which a user perceives or interprets their overall interaction with a system over time [25]. For instance, Curumsing et al. state that some user emotional expectations for a smart home system could be “feeling cared for”, “feeling connected” and “feeling independent”, and they incorporate these emotional expectations into their process of software engineering for the SofiHub system. In our case, the emotional expectation that our IAS attempts to achieve is “reduced loneliness” (because, as stated before, loneliness and isolation can have significant negative effects on health [20]). In fact, it was found that although SofiHub did not consider the emotional goal of alleviating loneliness, users of that system reported the perception of being accompanied by “somebody/someone” in their homes [9].
Secondly, it should be noted that inasmuch as it is crucial to fulfill positive emotional expectations, it is also essential (perhaps even more) to avoid negative emotional expectations, which users tend to express more readily in their requirements for a smart system. Some negative emotional expectations to be avoided are “feeling monitored”, “feeling dependent”, and “feeling controlled”. Older adults can also be more distrustful and afraid of modern technology than younger people, so the design of a smart system for the elderly should consider making the devices and user interfaces as simple and familiar-looking as possible to this generational cohort (cf. the design of our pill dispenser in Section 3.1).
The criteria discussed in this subsection establish several guidelines for the design of our IAS. It should be non-intrusive and provide the user with the emotional expectation of living independently while simultaneously reducing the feeling of loneliness. According to Curumsing et al. these system dependent emotional goals can be achieved by a smart system with a minimal amount of interaction; e.g., their SofiHub smart home system emits only two sets of messages, “namely, the morning messages and the medication reminders” [9]. Although we follow the same minimalist approach, our proposed system is also adaptive to the engagement level of the user (engagement is measured by the amount of user/system interactions) so we supply our IAS with some degree of adaptability by modelling the agents in the system as possessing a diversity of simple behaviors that can be adjusted to the engagement level of a user; this is detailed in Section 3. Notice that the type of interactions, amount and nature of notifications, as well as the user data collected by a system depends on its goals. An alarm system for automated detection of falls requires no interaction, except on the event of a detected fall, while other systems, like behavioral coaches and chatbots, employ frequent notifications to engage with their users and promote behavioral changes (for more about the role of emotions on software development, see [10]). Our IAS has been envisioned as an assistant for an elder user that leads a quiet life, to the point that they may suffer loneliness and isolation. It is not intended for users that suffer dementia or other mental illness, and it is not intended to manage the user’s daily activities. Rather, the proposed IAS may be closer to a virtual pet that provides a limited amount of companionship via simple interactions, remainders and alerts (such interactions and their effects are reviewed in [20]).
Finally, it is important to point out that some of the concepts discussed in this subsection, such as emotional expectation, or system dependent emotional goals, have not yet been adopted by the smart systems community at large. Similarly, the concept of user mental engagement may be the subject of interpretation. While user engagement usually emphasizes a state in which a person is captivated and motivated to use technologies or products (such as computer games or consumer electronics), in this work it refers to how the user behaves, mainly in response to the system’s stimuli.
At the current stage of development, we report the results of system simulations in which we have predefined the adequate levels of engagement (captured in the fuzzy membership functions in Section 3.2), and we calculate user mental engagement based on the user interactions with other agents in the system. In future iterations, user engagement can be evaluated by other means (e.g. validated scales, ad-hoc analysis of activities, self-reporting, etc. [20]), allowing us to tailor the system parameters to such purpose-specific data. These topics are revisited in the conclusions section.
System development
This section is organized in two subsections. The first one describes the platform development, which includes the way in which the elements of the IAS are conceived and organized, the physical implementation, communications protocol and the particular intention for each category of agents in the system. The second subsection is the main part of this work, wherein the software development is described in detail, including the procedure for the regulation of the system based on fuzzy logic.
The main objective of the intelligent assistant system is to supply the user with improved living conditions, regarding to the way in which some daily activities are carried out in their home. In doing so, the different agents that compose the system must consider and prioritize aspects of a person’s wellbeing, including their physical security, their health and comfort. Clearly, there are many situations in which either one of those aspects should take precedence over the rest, and because of this, each agent in the system is assigned one of such aspects as a priority. Thus, while an agent associated to, say a pill dispenser, is intended to help the user with their medication and its priority is the health of the user, the rest of the agents have other priorities (such as security or comfort), as described next.
Platform development
In a preliminary version [24] a very small number of agents were considered, with wireless sensors to monitor and register the interaction of the user with the IAS. In this work the design of the IAS has been significantly extended to include as many agents as may be possible to have in a domestic environment. Our IAS is tested with two sets of data from several dozens of sensors (see Section 4). Said agents are assigned a level of autonomy, which define the degree and type of interaction that the agents are expected to maintain with the user. Three categories of agents are defined:
The IAS is conceived to be as non-intrusive as possible, so the interaction with the user is designed to be carried out through the regular day-to-day use of home appliances, electronic devices, furniture, entry points, cabinets, etc. The IAS records a user’s interaction with other agents via small sensors that are embedded into the different devices in their home. In turn, the agents interact with the user by means of sound and light cues emitted by the associated devices.
Depending on the category and specific type of agent, a policy for their interaction is required. For instance, in the category of Guardian agents, a door may not open too late at night and a sound cue will remind the user to close it whenever it remains open for too long. The microwave oven may not operate continuously for more than a few minutes, etc. This behavior is designed to ensure the user’s safety.
In the semi-autonomous category of Caregiver agents, an agent can turn on/off lights automatically, after it has learned the user’s habits, but the user can also activate the lights if he/she so decides. A Caregiver agent can use light and sound cues to call the attention of the user, and all activations of the corresponding device are recorded, to be employed for regulation of the system.

The pill dispenser device (left) and its visible/audible cues (right).

Policies for the pill dispenser device if triggered by schedule entry (left) or by activation button (right).
Another example is a pill dispenser (Fig. 1) whose construction uses wood in an effort to reduce technology anxiety and increase the perceived trust of the device to older people that tend to use technology with which they are accustomed (these and other issues related to the end user perspective of IoT and smart homes for the elderly are discussed in [33]). For similar reasons, the dispenser does not include a screen, so the interaction between agent and user is limited to the pressing of a button, and sound and light cues emitted by the system. Pressing of said button activates the dispenser but only within a relatively brief window around the scheduled time for the administration of medications. Repeatedly pressing of the button is recorded as user interactions (which will be used to adjust the system’s behavior), but the pills will not be delivered every time, since doing so out of schedule would put the user’s health at risk. The visible and audible cues emitted by the device are produced by means of an LED strip and a buzzer/speaker, and these cues (also depicted in Fig. 1) depend on the user engagement level (the lower the engagement level, the more noticeable the cues).
The pill dispenser policies are depicted in Fig. 2. Starting from the listening state, there are two possible triggers for this device, each with a specific policy. The pill dispenser has been designed to handle up to 30 pills that can be delivered individually at separate times, so the first trigger is a schedule entry indicating that it is time for the user to receive their medication. While periodically emitting the specified cues, the agent waits for its push button to be activated and proceeds to deliver the corresponding pills. If the user does not activate the device within a window of a couple of minutes, the agent registers a failed attempt and repeats the cycle up to a maximum number of attempts, then sends a warning message to an external caretaker and returns to the listening state.
The second possible trigger is the activation of the push button by the user. If this occurs around a schedule entry (within an interval of, say, 30 min.1
This is a generic scenario; specific time intervals depend on treatment schedules.
Completely non-autonomous agents in the Attendant category, such as those associated with a cabinet or a sink faucet, will generally accept frequent proactive interaction from the user and will not call his/her attention otherwise.
All (attempted) activations of a device are recorded to compute the mental engagement level of the user w.r.t. their environment from the perspective of the IAS. Excessive interaction (engagement) may indicate that the user is suffering some form of anxiety and could also damage the device or produce a malfunction. The amount of interaction that is considered as excessive depends on the category of the agent; details are found in Section 3.2. Communication between agents is carried out wirelessly through an IoT scheme implemented via Raspberry Pi-3 single board computers, as discussed in [24].
A general overview of our multi-agent assistance system is provided in Fig. 3. The main operating cycle is as follows: (1) The user interacts with the agents. (2) These interaction data is collected for the duration of one day and mapped by means of fuzzy membership functions into estimates of the user’s mental engagement with respect to each category of agents. (3) User overall engagement is computed and input into a Rule Base to determine the necessary regulation for the system. (4) The required adjustment of system parameters is obtained through defuzzification. (5) Parameter adjustments modify the behavior of the agents, which means that some of them will become more/less engaging to the user.

Overview of our multi-agent assistance system.

Pseudocode of the main cycle of our system, used to obtain the results in Section 5.
Agent properties: probabilities and levels
The main operating cycle described above is captured in the pseudocode in Algorithm 1. The behavior of each agent in the system is probabilistically modeled using the agent properties listed in Table 1. The initial probabilities depend on the particular scenario employed in a simulation, which is related to a user level of mental engagement w.r.t. their environment. Our experimental methodology is described in Section 4.
During a particular simulation, representing one day in the life of the user, each of the agents is invoked (line 5 in Algorithm 1) a number of times (for instance, the agent related to a pill dispenser may be activated twice or thrice per day, depending on the frequency with which a user should receive their medication). When invoked, an agent will activate the corresponding device to call the attention of the user, and then the user may react to that stimulus. Furthermore, during the day, the user may proactively activate a particular device. The set of agents included in the environment (a user’s residence), and the sequence in which the user activates each of those agents are contained in two datasets which collect the interactions of two different users in two real environments separately [30]. Details are provided in Section 4 where the experimental setup is described.

Membership function w.r.t. Guardian (autonomous) agents.

Membership function w.r.t. Caregiver (semi-autonomous) agents.

Membership function w.r.t. Attendant (non-autonomous) agents.
All of the user interactions with the different agents are recorded into two separate vectors
The fuzzy membership functions w.r.t. different types of agents: Guardian (autonomous), Caregiver (semi-autonomous) and Attendant (non-autonomous), are shown in Fig. 4 to Fig. 6, respectively. The vertical lines (labelled
Following a Multi-criteria Decision Making approach [41,48], a global engagement level of the user is computed using the engagement levels w.r.t. each of the different types of agents in the system:
The vector
By application of (2) we obtain vector
IF
adjust
adjust
adjust
adjust
ELSE IF
keep current settings for all properties
ELSE IF
adjust
adjust
adjust
adjust
The objective of the regulation rules is to model how the system may induce a change of the user’s engagement with respect to their environment. Specifically, the change in the semi-autonomous agents’ autonomy level property translates into a change in the agents’ behavior: increasing the autonomy level causes the agent’s interface to be more stimulating, and the agents may emit more cues to stimulate the user’s mental engagement; decreasing the autonomy level has the opposite effect. The degree to which the system is assumed to affect the user’s mental engagement is modeled through the factors in
This concludes the description of our system’s description of the cycle for one day in the life of the user. Naturally, observable effects are only expected to occur through a period of several days. For this reason, a period of 30 days is simulated, constituting a trial run. Full details and results of these simulations are described in Sections 4 and 5, respectively.
To illustrate the procedure carried out by the system, assume that we want to simulate the scenario of a user with adequate engagement, so we have the probability of proactive interaction,
Following the steps indicated in Algorithm 1, lines 5 to 12, we generate a table for reactive interaction and one for proactive interaction, in the following ways (please refer to Table 2). For reactive interaction (see the left side of Table 2) the first device/agent in
Example of user’s reactive (left) and proactive (right) interactions with other agents during one day
Example of user’s reactive (left) and proactive (right) interactions with other agents during one day
The procedure to simulate the proactive interaction (right side of Table 2) is as follows. First we need to decide, with probability
The information in the tables of reactive and proactive interactions can be summarized by vectors
Next, according to line 14 in Algorithm 1 we combine
Next, according to line 16 in Algorithm 1, we obtain the global engagement
Three sets of experiments were carried out to test the IAS described in the previous sections. The first set of experiments is used to evaluate the performance of the system using a vector
An illustrative sample of user activity data, corresponding to a period of 24 hours in Dataset-1, is shown in Fig. 7. The rows list different sensors; e.g., the first row corresponds to sensor number 101: “Bathroom Light Switch”. The recorded activations are plotted using different colors to group sensors located in the same room, against the time of the day for which activity was detected (horizontal axis at the bottom of Fig. 7). There are data for 75 individual sensors in Dataset-1, which belong to 28 different types (for instance, although the first and last rows in Fig. 7 list two individual sensors, both belong to the same type: “Light switch”). Similarly, there are data for 70 individual sensors in Dataset-2, belonging to 20 different types. The datasets are independent of each other, since these record the activities of two users in different home environments (Fig. 8) [30]. In this work, Dataset-1 was employed in the initial tuning of the IAS, while Dataset-2 was reserved to perform tests with the tuned IAS.

Sample of user activity data corresponding to a period of 24 hours in Dataset-1 [30].
Three main scenarios are considered in this work to perform simulations: poor-engagement (small probabilities that the user will proactively or reactively interact with an agent); adequate-engagement (probabilities in the medium range); and excessive-engagement (large probabilities). The objective of the simulation is to define three very distinct operational points corresponding to the three user-engagement levels considered in our system. Said operational points should each be located within one third of the range
Notice that (a) these values were chosen to show the most illustrative and distinct behaviors of our system in these simulations; (b) the initial values are not an integral component of our system, since in a real-case scenario the engagement level would be computed based on user interaction with the system; (c) to test the robustness of the system to the initial points, these values were not fixed, but sampled from Gaussian distributions centered on the values in Table 1 with std. deviation set to 0.05 in all cases, as shown in Fig. 9 and clamped within

Floor plans of the homes employed for activity data acquisition; home of subject 1 (top) and home of subject 2 (bottom); 3D renderings based on floorplans in [30].
The first set of experiments considers a vector

Probability distributions used to model the user initial interaction level.
The performance of our IAS crucially depends on the correct estimation of a user’s engagement level for the day,
In order to test the robustness of our IAS against erroneous or corrupted estimates of the user engagement (but considering that user data must remain unaltered), noise was added directly to the estimated engagement values in the form of a sinusoidal wave of fixed amplitude for the whole duration of a simulation run (of 30 days).
Optimizing the weights
In the third set of experiments, the elements of the weight vector
The theoretical global optimum solution
Results and discussion
Evaluation using uniform weight
The results (average values and half the standard deviation over the 50 runs) are shown in Fig. 10. The top row corresponds to the trials carried out using Dataset-1. These trials were used to adjust the mean values of the probability distributions from which the user initial interaction levels were sampled. The values for the Adequate user engagement scenario (second column) were set slightly lower than the optimal values as a way to induce the system into performing adjustments large enough to be perceptible in plots. Numerically, the objective of the system is to drive the user engagement level as close to the ideal value, and to maintain it so for as long as possible. From examination of the plots in Fig. 10 it can be concluded that said objective is achieved in an efficient manner.

Simulation results on the training dataset (top row) and the test dataset (bottom row).
In the Poor user-engagement scenario, after one day of operating with a user engagement level of 1, the IAS performs the necessary adjustment, which is to increase the level of the agents, causing these to be more stimulating to the user. This adjustment has the desired effect on the user engagement, which starts to move up until it eventually (after about 15 days), gets quite close to the desired level of 2. In the Excessive user-engagement scenario a similar behavior can be observed, except that the adjustment performed by the IAS consists in reducing the level of the agents so that these become less stimulating to the user. The desired effect is quicker for this scenario, although slightly more unstable, as shown by the more noticeable oscillations in the corresponding plot. In the Adequate user-engagement scenario, the IAS only requires to perform small adjustments, since the user-engagement level is already at the desired value. However, it can be observed that as time moves forward the performed adjustments appear to be slightly larger.
The bottom row of Fig. 10 shows the results of the trials performed using Dataset-2 (the test dataset). Although there is a slight decrease in performance compared with the results on Dataset-1, this second set of results show that the system performs correctly on data for which it has not been tuned. To precisely quantify the performance of the IAS, the mean squared error (MSE) between the user engagement level and the ideal level is reported in Table 3; also included are results of the third set of tests, reported in Section 5.3.
Results of the system (with uniform and optimized weights) on two datasets of user activity
For these simulations, noise in the form of sine waves with amplitude values: 0.8, 0.7, 0.6, 0.5 and 0.4 were used to run 50 trials for each scenario. The corresponding MSE between the system outputs and the ideal engagement level is reported in Table 4. Illustrative results are shown in Fig. 11 organized in columns for different amplitudes of the sinusoidal noise. All of these plots were obtained using Dataset-2 (the teste dataset), and for compactness, only the plots for amplitudes 0.8, 0.6 and 0.4 are shown (the amplitude is recorded in the bottom-right corner of each plot). It should be noticed that a sine wave of amplitude 0.8 represents an extremely high level of noise for this system, while the wave of amplitude 0.4 represents a moderate level, but still quite significant.
Quantitative evaluation results of the system with added noise of different amplitudes
Quantitative evaluation results of the system with added noise of different amplitudes
The plots on the left column of Fig. 11 clearly show the extensive perturbation that the system exhibits as a consequence of the added noise of amplitude 0.8; the effect is so great that the curve of the
The MSE values recorded in Table 4 provide more information regarding these experiments. These data show how the error gradually decreases in proportion to the amplitude of the noise added, until for a noise amplitude around 0.5 or 0.4, the MSE values become essentially equivalent to those in Table 3.

Results on Dataset-2 with sinusoidal noise (superimposed on the plots) added to the User Engagement level.
The results of the third set of experiments are shown in Fig. 12. The solution found by the BA is
Examining the results of the trials performed using Dataset-1, for the Poor- and the Excessive-user-engagement scenarios, after the first day the IAS performs one significant adjustment and then the level of agents remains constant for the rest of the simulation. The user engagement level gradually and steadily increases/decreases, respectively, in an asymptotic fashion towards the desired value.
In the case of the Adequate user-engagement scenario, there is an unexpected and undesired behavior at the beginning of the simulations, when the system performs an unnecessary adjustment, causing the user engagement to deviate from the ideal level. Fortunately, this effect is transitory, and the user engagement curve soon adopts the desirable tendency.
Recall that Dataset-1 was available to the BA for the optimization of the weight vector and thus the results on this dataset (reported for completeness), are optimistically biased. However, the behavior described above is also observed for the trials performed with Dataset-2, which is an independent dataset, not used in the optimization of
The MSE computed over the results of the system with optimized

Simulation results on the training dataset (top) and the test dataset (bottom) with optimized parameters.
Finally, it is important to examine the plots for the Rank value of
A multi-agent assistance system, or IAS, for elderly care has been described which combines two novel ideas: the use of agents with adjustable autonomy that prioritize different aspects of the user wellbeing (from highest to lowest autonomy: the Guardian agents that prioritize user safety, Caregiver agents that prioritize user health, and Assistant agents that prioritize user comfort), and the monitoring of user interaction, used as a proxy for the user mental engagement with respect to his/her environment, which is an important indicative of the user emotional wellbeing in older adults.
The different agents are associated with electronic devices, home appliances, furniture, entry points, and other things in a user’s home. The IAS uses fuzzy rules and probabilistically models the user’s behavior. Two datasets of real user activity within their homes were used to validate, calibrate and evaluate the performance of the IAS. It was shown that this system performs the required adjustments correctly and also that it is tolerant to possible perturbations that may appear in the estimated user engagement levels over time. Furthermore, a set of important parameters contained in a vector of weights (relative importance of each category of agents), was optimized and compared against the use of uniform weights. The optimized parameters improved the overall behavior of the system and increased the certainty with which the IAS determines the required adjustments.
Although compared to our earlier work there are many elements of the IAS that have been improved, there still remain several aspects that require further study. A very recent review of technology aimed at alleviating loneliness and social isolation in older adults identify the capability to interact with the user as a common feature of the technology solutions that report some success in said task. However, the same study cautions about the evidence presented by the reviewed studies, which acknowledge lack of control groups and the need for larger sample sizes to support generalization and validate interpretation of results [20]. Indeed, we agree with the appreciation that realistically obtaining larger samples and control groups, and adding confounding factors to the study designs, represent significant challenges, due in part to general health conditions of older adults and to the scarcity of voluntary participants that would adhere to the conditions and duration of propounded studies. Nevertheless, motivated by the promising results obtained by our simulations, our endeavor is to bridge the gap between modelled system and empirical results. As some works in the literature foresee, technology solutions based on machine learning and artificial intelligence techniques can fulfill one of the needs that modern lifestyle has created in our societies, which is elderly care. As global populations grow older, this demand will become ever more urgent and of higher importance. For this reason, the described system will continue to be improved in future work, aided by novel and relevant works that are currently being published.
Footnotes
Acknowledgement
This work was partially supported by the National Council of Science and Technology of Mexico (CONACYT) through research grant C
Conflict of interest
None to report.
