Gamification , Social Networks and Sustainable Environments

Intelligent environments and ambient intelligence enabled systems provide means to gather rich information from both environments and its users. With the help of such systems, it is possible to foster communities of ambient intelligence systems with community driven knowledge, which is created by individual actions and setups in each of the environments. Such arrangements provides the potential to build systems that promote better practices and more efficient and sustainable environments by promoting the community best examples and engaging users to adopt and develop proactive behaviors to improve their standings in the community. This work aims to use knowledge from communities of intelligent environments to their own benefit. The approach presented in this work uses information from different environments, ranking them according to their sustainability assessment. Recommendations are then computed using similarity and clustering functions ranking users and environments, updating their previous records and launching new recommendations in the process. Gamification concepts are used in order to keep users motivation and engage them actively to produce better results in terms of sustainability.


I. INTRODUCTION
ustainability is a multi-disciplinary area based in fields such as economy, environment and sociology. These fields of research are interconnected, but humans have different psychological approaches to them. Thus, is necessary to perceive the behaviors behind each multi-disciplinary area. A computational platform to support and promote a sustainable environment, together with an approach to the energetic and economic problems, must take the decisions as smoothly as possible so as not to cause discomfort to the user. This topic triggered several psychological researches [1], [2] and a common conclusion indicates that humans are not always conscious about their behavior [3]. This field, called psychology of sustainable behavior, despite focusing on measurement and understanding the causes of unsustainable behavior, it also tries to guide and supply clues to behavior change. Manning [4], shows some aspects that are necessary to consider promoting and instilling in people sustainable behaviors:  All behavior is situational, i.e., when the situation or event changes, the behavior changes; even if exists intention to perform a certain behavior, circumstances can make it change;  There is no unique solution, i.e, people are all different because they have different personalities, living in a specific culture, with distinct individual history;  Fewer barriers leads to a great effect, i.e., when a person is facing social, physical and psychological obstacles, his attitude tends to flinch; for instance, the lack of knowledge about a procedure leads to a retreat;  There is no single approach to make an action attempting achievement of sustainability; there are many sustainable possible options that a person can choose.
To overcome these barriers to sustainability, it is suggested the engagement of multiple users in a competitive environment of positive behaviors so that participants have the need to strengthen their knowledge of sustainable actions.
Energy efficiency, which represents optimal use of energy to satisfy the objectives and needs from users, environments and interactions between them, is also an important topic to sustainable environments, although not the only one. According to Herring studies [6], over the last 25 years, the increase in the efficiency of domestic appliances has been nullified by the increase of the use of energy consumption devices. Initial results from energy efficiency policies state that small changes in habits can save up to 10% in home energy consumption [7]. On the other hand, sustainability represents the assurance that environments, users and interaction between them can be endured and, as a consequence, the future replication of the current patterns is not compromised. Both concepts, sustainability and energy efficiency, are not opposed to the use of energy, but they do remind people to be effective on how resources are used and the fact that sustainability concerns the viability of current actions in the present and in the future.

A. Computational Approach to Sustainability
Currently, different approaches to measure and assess sustainability are addressed in the literature. Some focus on an economic perspective while others emphasize environmental or social perspectives [8]. On a computer science perspective, although not being able to directly solve the sustainability problem, it can plan and develop solutions to measure and assess sustainability automatically from an environment. This is not due without obtaining information about the environment and its users. The scientific research field of Ambient Intelligence provides a wide spectrum of methodologies to obtain such information in a non-intrusive manner.
The types of sensors used in the environment may be divided into categories to better explain their purpose. Generally, an ambient might be divided by sensors and actuators. Sensors monitor the environment and gather data useful for cognitive and reasoning processes [9]. Actuators take action upon the environment, performing actions such as controlling the temperature, the lightning or other appliances. In terms of sensorization, environment sensors can be divided into sensor that monitor environment or sensor that monitor the user and its activities. This division of sensor classes can also be presented in a different form, taking into consideration the role of the sensor in the environment [10]. In this aspect, sensors might be divided into embedded sensors are installed on objects, context sensors provide information about the environment, or motion sensors.
Envisioning the potentials from computational systems to promote and guarantee sustainability requires all types of sensor classes, as present in some initial project that perform real-time sustainability and energy management [11], [12].

