An Adaptive Gamification Tool for E-learning Platform

Numerous studies have shown that many students taking the computer science programming courses due to its abstract nature easily get demotivated and disengaged along the way resulting to a high failure rate and dropout. In this paper, we discuss an innovative approach to programming pedagogy using gamification elements and mechanics in a Learning Management System (Moodle) to motivate students, improve their engagement and performance. Since students have different motivational factors determined by their preference and learning style, we discuss how Machine Learning Algorithms namely KMeans and K Nearest Neighbor (KNN) are used to classify students based on engagement level, progressively adapt to their learning behavior and recommend the right gamification elements based on the level of interactivity achieved.


Introduction
It has been noted in technical education students have been performing poorly and are usually not industry ready when they pass out (Naik & Kamat, 2015). There are a variety of reasons key been lack of personalization or individualized attention especially within the e-learning platform. This is usually manifested as demotivation and disengagement on the part of the student. The desirable behaviors in learning processes is to improve the level of learners' motivation which can be achieved through personalized gamification (Roosta, Taghiyareh & Mosharraf, 2016).
Play is fundamental component in cognitive development and learning as noted (Plass, Homer & Kinzer, 2015;Deterding et al., 2011). Play provides motivation among players, and can be used to establish engagement for learning, Digital games have the benefit of customization and personalization for adaptivity and provides an environment for risk taking and exploration. Games utilized in learning environment are serious games and gamification as shown in the game's taxonomy, Figure 1.
In this paper, we demonstrate how applying gamification to an E-learning Platform (Moodle) can improve motivation and student engagement in learning. This is achieved by designing a gamified e-learning system that uses Machine learning techniques to personalize gamification elements and adapt to learning style and personality. Currently, the gamification in place is created for a group of students without considering different motivational factors among learners. This paper has been organized as follows: -Section II discusses the related work on player types, personality traits, learning theories and styles, motivation and game elements design. Section III discusses the methodology used in the study and how Machine learning algorithms was implemented to get the tool for that worked on Moodle data to recommend appropriate game elements to students. Section IV presents the results obtained from the study and the performance metric. Section V highlights on the conclusions and future work recommendation.

Gamification
Gamification is referred to as applying elements and mechanics of games in order to engage a user in a task outside of a game context (Ferro, Walz & Greuter, 2013). To investigate the impact of gamification on learners, studies have been made to understand ideal player types based on their personality. Psychologists for example, have identified that player typologies have relationships with that of pre-existing personality types.

