# Evaluating Learner Engagement with Gamification in Online Courses
## 4 The Design of Adaptive Gamification in MOOCs
### Rewarding Logic  
It is worth mentioning that it is not only important to know the next game element to show, but it is also crucial that the gamification reflects the achievements in the course. Thus, the gamification system uses the progress of the students and their learning outcomes in the graded activities to rate the value of the reward contained in the game elements.  
Our rewarding logic is based on a global score computed as a weighted value of the performance in the learning activities previously performed by the user, and the student's current status (as shown in Figure 2). We define the \(GlobalScore\) in some activity \(t\) as:  
\[GlobalScore(t)=LearningPerformance(t)*status(t) \tag{1}\]  
where the \(LearningPerformance(t)\) is the normalised mean of the ratings obtained until the current activity \(t\), i.e., with valued in the range \([0,1]\), and the \(status(t)\) indicates where the game element appears in the learning itinerary. It is also a value between 0 and 1, where 0 indicates that the learner is at the beginning of the course, and 1 means that the student has completed all course activities. The \(status\) allows us to better reward students as they approach to the end of the course. Moreover, we select the avatar look based on the \(status(t)\) value, i.e., we can use the newbie, medium, and pro avatars when a student's status values are in the intervals \([0,0.5)\), \([0.5,0.75)\) and \((0.75,1]\), respectively (see the different looks in Figure 2).  
The \(GlobalScore(t)\) allows for the setup of some game elements, used either for computing their _properties_ (i.e., rewards in lotteries) or also for guiding changes to their _visual appearance_ (i.e., icons of badges and gifts). The properties of the game element that are susceptible to change are related to the type of game element: (i) the values of rewards for Points, Challenges, Easter Eggs, Lotteries, Unlockables, and Gifts; (ii) difficulty in Challenges; (iii) types of Badges, i.e, badges, stars, medals, cups; (iv) the number of elements allowed to be modified with the Development Tools; and (v) the number of recommended friends in social networks. The visual elements that can be modified are the colours of the Easter Eggs, the symbols of the icons in Points and Badges, and some animations in the Challenges.  
In summary, Table 1 shows the game elements modifiable in terms of both their properties and appearance. For instance, challenges rely on the \(GlobalScore\) to shape their visual look and feel, showing different numbers of mountains to climb, and also to setup levels of difficulty and the reward that the users receive. Some other game elements (see Table 2), such as lotteries, adjust only their rewards according to the \(GlobalScore\) but maintain the same look and feel. Others only reflect information about the student's \(status\) in the learning itinerary, i.e., levels, and their gamification status, i.e., leaderboards, but without using the global score to configure their properties or appearance (see Table 3).  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Game Elements** & **Changeable Properties** & **Changeable** \\  & & **Visual Appearance** \\ \hline Challenges & Difficulty, reward value & \\ Points & Reward value & \\ Badges & Badge types & \\ Easter Eggs & Reward value & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of the Game Element Properties and Appearances changeable as a function of the global score values. These game elements will change their properties and their appearance depending on the global scores.