A Gamification Engine Architecture for Enhancing Behavioral Change Support Systems

This paper presents a gamified framework designed to offer behavioural change support and treatment adherence services to people living with Dementia (PLWD), their caregivers and medical/social professionals. A flexible and scalable ICT solution architecture was proposed to support highly personalized and gamified services for all groups involved: cognitive skills training and independent living for PLWD, training and support for caregivers and high clinical and social services for professionals. The outcomes of this approach are delivered through a set of gamification concepts running in parallel to create motivation for user commitment and for achieving the desired behavioral change. After projecting all user group expectations on a social game canvas, the impact evaluation will assess the intended effects of the proposed gamification approach on the welfare on PLWD and their caregivers.


INTRODUCTION
Global population aging is becoming a major issue for delivering health services, as the existing healthcare structures are stressed to meet the needs of an increasing elderly population and especially of the people living with Dementia (PLWD). A promising solution is provided by eHealth applications, which are used to deliver healthcare services to distant service recipients. CAREGIVERSPRO-MMD (C-MMD) is a project aimed to deliver such added-value eHealth services not only to PLWD, but also to their caregivers, as well as health professionals and social workers. Services on offer include a wide range of activities targeted to de-hospitalized environments like day care institutions, local communities, home and work environments. eHealth/mHealth applications can be used autonomously and independently by elderly people during everyday life activities for distant patient monitoring, condition prevention, risk detection and decision making, or simply for supporting a healthy lifestyle. This approach requires the active participation of users (eHealth service recipients) and a minimum expected level of interaction with an ICT system.
No matter the technology or the treatment models used, the problem arises when treatment adherence is low. For some user populations, like the elderly, the level of adherence decreases over time [1] [2] and this creates the need for creating motivation for users. Gamification strategies can fit motivation patterns for most user groups, including the elderly and the PLWD, in order to maximize the use of eHealth technologies and the expected benefits.

CURRENT APPROACHES IN GAMIFICATION
Gamification is defined in here as the use of game elements in context and services other than entertainment to create motivation for desired behaviours [3]. Although gamificaton is a relatively new concept, there is strong literature evidence on the positive impact it has on motivation, engagement and enjoyment [4] on various sectors including education, training, marketing and eHealth.

Gamification in eHealth and Social Networks
Several attempts targeted to gamified eHealth services for the elderly have been presented in the literature, like Active Assisted Living (AAL) solutions [5] and Health Behavior Change Support Systems (hBCSS) [6] drawn in a gamified canvas. Those were targeted to improving user experience and engagement without the need to make their respective platforms like a typical game environment. On the other hand, what users seek is gameful experiences by using eHealth interventions.
In eHealth and Telemedicine cases, gamification solutions are proposed not for customer loyalty as in the marketing domain, but for motivation and engagement for following a treatment plan (adherence) and for achieving a permanent desired behavior change (e.g. in lifestyle).
Cota & Ishitani performed a systematic review on the motivational factors of digital games for the elderly towards the adequate game design for this audience [7]. Gameful experiences in health have been used in interventions to promote healthy lifestyles using gamification-based motivational techniques [8], or they were designed for hospitalization at home [9], or for people with specific disorders like hearing loss [10]. For elderly people specifically, eHealth interventions aim to extend the time they can autonomously live in their homes [11].
Specifically for PLWD and people with Mild Cognitive Impairment (MCI) there are two main categories of interventions: 1) Serious Games (SG) for cognitive decline prevention (e.g. memory games) and 2) platforms for social activities, which implement gamification principles.