Player types and personality
Some of the player types identified by researchers which contributed a lot in identifying player typologies used in current games are:-Socializer, Achievers, Explorers and Killers (Bartle, 2003(Bartle, , 2004, Competitor, Explorer, Collector, Achiever, Joker, Artist, Director, Storyteller, Performer and Craftsman (Fullerton & Swain, 2008), and Agon, Alea, Mimicry and Ilinx (Caillois, 1961). Personality refers to an inner tendency or predisposition for a person to act in a certain way (Berecz, 2009). The study of personality can be traced back to the work of Hippocrates and Galen (Crowne, 2009). In his studies, Eysenck (1970) dismissed their work and concluded personality is based on three super factors that comprise narrow traits which are Introversion or Exraversion, Neuroticicm or Emotional stability, and Psychoticism. Currently, the big five categories are used to evaluate human personality which are Openness, Conscientiousness, Extraversion, Agreeableness and Neuroticism, acronymed as OCEAN (Crowne, 2009).

Learning theories and styles
A taxonomy proposal by Smith (1999) depicts four orientation of learning theories and principles which are as follows. Behaviorism: -embraces conditioning and advocates rewarding and targets. Cognitivism concentrates on complexities of human memory and believe. Humanism focuses on experimental learning and finally Constructivism which relies on what is already know and understood by the learners.
Learning style is a consistent way of operating that indicates the underlying cause of a particular learning behavior. It shows how students learns and what they like to study (Hwang et al., 2012). The four learning style dimensions identified by Soflano, Connolly and Hainey (2015), and Khenissi et al. (2016) are: -Active/Reflective which describes how information is processed; Sequential/Global demonstrates the understanding by learners, Sensing/Intuitive highlights on how preference is perceived by learners to solve a problem and Visual/Verbal describes how information is retained and represented by learners.

Motivation
Motivation is a construct that explains the energy, persistence, direction and quality of behavior (Ryan & Deci, 2000). The scholars noted that people who are internally motivated perform better, have more creativity, persistence, vitality and general well-being as compared to those who are externally motivated. Self-determination theory (SDT) is one of the most fundamental theories of motivation which suggests three psychological needs of autonomy, Competence, and Relatedness. When the three needs are fulfilled, intrinsic motivation increases with the growth and development occurring. According to Roy and Zaman (2017), amotivated individuals are those who have no intention to perform a particular behavior whereas intrinsically motivated individuals are those that find pleasure interest and enjoy the engagement of the activity. SDT is a vital in the development of gamification as it allows for the development of various strategies in the design and implementation of gamification effort.

Game element design
Game can be defined as a way of play that has structure and goal (Strmečki, Bernik & Radošević, 2015). It comprises rules units and components that interact in a way to achieve the set goals. In other hand, game elements are described as the elements that characterizes a game, i.e. the features that describes the type of game and the way it is played (game mechanics) (Ibid., 2015). Many gamification studies investigate impact of multiple gamification elements simultaneously which makes it difficult to correctly know the extent that these elements contribute to motivation and behavior (Mekler, Br¨uhlmann, Opwis & Tuch, 2013). Design of successful gamification elements for e-learning systems require deep understanding of the concept of games i.e. goal focused activities, reward mechanisms and progress tracking (Strmečki, Bernik & Radošević, 2015). Naik and Kamat (2015), Roosta, Taghiyareh and Mosharraf (2016), Ferro, Walz and Greuter (2013), Mekler, Br¨uhlmann, Opwis & Tuch (2013), and Codish and Ravid (2014) recommend gamification elements that are best suited for e-learning systems which are: points, badges, leaderboard, progress bar, levels, customization.

Machine learning techniques
Machine learning algorithms are useful in attaining adaptability and classifying students based on level of participation. Back propagation neural network was used by Ben, Darryl, Michaela and Ray (2008) to adapt to player character based on change in environment.
They also suggested use of radial basis to classify players. Fuzzy logic was used by Xu, Wang and Su (2002) to model student profiles and by Kavi et al. (2003) to evaluate learning objectives and outcomes. Other ML techniques used are Iterative Dichotomiser 3 (ID3) for predicting students' performance (Adhatrao et al., 2013), Self-Organizing Maps (SOM) with Back Propagation to establish the connection between learners objectives and learners needs and come with appropriate for each user (Beetham & Sharpe, 2013), Bayesian Network (BN) to categorize users and quantify if a student can complete a certain activity (Mora, Riera, Gonza ́lez & Arnedo-Moreno, 2017), student behavior prediction using Hidden Markov Model (Morteza, Maryam & Anari, 2012) and Genetic Algorithm (GA) can be useful when it comes to understanding end user preference, want and needs (Drigas, Argyri & Vrettaros, 2009). Due to our relatively small dataset, K-means was used for clustering students and KNN for classifying students adaptively based on how student engage in Moodle platform.

Methodology
This study employed Design Science Research Methodology (DSRM) because of the rigor its employs for evaluation, concentrated design and development stage. In relation to this study, the process used is as listed as below:  Problem identification and motivation -the problem is having a gamification tool that will improve the motivational level of learners studying basic programming. The tool needs to cater for the difference in motivation and learning style among students and adapt to their personality.
 Objective of the solution definition -This involved Identifying gamification elements that are best suited to motivate students based on their preference and personality. It also required to progressively adapt to their learning behaviour.
 Design and Development -Develop a LMS prototype that will use AI techniques to adapt to users preferences and recommend the right gamification elements. The aim was to enhance motivation and engagement.
 Demonstration -Involved applying the tool to a sample size of computer science students to demonstrate its work-ability and applicability.
 Evaluation -Involved evaluating the results against the problem stated to identify their efficiency in improving motivation and engagement.
 Communication -Involved communicating the performance of the prototype and the results obtained after evaluation. Finally, the findings are to be published.
The end product was an adaptive tool embedded within the LMS prototype that uses AI techniques to adapt to users preferences and recommend the right gamification elements to enhance motivation and engagement level.

System architecture
In this architecture, the adaptive tool is linked to the Moodle backend where individual user data is retrieved from the logs. System interactions for the user are mined and an evaluation of learning behavior is determined. This evaluation is passed to the classification algorithm which classifies the user, based on evaluation made, to one of the identified clusters, and its value is recorded. This value, together with student evaluation, is passed to the recommended module which provides the appropriate gamification elements. This process is done progressively as the student interacts with Moodle and from the evaluation, the recommender module adapts to the user's level by recommending elements that suits the user at that level (see Figure 2).

Pre study
Mining of data was done from logs of a live e-learning platform to be the training data for the ML algorithms used. A total record of 89,000 were extracted cleaned, transformed to appropriate format and loaded to a clustering algorithm (K-means). The base clusters generated were 4 as shown in Figure 3.

Implementation
The main course that contains all the learning course content is created in Moodle. All the users will have access to this course through four hidden sub-courses interlinked to the main course at the back end. Each sub-course holds students enrolled based on the personalization determined by the classifier. The sub-courses also represent the identified clusters where each cluster has its own defined gamification elements. These elements are then integrated to the subcourse making all the users enrolled in them to have access to the elements. The class activities however are created and attempted by participants through the main course to avoid content duplication. This makes it as the core course for utilization by the ML algorithms. The individual logs for each participant which are recorded in the main course becomes the input for the classifier algorithm which works on the logs and determines the personalized game profile (cluster) for individual student. Since the sub-courses are hidden, the users can only see the main course and cannot tell the difference in content allocation, but will notice the game elements accessible in their profile are different. The game element recommender module enrolls the student to the right sub-course (cluster) once they attain the recommended Master Adaptive Points (MAP) for that cluster. Each sub-course has been installed with the right game elements.

Adaptivity
The system initially doesn't know which cluster each student belongs to. They are all enrolled to the main course. As the user interacts with the system, the adaptive engine evaluates traits and behavior of the user and passes the identified data to the classifier. The classifier evaluation the sent data and returns the identified MAP attached to the user. The MAP change is monitored every now and then to identify attainment on the recommended score. If so, the student is unenrolled from the current course to the sub-course which has the right game elements. The first enrollments may not be accurate because there are few logs for each student but this is perfected with time as student interacts with the system. The enrollment to different sub-courses is progressively made as the engagement level of the students increases. This ensures that the right gamification elements suitable for the level classified are always availed to them. The parameters used to measure the success of the tool were:  Enrollments made to different clusters -This meant there was improvement in engagement level as the student got access to personalized game elements.

Testing, results and discussion
To test the tool, two classes of computer science students at Kenyatta University were subjected to the study. The two questionnaire administered to students before and after study showed significant improvement in students responses after they interacted with the gamified platform. Students of age group 21-25 and 26-30 were the most participants and used laptop and smartphone to access the online platform with a percentage of 29.64 and 28.46 respectively. Out of the responses, 139 acknowledge that they do play games and 68% denotes that playing a game can assist them in learning. This number increased to 74% after being subjected to a gamified system as shown in Figure 5 and 6. Classifier grouped students at real time and assigned them to respective clusters. An improvement in cluster allocation was evidenced within the first week of system interaction as shown in figure 7.
The system started off with allocation of 116 students in the underachievers cluster, 35 disheartened and 7 achievers. In one week's time, the numbers continuously adjusted at real-time with 6 newly adapted underachievers identified and disheartened group increasing to 50. Gamification tools also showed great motivation among students. In one group, students had attained over 11,000 experience points which were attained by interacting with the system. The leaderboard made students to keep their position on top (see below) but wasn't the case for everyone. Some were motivated by ranking based on certain aspects while others were just okay without the elements. All these were provided to cater for the difference in their motivational factors. Some games were implemented as well to enhance motivation and monitor if they will have impact in learning. These games include crossword which challenged students to master terminologies in the unit. It was observed that students were participating even at odd hours and their level of engagement helped them gain experience points and be classified to other clusters.

Conclusion and future work
As seen, using gamified platform is indeed necessary for keeping students engaged in online platform. The gamified system used should not just focus on general game elements for students but personalized ones and keep adapting the student's learning behavior as motivation kicks in. When personalization is in place, boredom is also eliminated. As per objectives of this study, we were able to identify gamifiction elements suitable for recommending to learners according to their learning behavior, apply appropriate AI techniques to cluster students based on their behavior and progressively classify them and finally create a platform for implementing these features. However, using ML packages in some servers became a challenge because of restriction access and the ability of the server to run the classifier as fast as it could. Using other classifying methods such as neural network and deep learning were not viable because of the small data-set obtained. This caused the algorithm to over fitting with every trial. In future, other efficient ML techniques will also be applied as access to a large dataset is availed and the gamified tools to be integrated with other LMS platforms.