B. Sustainable Indicators
Sustainability is a multidisciplinary concept related with the ability to maintain support and endure something at a certain rate or level [13]. The United Nations have defined this concept as meeting the needs of the present without compromising future generation to meet their own needs.
Due to the importance of sustainability different author have defined measures to assess and characterize sustainability. A popular consensus is based on 3 different indicators used to measure the sustainability of a given environment [13]. This approach is based on three different types of indicators, social, economic and environmental with the specific restriction that until all those values are met a system cannot be deemed sustainable. From this perspective sustainability concerns a delicate equilibrium between different indicators which action to optimize one indicator might affect the other two.
The presence of indicators to assess sustainability is an established practice [14], [15], however it does not give any information on how to guarantee or plan sustainability. In fact, indicators only inform about the current status of a system. Common problems with this practice are enumerated in the literature, [15]. The definition of global sustainable indicators, as a means to compare environments, is difficult since environments have different characteristics. Selection and formal definition of indicators is, also, a matter of concern as it has to be agreed by all participants and must have a series of properties, in which the indicators express their relevance. Some authors approach this problem characterizing these properties as dimensions, where some indicators are more important in some dimensions than in others, while monitoring the same object. One other problem is the definition of measuring units and metadata. If not defined accordingly, it may be impossible to compare indicators of the same type. Measuring data makes it possible to obtain an indicator which might have a range of optimal values and a range of nonoptimal values.
The use of indicators for sustainability assessment is a common practice across many researchers. Nevertheless, the definition of a sustainable indicator is sometimes difficult and it may differ from environment to environment. In intelligent buildings, there are proposals to build Key Performance Indicators (KPIs) to monitor sustainability and act as sustainable indicators [11]. It has also been identified that indicators are useful at pointing unsustainable practices but not so accurate nor useful to define and guarantee sustainability [16]. Frameworks to evaluate energy efficiency through sustainability in the literature use similar approaches. The goal of energy efficiency was obtained optimizing sustainable indicators which monitor a set of specific energy sources [15]. Industrial environments are also object of energy efficiency projects. In Heilala et al. [11], an industrial AmI is proposed to optimize energy consumption. The main technique used by the AmI system is based on case based reasoning, comparing the data gathered and processed in the AmI with EUP values to assess and diagnose possible inappropriate energy usages. An intelligent decision support model for the identification of intervention needs and further evaluation of energy saving measures in a building is proposed Doukas et al. [7]. The demonstrated concept shows that it is possible to have an intelligent model to perform energy management on a building, combining aspects like ambient climate conditions, investment rates, fuel, and carbon prices, and, also, past experiences.