Work Performed so Far
Several gamified platforms have been proposed so far to fulfil gaps in market, like the 3DTI in the 3D-TUNE-IN project [12], which provided a toolset for haptic design and development of gamified environments to enable end-users with hearing loss to explore, review and customize hearing aid devices and technologies. One of the most recent projects, POLYCARE [13], proposes a collaborative environment to help chronic PLWD in acute phases, in self-health management and fostering interaction with medical and social care services based on gamification principles in order to be more attractive and accessible.
Other solutions may not cater directly to health conditions, but on AAL like PERSSILAA project, for example, which offers services to prevent frailty, an elevated risk of vulnerability for age related decreasing health. A study made in this project confirms that gamification frameworks rarely have been developed for engaging elderly users [2]. More literature evidence has shown that users' experience is more enjoyable after gamification [14] [15]. This approach can be extended to the feedback collection and diagnostic processes, as people may find the survey contents more interesting and easy to interact with when they are gamified [16].
Based on the above, Gamification has been proposed as intervention in numerous platforms and social networks which target to support behavioural changes in their users. Some authors mention those interventions as 'Game-based therapies', like Frutos-Pascual et al. [17] who have investigated their role on the improvement of cognitive and social skills of the elderly.

Common Architectural Approaches
Gamification Engine Architecture (GEA) is a set of rules, features and methods used to describe the organization, implementation and perceived functionality of the gamification framework over a gamified web platform or a standalone application. Based on the above description, we will focus on GEA of various gamification frameworks, form targeted to general purpose ones. Although the analysis will be made using examples of particular implementations, our true interest will be on the capabilities of the given gamification solutions.
Stagliano & Stefanoni [18] described a typical Purposive Gamification Platform which consists of the Frontend Adapter, an object adapter responsible to capture the interaction events emitted by the gamified online platform (Event Detection mechanism) and a Game Logic Analyzer which consumes these interaction notifications to control progress in the game and trigger the Achievement System. Indeed, this abstract schema was found to be the most common among modern gamification architectures.
Another important feature for any gamification approach is providing immediate feedback on the user's performed actions. Any game events triggered by those actions are the result of the gamification rules applied on the user's behavior. Talking about user behavior, domain-specific Key Performance Indicators (KPI) are used to operationalize the expected goals [19]. Usually those KPIs are related to metrics like performance, efficiency, progress and quality. Kardan and Arani [20] presented an architecture for web-based gamification environments and highlighted the collaboration features of those environments. In such systems, social interactions and proofs of efficient collaboration between users were used to keep the game alive.
Overall, this actions-centered gamification approach can foster interactive-intensive experiences and thus propel the achievement of the gamification goals. Moreover, preserving the interaction history of each user allows administrators to profile users and thus take the chance to offer better and more personalized services to them [21]. Some gamification architecture designers insert the user's profile in the GEA as an independent model used in all gamification transactions dealing with players [22].
Commercial Gamified online platforms are based on complex software coming from corporate environments and thus requirements for scalability, security and usability are transferred to the gamification engines. But what makes the integration of the gamification into any online platform more demanding is the fact that the low-level integration activities (in source code) is not performed within the enterprise as usual. The functional integration requires platform developers to embed the gamification API (private REST API) on the online platform. Usually, what connects the various architectural components around a gamified platform is an API used for this integration.
Last, but not least, it's the gamification content management which is usually performed by an internal Content Management System (CMS). For creating gamification prototypes, the internal CMS is used for creating, displaying and editing from simple to advanced gamification components like rules, actions, quests and leaderboards. Moreover, the gamification of an online platform is not always performed by people with technical background, nor long experience in gamification processes. Thus, the gamification CMS requires user-friendly content creation tools and effective content management for numerous gamified online platforms running in parallel. It should be noted that the above tools are usually deployed as web apps operated by common web browsers.
Various architectures give different names to the above components, but they all describe similar functionalities. Veerakumar [23] uses the term Quest Manager to describe the CMS, while other terms found on the literature are Rule Management System [24] and Rule Engine [25]. Similarly, alternative names for the user model are player model, learner model or patient model depending on the target domain.

Particularities and challenges for the elderly people and the PLWD
As humans enter the Third Age, they are affected by difficulties like limitations in their motor, perceptual, cognitive and psychosocial skills [7]. Specific health problems and mental disorders may strengthen those limitations. Not only has this differentiated elderly users form younger populations as players, but also has created different motives for playing [26]. Elderly people are attracted by the entertainment elements of the games and the well matching of the game to their lifestyle [7].
The application of gamification principles on elderly populations should be characterized by lesser player commitment, meaning that users will be free to leave and come back according to their will and without penalties or negative effects on their game status [27]. In addition, in multiplayer environments elderly need more incentives than younger players to join groups and smaller communities to achieve better results on advanced challenges than what they could achieve as single users [28]. Especially for those multiuser environments, social interactions play a central role in the overall gamified experience and are mandatory for game flow and for the user profile evolution. Those socially active games are called Social Games (SG) [29] and were evolved after a long period of experimentation with 'socially constructed presence' [30] and online identities [31]. Social games also enabled female players to find equal motivation for participation and to become familiar with the aesthetics and language of the games [28].

A GAMIFICATION FRAMEWORK TO SUPPORT BEHAVIOURAL CHANGE
Our objective was to propose a gamification approach, which could be well embedded in the existing living routines of its users and at the same time pay attention on contextual factors that may affect the outcomes such as medical conditions, rapid changes in mood, social presence, etc.
The gamification solution presented in here introduces a unified framework for advanced services designed to extend existing approaches by offering highly personalized gamification features to serve social, medical and learning objectives. The proposed solution is called a Framework because its architecture can combine a gamified user's behavior monitoring system with a training platform with common social networking functionalities. Moreover, it implements a holistic gamification concept over typical user activities and implements Serious Games (SG) as non-pharmacological interventions.
This section aims to present a new online gamification framework targeted to creating motivation for participation in social collaboration, treatment adherence, personal development and training. The new gamification services on offer became highly personalized after applying a novel ontology to describe players' profile, treatment objectives and interaction history.

Motivation
According to Fogg [32] the behavior change when using persuasive technology is the result of intrinsic and extrinsic strategies applied in individuals. The proposed gamification approach serves both strategies by: 1. creating awareness, setting goals and giving positive reinforcement for creating the intrinsic motivation and 2. exposing users to competition, cooperation, creating shared identities and setting group goals. Additional strategies to achieve better results include requesting users to communicate with each other or with the artificial intelligence of the environment and to get exposed to the game competition [33]. Moreover, according to the Feedback, Friends and Fun concepts of every gamified environment [34], apart from the social networking, the C-MMD framework delivers immediate status information to its users related to the results of their online activities and integrates fun elements.
Barriers to physical exercise were found to be highly related to motivators as noted by [35] and confirmed by Schutzer & Graves [36]. We assume that the same is true for cognitive exercise. Moreover, some of the additional motivators like having more time and receiving more information on exercise benefits could be easily integrated in our approach.

The proposed Gamification Concept
We propose a gamification engine to support game-like activities aiming at increasing social skills necessary for positive relationships between the dyad (patient-caregiver) and among members of a team (personal circle, caregivers, medical or social workers, etc.). The domains the proposed gamification approach is targeted to can be summarized as follows (Figure 1): Socialization: Gamification in the social networking environment is proposed as an additional feature to be applied in attempts to improve user engagement and to defeat the user apathy, strengthen advice and consultation (professional services).
Education/Training: reinforcing medical knowledge, information retrieval, validation of medical data, rapid learning and care training.
Treatment Adherence: quality of life, healthcare efficiency, self-management, clinical alerts like low adherence, reminders, scheduling activities (medical protocols).
Monitoring: Decision Support System (DSS) adapted to the user monitoring processes (detection of indicators out of accepted range, secure and accurate data exchange among all parties involved, making decisions and making recommendations).
Non-pharmacological interventions: On-going brain-fit delivered as Serious Games and recommended as parallel to other disease prevention strategies for maintaining patients' functionality all along the evolution of the disease.
Based on the analysis of existing gamification platforms, a new promising solution would require gamification developers to include all typical architectural elements like a sensing component (based on the targeted KPIs), a CMS for the management of game rules and progress, a flexible player model and one or more visualization front-end points. The latest are needed to allow: 1. game-masters to create and edit games and 2. players to have an overview of their performance in relation to others.
In addition, we recognize the need to merge the 'patient' model used in eHealth applications with the social network user model in a hybrid construct capable to describe the C-MMD platform 'player'. The users of the gamified C-MMD platform are divided into two categories: 1. People Living with Dementia (PLWD) and 2. Their caregivers (professionals or relatives who provide everyday help). Both user categories are considered 'players', each with their own goals depending on the games they participate in. A typical scenario of user profile evolution after gamification is graphically presented in the diagram of Figure 2. The design of this new gamification approach has taken into consideration the expected or desired user behavior, including actions for treatment adherence, social collaboration, participation in screening tests and non-pharmacological interventions (e.g. Serious Games for brain fit, education and training, consultancy, etc.), profile completion and avatar evolution. The following section describes how those objectives were implemented through the proposed architecture.