C. Gamification and Information Diffusion
The current and more consensual definition, and one with which we agree and chose to follow, is "the use of game design elements in non-game contexts" [17]. While the concept is recent, the idea from which it is based is not. The notion that the design of the user interface can be built by other design practices has some tradition in HCI (Human-Computer Interaction); during the first peak in the development of computer games, in the early 80s, some authors [18], [19] analyzed game designs in order to create more interesting and pleasing visual interfaces. The interest in gamification is due to its influence to change people behavior through gamification elements. There are already many studies in regard to gamification, where people use IT to change the behavior of the systems in order to make them more efficient. Still, there is a common trait among them, they are oriented to efficient actions of a system and not to the efficient actions of the user [20]. Changing the former is determining what should be its behavior, while changing the latter means changing their habits, the behaviors that they acquired. In order to tackle this problem, two main concepts can be put in practice: Gamification and Information Diffusion.
In [21], gamification is applied in education where the authors try to take the elements from the games that lead to the engagement and apply them inside the school to the students to keep them motivated. Another example uses a framework that allows users to share their daily actions and tips, review and explore others people actions, and compete with them for the top rank by playing games and puzzles [22]. On another example authors developed a service-oriented and eventoriented architecture framework where all participants communicate via events over a message broker. This system is composed by a set of game rules that define game elements like immediate feedback, rank/levels, time pressure, team building, virtual goods and points (karma points, experience points). Completing game rule generates a reward event for the user over the message broker. There is also an analytical component that may be used to analyze user behavior in order to improve game rules and optimize long-term engagement [23].
As for the second concept, Information Diffusion, this can be applied specifically to social networks. What various studies have proven [24] [25] [26] is that social networks have the potential to diffuse information at a high rate. Besides this point, they can also influence other peers to participate by sharing content. The use of social networks, also mentioned above, has the goal of enhancing the engagement of the users to higher levels by bringing the results to public (respecting user's authorizations) and making each user responsible for his actions at the eyes of the respective network. As we can see through the examples presented, the application of gamification can raise the levels of loyalty of the users and keep them engaged in our objective by making it more enjoyable.

A. People Help Energy Savings and Sustainability
People Help Energy Savings and Sustainability (PHESS) is a project currently being developed at Intelligent Systems Laboratory at University of Minho [15], that was used to conduct preliminary studies in sustainability assessment. It concerns a multi-agent platform ( fig. 1) developed to monitor environments as well as its users and perform sustainability assessments, actions and recommendation. The platform establishes an ambient sensorization routine upon the environment, constantly updating sustainable indicators built upon raw data from environment sensors and contextual information.
In order to facilitate management and operational coordination, the system was divided into modules and subroutines, implemented as software agents acting collaboratively in a multi-agent system. There are a total of 3 modules in the PHESS system:  data gathering level, responsible for obtaining information about the environment and its user using dedicated hardware and software services available;  reasoning and contextual level, responsible to use information gathered and update machine learning model, profile users and environment, maintain indicators and perform reasoning tasks upon the information acquired in order to deliver actions plans and recommendation to users;  acting level, responsible to communicate with environment users, informing user of possible recommendations and controlling actuators in the environment according to user consent and preferences Sustainability indicators are used to translate the performance of environment and user actions into numeric values that can be used to perform rankings and assessment on recommendation created in the reasoning and contextual level. They represent the current, real time assessment of the environment taking into account historic and real time data. The aim of the platform is not only to assess and identify unsustainable practices but also act with the objective of improving sustainability indicators. For such to happen, user behavior and environment might need to be changed. However, how the change is conducted cannot be determined by sustainability indicators alone.
As a multi-agent system, in the data gathering level in the PHESS platform includes sensing agents responsible for controlling the access and delivery of ambient sensor data model and reason agents in the reason context level. Model agents are responsible to monitor changes in the environment creating models with patterns common pattern and predictors for sensor value. Moreover, model agents may also be responsible for maintaining user or environment sustainable indicators updated. Reason agents use context information to formulate hypothesis in order to create recommendation, optimize environments and behaviors. This knowledge inferred from agents is then used in acting agents in the Acting level in this platform.
The process of using indicators from different environments to create and promote recommendation was developed upon the PHESS to provide familiar recommendations backed up by members of a community. This development is part of the work described in this paper and will be detailed in section 3 with its advantages and disadvantages. Before detailing the recommendation system, an initial explanation about the sustainable indicators and sustainable assessment is necessary to understand the process of creating recommendations.

B. Sustainability Assessment
The sustainable assessment used in PHESS, uses different indicators within each dimension of the sustainability definition. This approach was also used by researchers, which used these indicators to guide strategic options and perform decisions based on the foreseeable impact of such measures [14], [15]. The indicators used in this work are devised to be directly comparable to each other regardless of units or the specificity of each indicator. These indicators represent a ratio between a positive and negative contribution to sustainability and their values are computed in the -1 to 1 range, equation 1. In order to deliberate about sustainability performance it is needed to rank solutions rewarding each solution with a sustainable score, equation 2. Indicators within each dimension of sustainability are averaged according to weights defines in each dimension. The use of ranking formulas enables the use of fitness functions and distance functions to help calculate distances from one sustainable solution to another. Such approach in explored in section 3, integrated in a case based reasoning algorithm and custom sustainable indicators used to perform a proof-of-concept analysis on the proposed algorithm.
Provided with data from the PHESS system it is possible to use such formulas to characterize environments and users according to the same indicator, as well as identify their performance accordingly. As demonstrated in table II and  table III, it is evidenced that the performance of each room in a sample environment is affected differently according to how they are used, as well as, user behavior affects their indicator values. These results were obtained using the sample indicators in table I across a sample environment for a period of 3 days. C. System analysis Although the PHESS system is able to extract information from environments and users with significance to perform assessments and recommendation tasks. It was found that the utility of the system depended on how well suggestion are followed and how user adhere to the suggestions being made. Moreover, the use of sustainable indexes is a fast way to categorize action and identify improvement needs but user stimulation to correct such problematic areas is not present. In fact, most systems do not account for the need to motivate user to take action preferring only to make assessments and suggestion to present their findings to users.
There is an opportunity to use computational methods to promote user action on the system, namely with the use of social networks and concepts of gamification. As the improvement of environments and user action is dependable on how user follows recommendations it is of significant importance to improve justification for recommendations and promote them. Over the next section a social recommendation engine is detailed as well as a gamification implementation based on the data retrieved by PHESS.

A. Social Recommendation Engine
The recommendation engine is intended to help communities of intelligent systems let users promote practices from different physical environments with high sustainability indexes to others with a recommendation engine. In order to summarize each environment, it was designed a sustainability profile, stating environment and individual room sustainability. Environment indicators are calculated from the use of aggregated individual room indicators, taking advantage of the indicator structure detailed in section 2 indicators for each dimension of sustainability.
The case based reasoning used in this situation uses a twostep process to evaluate and calculate new solutions for the user. As an initial step, the type of environment is contextualized, for instance, sustainable index, number of divisions and room indicators. A second step concerns the recommendation phase, and uses room indicators to obtain the best solution for the planning of energy use and appliance substitution.
The action flow is detailed in figure 2, where from an initial set of grouped environments a target environment can be compared to environments in higher ranked groups.  The initial grouping of environments is made using Kmeans algorithm on the sustainable index of each environment with a fixed size for number of groups. The retrieval of comparative cases is extracted with the help of similarity functions. In this case, similarity is computed using environments from higher ranked groups and an average Euclidean distance from the distance value, computed for the three sustainability indicators, in every room. This procedure is used taking in consideration the room type, as distances are only calculated for rooms of the same type. The selection of environments favors the longest similarity distance for the value of the indicators in order to help the impact of possible recommendations in the environment. Finally, the list of alternative recommendations is obtained, comparing the room types of the target environment to rooms of the same type in the selecting environment. Any differences found are matched as possible change scenarios, favoring the options taken in the selected environment.
It is useful to remember that sustainable indicators are calculated from data acquired from each environment on a timely basis. The natural consequence is that as time progresses the values of these indicators which might result in environments exchanging the group they were previously. This dynamic works for the benefit of the system as the selected cases for comparison within each group are changed each time these variations occur enticing environments users to adopt behaviors that do not lead their environment to move to lower ranked groups.

B. Gamification Implementation
In this section, the implementation of gamification elements is provided as a means to promote healthy competitions between users and their environment in terms of sustainability and energy efficiency.
Management of user standings and performance is done through web interfaces in which the user is able to monitor the gamification elements devised for him.
The following list details each Gamification element or dynamic implemented. Gamification elements implemented:  Points, awarded daily according to metrics defined in the system;  Levels, user standings according to the number  Achievements, personal objectives launched to user which grant them extra points if followed;  Leaderboards, visual demonstration of users' rankings according to each other. These elements were integrated into the developments of PHESS as a mean to promote completion between user with the general objective of increasing sustainable indicators in each environment and user action. As so, the points rewarded in the gamification side are based on the sustainable indicators retrieved by PHESS on a daily basis. Levels group player according to their experience and similar point base. Achievements for each player are based on the recommendations obtained by the social recommendation engine from which suggestions are turned into achievements. Finally leaderboards represent the list of players with their current standings. Communication with the PHESS system is made asynchronously through communication agents responsible for data synchronization. It is expected that by implementing such mechanisms user suggestion acceptance increases, and that user take continuous efforts to improve even when changes rewarding changes are not proposed through the recommendation engine but they are perceived by human intellect.

IV. RESULTS
In order to provide results from the application of each component and their benefits a controlled case study was devised. As such, 4 environments were used with the PHESS system implemented using simulation tools available in the PHESS framework. All environments were assessed using the same group of sample indicators. For the social indicator a positive value is represented by the amount of time spend inside the room whereas the negative value is represented by the time outside. Likewise for economic indicator a positive value is represented by the current budget available and the negative the total amount spent. Regarding the environmental indicator, emissions are derived from the CO 2 emission derived from electricity report for the negative value and emissions avoided as the positive value. Each case is maintained in a profile database and it is updated using the PHESS multi-agent platform. Environment appliance configuration and user behaviors simulate different configurations and user profiles simulating a heterogeneous community. The setup recreated typical environments commonly found, such as apartments with a bedroom, livingroom, kitchen, bathroom and a hall connecting all the other rooms. Inside each room, a set of appliances was also defined ranging from lights and computers to ovens and refrigerators with different consumption patterns. The consumption of appliances was defined from their active use and explicit turn on/off actions from user action simulated in the environment.

A. Recommendation Engine
In order to test the recommendation system the environments in the test scenario were divided across 3 groups using the algorithm detailed in section III. The initial step requires information about each environment, namely sustainable indexes for each environment and sustainable indicators for each room inside each environment. With information about sustainability on each environment groups was generated resulting with the first group concentrating two of four environments, and one for each of the remaining two groups. Focusing on one of the environment on group with poorer sustainable index, a comparison was made using the environment on the middle group in terms of sustainable index value. For each room possible changes were computed generating a report as defined in table 1 for the living room.
A total of six recommendations were proposed on the target environment in the living room, as seen on table 1, in the kitchen and in the bedroom areas. Using the PHESS system it was possible to assess that using recommendations on the living room alone was sufficient to improve the target environment sustainability index.
In fact, iterating the recommendation algorithm one more time it can be found that if recommendations are followed and user behavior remains equal, the environment would be selected for the middle group, thus showing improvement.
Observing the behavior of the community it is possible to assess that the recommendation system is based on the knowledge present within the community. If recommendation are always followed, (100% acceptance) the number of changes proposed converges to zero when environment setups become identical, a point where further improvisation is compromised. Depending on the rate of acceptance of the suggestions this convergence can be slower or faster as showed in figure 3.

B. Gamification
In order to test the dynamics of the gamification elements proposed, tests were simulated using the PHESS system and the gamification system. The points were calculated based on economic sustainable indicator values in the environment and user behavior.
In order to further simulate typical situation inside communities within the four environments the first two were setup with more efficient appliances than the latter two. However, through the different days of use, the first two environment neglected the recommendation proposed as achievements while the others followed them. As it can be seen in figure 4, the gamification elements favor environments were recommendations are followed but the initial efficiency is also taken into consideration as through the first days although recommendations were followed it was not enough to surpass the first two environments.

C. Improvement of sustainable indexes
Recommendation calculated can be interpreted as using knowledge created within a community to its benefit. The best cases are used as examples to lower ranked cases which provide sense of sympathy from one to another. Also, with this approach, it is not necessary to maintain a database of efficient objects like appliances or lightning. As soon as they appear in the community they tend to be selected for recommendation as part of someone's environment definition.
In order to further promote the adoption of recommendations and foster better behaviors, gamification elements are applied, which in turn, reward sustainable and efficient actions in the community of users and environment. Such rewards are heavily influenced by sustainable indicator devised in the PHESS system, and to climb leaderboards ultimately means to improve such indicators. Additionally, the implementation of recommendations rewards instantaneous points but in order to maintain the benefits such recommendation need to provide long term effects in the system after applied.
Nevertheless, the work detailed needs to catch the user's attention in order to promote its sustainable completion. As there is no safe way to do such thing our implementation is also dependent on user reaction to recommendation and gamification elements to keep improving their standings. But assurance was made to guarantee that in the better gamification results also mean better sustainable environments.

V. CONCLUSION
Ambient intelligence, social networks and gamification present an opportunity to innovate on how to guide and manage resources and human actions making them both more efficient and sustainable. Users share significant amounts of information and by taking advantage of both data gathered by sensorization platform and user input it is possible to build communities and maintain evolutionary recommendation engines that promotes sustainability. The algorithm results and theoretical background support the idea that it possible to use such strategies to drive a social community of user to optimize itself if recommendations are followed. Concepts from gamification also help stimulate competiveness between users resulting in a desire to achieve the global objective with more determination and proactively. Nevertheless, a wide practical validation of results, under a greater set of environments and a user base, is still needed to thoroughly validate findings. This should be accomplished using field tests in a community focused on increasing their sustainability. Furthermore, in order to provide data for the system engine it is needed some specific hardware in order to sense an environment current conditions. Thus, the cost of sensorization and hardware needed should be minimized in large tests as to reduce management costs.