The Gamification Engine architecture
The proposed gamification engine has been focused on being adaptive and flexible in order to be easily used by various platforms and applications (Figure 3). The gamified platform communicates with the Core Gamification Engine (Back-end) through the Game Management Interface. This module is used to set the games and their rules, the kinds of awards, the leaderboards and other typical game elements. A simple gamified process consists of actions, rules and awards, which are defined on creation time. The rules definition processes include the creation of a set of awards like points, coins, badges and tangible awards. Moreover, there is the possibility to define more than one Levels (Levels of Difficulty). As users accumulate experience, more advanced game levels are unlocked in order to preserve a smooth difficulty curve in faced game challenges. Moreover, game creators may create Quests, to motivate users in participation of highly competitive competitions with a deadline and very attractive awards (e.g. be the first player to reach 1000 points coming from social interactions).
In addition to the above, the Core Gamification Engine keep detailed records about the player's actions performed in the social platform. Those core gamification services are delivered to the social platform via the Gamification API (GAPI) for a platformagnostic integration (the gamification engine can be integrated into heterogeneous platforms). The GAPI is used to establish a communication channel between the low-level functionality of the Gamification Engine with any external software entities including the interventions (e.g. educational content), the Serious Games (e.g. brain fit games) and the rest of the Social Networking Services.
Overall, the Gamification Engine offers services that can be used independently by different applications in a complete and easy flow, all managed by an implemented user interface that facilitates the creation of gamified processes for the integrated application. The engine is a holistic system where the administrator sets the gamified factors from scratch.
There are three types of users that register in the gamified application and receive different levels of access to the gamification engine. At the administrator level, every single game action is visible and editable. The Game Masters (or game creators) are users who can create new gamification proposals for teams/groups of platform users. The Game Masters can only access the games they have created. Finally, the users (or 'players' of the gamification engine) are actually users of the platform which hosts the gamification engine. Users make the games progress as they interact with the social platform. Other kinds of users include people who provide technical support (e.g. Help Desk) and managers. After a Game Master has registered a new game and has defined its rules using the Game Management Interface, this new gamification proposal is available to the social platform users who can enable or disable their participation after they have read and agreed with the game rules.
The player's interaction history, as well as the history of the game events become both available to the players through a set of UI Widgets. Those are visual controls created and inserted in various social platform pages in order to inform users about their personal achievements and/or the achievements of other players (e.g. Leaderboards).

Figure 3: The Gamification Engine architecture
In addition to the above, a visual analytics tool is used for tracking all the user's interactions related to the game rules (game transactions). This tool can be used in decision-making processes related to regular game rule updates, designing of better gamification strategies and for promoting specific practices and user behaviours. A list of user actions which may outline the desired behaviour is presented in Table 1 as an example.

GAME DEFINITION LANGUAGES AND VALIDATION OF GAME RULES
Game rules are communicated and become fully understood by players at runtime, thus textual descriptions should be available in order to provide the chance of equal participation to everyone. Those rules should be predefined at design phase, but in most cases the effect of the gamification rules is tested after the rules have been applied to players. To describe game rules in a technical manner, various rule description languages have been proposed. The Game Definition Language (GDL) designed as part of the General Game Playing Project at Stanford University is a typical example of such a formal rule-description language [37]. As a logic programming language, it describes the fundamental building blocks of the game or gamified environment, the state of the game as a series of facts, and the mechanics as logical rules. According to its specification, GDL holds the class of games used for General Game Playing and describes the mathematical models underlying general game playing to compute the permissible actions of all players for every possible state and from the actions of all players to compute the forthcoming states. For gamification purposes, the use of GDL raises some limitations like the termination states. In non-leisure settings, like gamification in a social networks, a termination description may not be defined at all.
On the other hand, the gaML [38] is a language proposed to provide a mechanism for the precise definition of gamification concepts and recently was merged in game-development tools [39]. GaML can be used to formalize conceptual gamification requirements (syntax and static semantics) and it is readable by both gamification experts and wider audiences.
Our attempt regarding game description languages was to find a way to express and investigate (recurrent) game structures methodologically. Machinations [40] offered a new lens on the intuitive and delicate practice of game design and balancing. Machination is a visual modeling language used to communicate gamification rules by game feedback diagrams. They can describe the game mechanics and offer an interactive and dynamic graphical representation of the game loops (sense actions-apply rules-get results). Thus, Machinations were used in parallel to the gamification engine development in order to study and validate gamification mechanics even before its final implementation. This approach allows non-technical partners to propose and test gamification rules based on their intuition and balancing trial and error tests. Figure 4 graphically represents an example of a Machination used to simulate and test the C-MMD gamification proposals.

Figure 4: Example of a Machination used to test the functionality of the Gamification Engine before pilot studies
The main pools (circles) of award units represent points, profile completion percentage (%) and badges. The user's actions (double-lined circles) trigger a number of transactions between pools and finally the profile completion is reaching 100% and point wallets (sets of 100 points) become badges and they are added to user's profile. This is a scenario which offer main gamification functionalities on the C-MMD social platform, common for all player categories (PLWD and caregivers). Additional rules may be applied to specific user profiles if needed (absorb the effect mental health problems may have on player's performance).

CONCLUSIONS
As Vette et al. [2] note, business-driven gamification frameworks are simpler, easier to implement and they have been proven worthy in practice, but they are suitable for short-term engagement. On the other hand, the academia-driven gamification frameworks are more conceptual, complex and have less empirical support, but are targeted to durable motivation. What all approaches have in common is the use of gamification principles to engage customers/users/players. A 20% increase in the time spend on web platforms has been reported [41] and an increase of up to 80% in the number of users completing online tasks [42] [43]. The proposed gamification-by-design approach is expected to result in similar results after the completion of the pilot studies, which are currently on progress.
Although the way elderly people and people with mental disorders could be motivated to participate in ICT-based gamified environments is an open question [2], in this paper we presented our approach on how motivation for participation in a gamified social network can be delivered to PLWD and their caregivers. In the proposed gamification engine architecture the typical game play-driven user experience (points, badges, leaderboards, etc.), the social network characteristics, the data analytics and the personalization have been combined in a single modular platform. Some authors call this design philosophy 'Gamification 3.0' [44].
Additional gamification elements and advanced features like timed quests, team playing and levels of difficulty were utilized together with a wide variety of other existing gamification mechanics to maintain the interest of players. Therefore, as future work, it was decided to focus and study a list of behavior changes that may happen during the execution of the gamified actions, as well as results that proves the validation of user's engagement with gamification. Moreover, it is an issue of interest to try to adapt rules of gamification according to observations. Thus, the research will go on by defining the desirable behavior and the idea to find the rules that may drive users to act accordingly.