Fuzzy-based dynamic difficulty adjustment of an educational 3D-game

An educational game aims to employ the pleasant and fascinating environment of a game for educational purpose. However, when the game’s educational content or playing environment does not match with the player’s learning needs or game-playing skills, the player can find the game either too easy or too difficult and decide to drop it. Therefore, a successful educational game has to offer Dynamic Difficulty Adjustment (DDA) of both the game’s educational content and the game’s playing environment. Considering the above, in this paper a fuzzy-based DDA mechanism of a 3D-game, that teaches the programming language ‘HTML’, is presented. The game adapts dynamically the difficulty of battles and mazes navigation to each individual player’s skills. The novelty of the presented game lies on the application of DDA in the two dimensions (educational content and playing environment) of an educational game and on the use of fuzzy logic for succeeding balance between the game’s difficulty and the user’s playing skills. The adaptation is realized in real-time, during the playing and not each time the player changes game level/track. Furthermore, fuzzy logic allows to apply DDA without the need of many learning data, like other Artificial Intelligence techniques for DDA (i.e. machine learning techniques). The presented game was evaluated through a comparative evaluation, which included questionnaires, an experiment in real conditions and t-test statistical analysis method. The evaluation results showed that the incorporated adaptation mechanism increases the user’s motivation and succeeds to keep players’ interest for the game undiminished.


Introduction
Digital games are commonly used for entertainment and relaxation. Their interactive content, usually, creates pleasant feelings to users keeping them engaged. This makes them a powerful tool for promoting learning. That is the reason for the tendency to use them for educational purposes. Educational games are designed as fun activities through which students can learn and practice different concepts [26]. The players of an educational game have a variety of abilities, skills and preferences. Therefore, a game can be very easy or very difficult for a user at different stages of the gameplay. Furthermore, there may be students who do not like games or students who find it hard to navigate through the virtual world and thus may not be able to benefit fully from the educational content of the software [33]. As a result, the player can feel bored, frustrated or disappointed and stop playing the game failing to complete the educational purpose of the game. Consequently, the adaptation of a game to its application context may play a crucial role in ensuring the game's acceptability [13].
Personalization and adaptivity can promote motivated usage, increased user acceptance, and user identification in serious games [29], a popular category of which is educational games. Thus, the existence of balance between the difficulty of the game and the player's abilities and skills is crucial for providing the player with an adequate level of challenge, creating her/him pleasant feelings and the willing to replay the game. In educational games, the adaptation has to be realized in two dimensions: (i) the game's educational content, and (ii) the game's missions and elements. In literature review there are many researchers that have deal with the adaptation of the educational content of an educational game to the abilities of players [2,11,13,18,19,23,25,30,31]. However, it does not occur the same for the adaptation of game's missions and elements of the educational game to the playing skills of the users.
Concerning the difficulty of the game's playing, many games provide several levels of difficulty (i.e. easy, normal, hard), but either the difficulty level is selected manually by the player, or it is adjusted (usually increased gradually) by the game each time the player completes a mission. However, a player may fail to complete a mission and s/he may be disappointed and drop out the game. Furthermore, a player is not able to identify the level of difficulty of her/his skill. This fact has as a result to choose either very easy or hard modes of game for her/him. By automatically adjusting the difficulty of the game in real-time during playing, the game keeps the player's interest undiminished.
Taking into consideration the above, the challenge is to develop an educational game that adapts automatically and dynamically the educational content, as well as the gameplay elements to the player's abilities and skills. Particularly, the game has to identify the knowledge level of each individual player and adapts the educational content of the game accordingly. Also, the game has to identify when a player deals with difficulty during playing the game, or succeed to deal with the game's mission easily, and adapts, accordingly, the gameplay to the player' skills on the fly.
Considering the above, in this paper an educational 3D game that incorporates a fuzzy-based adaptation mechanism of playing skills difficulty, is presented. The purpose of the presented game is: (i) to teach the user the programming language HTML (Hyper Text Markup Language), and (ii) to entertain the user through a 3D game, offering a personalized playing and learning experience. Given that the adaptation of the educational content is an issue that is presented in many research papers in literature review, the presented work focuses on the adaptation of the playing environment of the educational game to the user's playing skills and abilities. The adaptation of the educational content has been presented, also, in a previous work [24].
Considering, the adaptation of gameplay elements, the game identifies during the play the player's skills on battles and on navigating into mazes. Particularly, it identifies five difficulty levels for battles' ability and three difficulty levels for navigation in mazes ability. For the definition of a player's level of ability in battles, the length of time each battle has taken and the loss of player's life by the enemy are considered. For the definition of a player's level of ability in mazes' navigation, the time spend navigating the maze, the player's loss of life suffered by the maze traps, and the number of times the player requested for help in order to continue navigation, are considered. For the calculation of these criteria, fuzzy sets are used. The reason for using fuzzy logic is that it is an ideal way for computing with linguistic terms uncertain and imprecise data [35], like the player's playing skills. Furthermore, a mechanism of fuzzy rules over the defined fuzzy sets is used. This mechanism decides about the difficulty of the next battles, changing, accordingly, the number of enemies and the damage they cause, and the difficulty of the next maze, changing, accordingly, the loss of the players life from traps, the number of times that s/he can request for help and the appearance of footprints. The difficulty of the game can increase or decrease according to changes in user's skills. The novelty of this mechanism lies on the following: (i) the presented fuzzy logic mechanism allows the playing environment to adapt dynamically to the user's playing skills without the need of many learning data, unlike other Artificial Intelligence techniques that require lots of training data and a great amount of learning time [15,17,34], (ii) it is realized on the fly, without waiting the player to play a suitable number of game levels, (iii) the adaptation is realized automatically and in real time, during the playing and not each time the player changes game level or track. For evaluation purpose, the presented game was used by 34 students of an undergraduate program in Informatics of the University of Piraeus, Greece. The evaluation process included questionnaire, experiment, and t-test statistical analysis method. The evaluation results showed that the adaptation of the game to the user's playing skills constitutes the game more fascinating and educationally beneficial, keeps the students engaged in the learning process eliminating the dropouts and increases the user's motivation.

Related work
Digital games are a popular way for entertainment and relaxation. Their history goes as far back as the early 1950s when academic, computer scientists began designing simple games and simulations as part of their research. Since the 1980s, video gaming has become a popular form of entertainment and a part of the modern popular culture in most parts of the world. One of the early games was Spacewar! ("History of video games", 2018). Today, games on the internet (like "League of Legends" and "Dota 2") and mobile games (like "Pokemon Go" and "Hearthstone Heroes of Warcraft") are particularly widespread. Nowadays, digital games are used frequently by people of different ages, sexes, and characteristics in their everyday life. Their widespread use is due to their interactive content and the included multimedia, like audio, images, texts, animations, videos.
Since the players of a digital game have a variety of characteristics, abilities and skills, the game has to provide a good level of challenge to each individual player in order to keep her/his interest during the playing. This can be realized by adapting a variety of game's parameters and elements to each individual player abilities, skills and preferences. In literature review, the method of modifying in real time the playing environment, like game's features, missions and scenarios, creating balance between the game's difficulty and the player's skills is called Dynamic Difficulty Adjustment (DDA) [5,7,8,10,34]. There are two types of adaptation concerning the adjustment of the game's playing environment difficulty: manual and automatic. The most common in games is manual adaptation, where the user chooses the level of difficulty, they want for the game. With manual adaptation, the user will have to constantly change the difficulty level of the game because it will be either too easy or too difficult, which will distract from the educational goal of the game. Furthermore, static levels of difficulty that are selected manually can no longer avoid boredom in players as they, in all probability, would be unable to decide on the challenge level that matches their abilities [16]. This not only greatly reduces the absorption of the syllabus but sooner or later it can lead to the user stopping the game. Automatic adaptability can reduce the potential negative impact of extensive manual adaptability options by automatically tuning games to optimize and personalize game experiences as well as to personalize interactions regarding the serious outcome [29].
In [12] the need and significance of existing balance between difficulty and skill in games are stressed. The aim of DDA is to create each time an adequate level of challenge for each individual player, keeping her/his interest undiminished and motivating her/him to play and replay the game. In [14] the AI Hamlet system is used to predict a player's skill and adjust the game to match them to the game's difficulty and challenge. Also, Missura and Gartner [20] apply game's difficulty adjustment to the player's skills by using a probabilistic method. However, these approaches of DDA succeed short-term benefits but they have no long-term effects, like maximizing the player's engagement. In [34] the authors succeeded to maximize the player's engagement through a DDA framework which is based on a progression probabilistic graph. However, the proposed method has application in level-based games and has not been examined in games with non-linear progression scenario, like adventure and role-playing games. Furthermore, the authors in [6] used the heuristic evaluation algorithm of Monte Carlo Tree Search to automatically detect a player's skill and adjust, accordingly, the game's difficulty and challenge. In addition, the author of [36] provided a literature review since 2009 and classified the current approaches to DDA to: probabilistic methods, single and multilayered perceptron, dynamic scripting, Hamlet system, reinforcement learning, upper confidence bound for trees and artificial neural networks, and self-organizing system and artificial neural networks. These approaches need many learning data.
A kind of digital games, for which DDA is crucial, is educational games. The main purpose of an educational game is to increase the students' motivation and engagement in the learning process. However, in some circumstances, players can find the game very easy or very hard, become bored or disappointed, and decide to quit from its playing, moving away from the educational goal [19]. So, the negative feelings that can arise, make the player unwilling to play the game in question, and the amount of learning that will occur will be lower than expected. Consequently, DDA is essential to avoid these negative consequences of an educational game and to focus on the educational purpose of the game. Given that an educational game consists of the playing environment, which can include scenarios, missions, puzzles, mazes, battles etc., and the educational content, a successful educational game has to offer DDA of both the game's educational content and the game's playing environment. In such a way, it succeeds to keep the user's interest undiminished from the beginning to the end of the game. In other words, it has to be able change automatically and dynamically the game's learning material and gaming parameters in order to be adapted to each individual user learning and playing needs and abilities.
In most scientific research papers, DDA in educational games concerns the learning needs and abilities of the student/player [18,19,23,30]. Furthermore, in [11] the authors examine the correlation between learning and playing styles. In [28] DDA concerns the environmental elements of the game, like color, music etc., to the user's preferences. Also, in [9] the authors proposed a DDA based on player's emotions. Similarly, in [21] the authors present an emotion-driven approach for adaptation in serious games. In [17] an evolutionary algorithm is used to find game settings suitable for the player of a serious math game. However, this mechanism requires a great amount of training data and large execution time. Furthermore, for the testing and evaluation of the presented DDA mechanism a computer player was designed. It has not been tested in real conditions. After a thorough literature review, we concluded that there is no adequate research on the adaptation of the playing environment of an educational game to the user's playing skills and abilities.
A method for realizing automatic dynamic difficulty adjustment is fuzzy logic. Fuzzy logic, which was introduced by Zadeh, as a methodology for computing with words, is ideal for address problems that contain uncertainty and imprecise data [1,35]. Given the fact that the determination of a player's gaming skills deals with uncertainty and their "computation" is realized using linguistic terms, like 'good', 'novice', 'expert' etc., the use of fuzzy logic in the process of adaptation of game's difficulty to each individual player's skills and abilities is ideal. Furthermore, in [27], the authors concluded that some other adaptation techniques, like typologies and stereotypes, are not effective for adaptation of game's difficulty to the user's playing skills. So, they preferred to use fuzzy logic for realizing player-centric adaptivity in a survival game. In addition, in [25], a game, which uses fuzzy to adapt the gameplay that concerns exercises that patients should execute for rehabilitation at home, is presented. The adaptation is done to the patient's status. Also, in [31] the authors used fuzzy logic for adaptation of the difficulty of the mission of the presented game to the player's skills. However, the mission concerns the syntax of a code, and the criterion of the difficulty level is the time that the user needs to write the code. This skill concerns the user's ability to computer programming, which is the educational content and aim of the game. It does not concern the user's playing skills.
Considering the above, we conclude that: (i) the literature research lacks educational games that adapt automatically and dynamically their gameplay elements other than the educational content's difficulty and environmental elements to the player's skills, (ii) the most artificial intelligence techniques for DDA require lots of training data and a great amount of learning time. Furthermore, fuzzy logic is not included in the current approaches of DDA [36]. Therefore, in this paper a fuzzy-based adaptation mechanism of a serious game playing skill difficulty is presented. The characteristics of this mechanism are the following: i) the adaptation is realized in real-time and automatically, ii) the adaptation concerns the player's skills on battles and on navigation in mazes, not only her/his learning abilities and needs, iii) the difficulty of the game can increase or decrease, iv) it is based on fuzzy logic. As a result, the presented game succeeds to balance the difficulty of the game with the player's playing skills keeping the player's interest undiminished and encouraging replaying. Therefore, the game increases the learning outcome.

Game's description
The presented game is titled: "Surviving Businessman" and is a 3D educational game (Fig. 1). The purpose of the game is twofold. First, to teach the user the programming language HTML and second to entertain the user through a 3D game. The game's environment includes an island. In this island there are: a castle, a forest and catacombs. The player has to find keys that unlock gates, which lead from one stage of the game to another. In each stage the player has to navigate into mazes and/ or fight enemies, while s/he looks for the keys that open the gates. Furthermore, in several places in each stage there are agents, who ask questions and set quizzes related to HTML, to the player (Fig. 2). According to the player's answer, the agent either ask her/him another question or he gives the player tips to help her/ him to find the keys that are necessary for proceeding the game. The game consists of eight stages. In the last stage, there are four gates, which are called business gates. The player has to open all that gates in order to gain the game's reward, that is a treasure. When the player succeeds to complete the 8th stage and open all four business gates, s/he has acquired the desired knowledge, concerning HTML, and the game ends.
The game "Surviving Businessman" offers adaptation concerning the educational content, as well as the difficulty of elements of the game's environment. In more details, the number and difficulty of the questions and quizzes that are asked by the game's agents are adapted to the player's knowledge level and learning needs. The adaptation of the game's educational  content to the learner's knowledge level and needs is out of the scope of the presented work and is presented in more details in a previous work [24]. In addition, the game incorporates an adaptation mechanism that adapts dynamically the difficulty of each battle and maze to the user's playing skills. The player's ability to fight an enemy and her/his ability to navigate into a maze are key attributes for the proceeding of the game. Therefore, they are taken into consideration for making a more adaptable to playing skills game environment, so as the player can focus on the educational purpose of the game. In Fig. 3 the game's architecture is presented. Also, the criteria that determine the of user's playing skills concerning battles and mazes, as well as the rule-based mechanism on which the adaptation is based, are described in detail in the following sub-domains.

Customized skills
The key attributes of the game that affect the player's navigation are her/his ability to battles and mazes. Therefore, the difficulty of them has to be adapted to the user's ability to fight and navigate the maze in order s/he does not discourage to continue playing the game. So, the aim is to allow the player to focus on the educational purpose of the game and gain the maximum knowledge of the educational material. Therefore, the game adaptation depends on two game playing skills: the skill in battles and the skill in maze navigation. The game playing skills and the criteria, which determine their level of ability are presented in Table 1.
Concerning the user's ability in battle, the criteria for his categorization to difficulty levels are: 1) the length of time each battle has taken, 2) the loss of life by the enemy.
These two criteria give a clear picture of the player's ability to deal with enemies in our game. The stereotypes related to the user's ability in battle are five: Beginner, Easy, Normal, Hard and Expert (Table 2). For example, a player, who has been categorized as 'Beginner' will not know how to deal with the enemies adequately, resulting in a much greater loss of life than the Fig. 3 The game's architecture experienced player. In addition, the time spent on dealing with each enemy will be much longer than for an 'expert' player. More specifically, there are the following stereotypes of players: & Battle Stereotype -Beginner: The player needs more than 12 minutes to beat the enemy and the loss of his life will be more than 80%. In that category the number of enemies is decreasing and the damage they cause with each hit to the player is 5% of his life. For that stereotype, a panel appears to inform the player about the adjustment of game's difficulty. & Battle Stereotype -Easy: The player needs more than 8 minutes and less or equal to 12 minutes to beat the enemy and the loss of his life will be more than 60% and less or equal to 80%. In that category the number of enemies is decreasing and the damage they cause with each hit to the player is 10% of his life. For that stereotype, a panel appears to inform the player about the adjustment of game's difficulty. & Battle Stereotype -Normal: The player needs more than 5 minutes and less or equal to 8 minutes to beat the enemy and the loss of his life will be more than 20% and less or equal to 60%. In that stereotype we keep the "default" number of enemies and the damage they cause with each hit to the player is 15% of his life. & Battle Stereotype -Hard: The player needs more than 3 minutes and less or equal to 5 minutes to beat the enemy and the loss of his life will be more than 0% and less or equal to 20%. In that category the number of enemies is increasing and the damage they cause with each hit to the player is 20% of his life. For that stereotype, a panel appears to inform the player about the adjustment of game's difficulty (Fig. 4). & Battle Stereotype -Expert: The player needs more or equal to 0 minutes and less or equal to 3 minutes to beat the enemy and the loss of his life will be exactly 0%. In that category the number of enemies is increasing and the damage they cause with each hit to the player is 30% of his life. For that stereotype, a panel appears to inform the player about the adjustment of game's difficulty. Concerning the user's ability in maze navigation the criteria for his categorization to difficulty navigation levels are: 1) the time spent navigating the maze, 2) the loss of life suffered by the maze traps, 3) the number of times the player requested for help in order to continue navigating.
These three criteria give a clear picture of the player's ability to navigate the maze.
The stereotypes related to user's navigation ability in a maze are three: Good, Moderate, Novice (Table 3). A player, who has been categorized in 'Novice' level, will be lost in the maze without knowing which path to follow and will thus use the help to navigate further. It will also make it difficult to avoid traps and this will cost her/ him time and loss of life. More specifically, there are the following stereotypes of maze: & Maze Stereotype -Good: The player needs less or equal to 5 minutes to navigate, the loss of his life from traps will be more or equal to 0% and less or equal to 30% and the number of times s/he requested for help will be no more than one. For this stereotype we have created a panel that informs the player about the difficulty of the game in terms of navigating the maze. The player now sees the "Hard Maze Navigation" panel to be informed of this change in the difficulty level of the game. Plus, the player's loss of life from each trap hit will be increased to 20%. & Maze Stereotype -Moderate: The player needs more than 5 minutes and less or equal to 10 minutes to navigate, the loss of his life from traps will be more or equal to 30% and less or equal to 60% and the number of times s/he requested for help will be 2 or 3. In this stereotype, the player's loss of life from each trap hit will not change. Therefore, it will remain at the "default" level, which is 15%.  & Maze Stereotype -Novice: The player needs more than 10 minutes to navigate, the loss of his life from traps will be more than 60% and the number of times s/he requested for help will be more than 3. For this stereotype we have created a panel that informs the player about the difficulty of the game in terms of navigating the maze. The player now sees the "Easy Maze Navigation" panel to be informed of this change in the difficulty level of the game. Rather, the player can distinguish footprints that appear at focal points with the aim of directing him or her to the next key or exit of the maze (Fig. 5). Plus, the player's loss of life from each trap hit will be reduced to 5%.
It is essential to mention that the limits at the values of the above criteria, like the time to beat the enemy in a battle, or the player's loss of life from traps, that determine the player's stereotype, have been defined empirically by the designers of the game. Particularly, they observed 25 players of different playing skills for a period of two months. They observed and registered the players' actions, difficulties, playing times and attempts, feelings, and reactions. Then, they elaborated the observation data and results and defined the thresholds.

Fuzzy rule-based mechanism
The definition of a user's playing skills is not a straightforward process. It is a complicated process that fraught with uncertainty and imprecise data. Specifically, it is difficult to define, for example, the ability of a player to fight or her/his ability to avoid traps or her/his ability to find the exit of a maze. Furthermore, skills of a player are measured, usually, with words. For example, a player can be characterized as good or as novice or as inexperienced or as slow etc. Considering the above, fuzzy logic seems to be an ideal way for defining a game player's skills, since it is a methodology for computing with words that handle, successfully, uncertainty and human subjectivity [35]. Therefore, in the presented game, fuzzy sets and rules over them are used to define a player's skills in battles and her/his ability to navigate a maze. Particularly, fuzzy sets are used for describing the criteria that determine a user's playing skills that concern battles and maze navigation: (i) the length of time a battle has taken, (ii) the loss of life by the enemy, (iii) the time spent navigating a maze, (iv) the loss of life suffered by the maze traps, and (v) the number of times s/he requested for help in order to continue navigating. Then, rules are applying over the defined fuzzy sets for deciding which is the category of the Fig. 5 Display of footprints difficulty level that the learner has to be classified to. Below, fuzzy sets and their membership function for each criterion are presentedFor the description of the length of time that a battle has taken, the following four fuzzy sets are used: 1) Very Fast (VF), 2) Fast (F), 3) Slow (S), and 4) Very Slow (VS). Their membership functions (x is the time in minutes that a player needs until to end a battle) and their partition are depicted in Fig. 6. For the description of the loss of a player's life by the enemy during a battle, the following five fuzzy sets are used: 1) Very Little (VL), 2) Little (L), 3) Medium (M), 4) Significant (Sig), and 5) Extremely Large (EL). Their membership functions (x is the percentage of life that the user lost during a battle) and their partition are depicted in Fig. 7.
For the description of the time spent navigating a maze, the following four fuzzy sets are used: 1) Very Fast (VF), 2) Fast (F), 3) Slow (S), and 4) Very Slow (VS). Their membership functions (x is the time in minutes that a player need until to exit from a maze) and their partition are depicted in Fig. 8. For the description of the loss of a player's life suffered by the maze traps, the following three fuzzy sets are used: 1) Little (Lit), 2) Medium (M), and 3) Large (Lar). Their membership functions (x is the percentage of life that the user lost due to traps during her/his navigation a maze) and their partition are depicted in Fig. 9. For the description of helps that a user requested during her/his navigation into a maze, the following four fuzzy sets are used: 1) Minor (Min), 2) Moderate (Mod), 3) Much (Muc), and 4) Extended Fig. 6 Fuzzy sets that concern the length of time that a battle has taken (Ex). Their membership functions (x is the percentage of help that a player asked during her/ his navigation and is calculated based on the number of assists requested by the player against the total number of assists available) and their partition are depicted in Fig. 10.
It has to be clarified that the thresholds in the above fuzzy sets have been defined empirically. Particularly, we observed users to play the game in real conditions and the observation of their skills and reactions during the game were the base for the calculation of the thresholds. Also, it has to be mentioned that in the presented model the most right active fuzzy set is taken into consideration each time. For example, if a player needed 17 minutes to navigate a maze, then: μ VF (17) = 0, μ F (17) = 0.4, μ S (17) = 0.6, μ VS (17) = 0. We consider that the user is in the fuzzy set 'Slow' (from the two active fuzzy sets that are 'Fast' and 'Slow').
Below, the rules, which are applied over the above defined fuzzy sets for deciding about a user's playing skills, are presented. Concerning the user's ability in battle, the criteria for her/ his categorization to difficulty levels are: (i) the length of time each battle has taken, and (ii) the Fig. 7 Fuzzy sets that concern the loss of a player's life by the enemy during a battle loss of life by the enemy. Also, the levels of difficulty concerning the battles are: Beginner, Easy, Normal, Hard and Expert. In Table 4, the relation between the values of the criteria's fuzzy sets and the difficulty level concerning the battles are presented. Furthermore, in Table 5, the game adaptation to the difficulty level of the player's skill in battles is presented. The corresponding rules are the following:  Concerning the user's ability in battle the criteria for her/his categorization to difficulty navigation levels are: (i) the time spent navigating the maze, (ii) the loss of life suffered by the maze traps, and (iii) the number of helps requested to continue navigating. Also, the levels Fig. 9 Fuzzy sets that concern the loss of a player's life suffered by the maze traps of difficulty are: Novice, Moderate, and Good. In Table 6, the relation between the values of the criteria's fuzzy sets and the difficulty level concerning the mazes are presented. Furthermore, in Table 7, the game adaptation to the difficulty level of the player's skill in maze navigation is presented. The corresponding rules are the following: 1. The user is classified to the level 'novice' when: 1.1. S/he belongs to 'Lar' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Ex' fuzzy set concerning the help that s/he requested during Fig. 10 Fuzzy sets that concern the help that a user requested during her/his navigation into a maze  fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Muc' or 'Ex' fuzzy set concerning the help that s/he requested during navigation the maze. 2.4. S/he belongs to 'F' fuzzy set concerning the time spent navigating, and to 'Lar' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' fuzzy set concerning the help that s/he requested during navigation the maze. 2.5. S/he belongs to 'S' fuzzy set concerning the time spent navigating, and to 'Lit' or 'M' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' or 'Mod' or 'Muc' fuzzy set concerning the help that s/he requested during navigation the maze. 2.6. S/he belongs to 'VS' fuzzy set concerning the time spent navigating, and to 'Lit' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' or 'Mod' fuzzy set concerning the help that s/he requested during navigation the maze. 2.7. S/he belongs to 'VS' fuzzy set concerning the time spent navigating, and to 'M' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' fuzzy set concerning the help that s/he requested during navigation the maze. 3. The user is classified to the level 'good' when: 3.1. S/he belongs to 'VF' or 'F' fuzzy set concerning the time spent navigating, and to 'Lit' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' or 'Mod' fuzzy set concerning the help that s/he requested during navigation the maze. 3.2. S/he belongs to 'VF' or 'F' fuzzy set concerning the time spent navigating, and to 'M' fuzzy set concerning her/his loss of life suffered by the maze traps, and to 'Min' fuzzy set concerning the help that s/he requested during navigation the maze. For the effectiveness and the significance of the presented work a thorough evaluation is needed. Given that questionnaires and experiments are the most common-use methods for evaluation purposes [4], a comparative evaluation that includes both methods was conducted. Particularly, three versions of the presented game were used in real conditions. The first version concerns the presented game without the process of adaptation to playing skills, the second version concerns a version of the presented game in which the adaptation of mazes and battles is based only on the stereotypes that were described in section 3.1 and the third version concerns the presented game. All versions of the game realized adaptation of the educational content to the learner's knowledge level, but only the second and third versions of the game realized adaptation of the gameplay. The adaptation of the second version of the game was based only on the stereotypes of section 3.1. In more details, concerning the player's ability in battles, the system classified him/her as 'Beginner', 'Easy', 'Normal', 'Easy', 'Hard' or 'Expert' according to if the player satisfied the values that concern the time each battle lasted and the loss of life by enemy of each stereotype category. The player has to meet the value limits for all the criteria of each stereotype to belong to it. Otherwise, the system classifies her/ him to the lower stereotype for which s/he meets one criterion at least. For example, if a player needed 6 minutes to beat the enemy and lost 48% of his/her life, then the system categorizes her/him to the 'normal' stereotype category. However, if a player needed 10 minutes to beat the enemy and lost 40% of his/her life, then the system categorizes her/him to the 'easy' stereotype category. Similarly, concerning the player's navigation ability in mazes, the system classified him/her as 'Novice', 'Moderate', or 'Good' according to if the player satisfied the values that concern the time spent navigating the maze, the loss of life by traps and the number of helps requested of each stereotype category. All versions of the game were used by groups of students of an undergraduate program in Informatics of the University of Piraeus in Greece. Group 1 used the non-adaptable to playing skills version of the game, group 2 used the stereotype-based adaptable version of the game and group 3 used the presented adaptable to playing skills version of the game. All three groups were consisted of of 34 students each. Students of three groups were 18-20 years old, and they are all novices concerning their knowledge on the programming language HTML. Their distribution concerning their sex, age and their knowledge level on HTML is presented in Table 8. Learners of three groups attended lessons of HTML in class for a period of three weeks before using the game. Then, they played the game in a period of two weeks. All learners were familiar with digital media and computer use. The game was analytically demonstrated, and full instructions were given to the learners before they play the game. Furthermore, instructors were always available to solve any problem and help learners during the game's playing. After the period of the game's usage, the students' opinion about the game were asked through a self-created questionnaire ( Table 9). The questionnaire consists of six questions that are close-ended based on a Likert scale with the responses ranging from Unsatisfactory (1) to Excellent (5). It was answered by the students of all three groups after playing the correspondingversions of the game. Through the particular questionnaire the following are examined: i) how easy it is to play and navigate into the game (Q1, Q2, Q3), and ii) if the adaptation process eliminates the obstacles, which may be created by the difficulty of the game's playing, that do not permit a student to benefit fully from the educational content of the game (Q4, Q5, Q6). In the last three columns of Table 9, the mean of the answers of the students of three groups are presented. From the results, we conclude that making a game able to adapt to the user's playing skills difficulty increases the player's interest and motivates her/ him to participate in it. Also, the adaptation of the game to the user's playing skills constitutes the game more educationally beneficial. In other words, it makes the playing process more fascinating and allowing the player to focus on the learning process and the educational goal. In addition, comparing the values of the last two columns, we noticed that the fuzzy-based adaptation has more positive results concerning the game's acceptance and its contribution to the learning process than the stereotype-based adaptation.
Furthermore, the students' reactions were observed and the number of students of each group, who withdrawn from playing the game, were estimated and compared through t-test statistical analysis [3,22]. Due to the fact that all three groups of our experiment had the same number of users, we conducted a two-sample assuming equal variances t-test, the results of which are depicted in Table 10.
According to the conducted t-test results 47% of the students, who used the non-adaptable version of the game, withdrawn from playing the game and they did not complete the learning process. The corresponding percentage for the students of the group 2 is 32.4% and for group 3 is 23.5%. We notice that the value of P(T < =t) two-tail is lower than 0.05 only as a result of the comparison between the group 1 and group 3. In all the other circumstances, the value of P(T < =t) two-tail is higher than 0.05. This indicated that although in the adaptive versions of the game the percentage of the users that quit from playing is significantly reduced, the difference in this criterion is statistically significant only between the students, who used the non-adaptable version of the game and the students, who used the fuzzy-based adaptable version of the game. Therefore, the presented fuzzy-based adaptive mechanism contributes positively to the engagement of the learners in the educational game and process. Also, after the period of three weeks that the learners attended the lessons of HTML and the period of two weeks that the learners used the game, a test assessing the learners' knowledge on HTML programming language were asked to be completed by the participant of the three groups. The maximum performance degree in the test, which corresponds to excellent knowledge level, was 10. The mean performance of the learners of all three groups were calculated and compared through a t-test statistical analysis [3,22]. The results of the conducted t-test are depicted in Table 11. According to the results the mean performance degree of the learners of the first group, who used the non-adaptable to playing skills version of the game, was 7.44 to 10. The mean performance degree percentage of the students of the group 2, who used the stereotype-based adaptable to playing skills version of the game, was 7.97 to 10. The mean performance degree percentage of the students of the group 3, who used the fuzzy-based adaptable to playing skills version of the game, was almost 8.59 to 10. Furthermore, considering the value of P(T < =t) two-tail, we notice that it is lower than 0.05, only when we compare group 1 with group 3 (0.001) and group 2 with group 3 (0.042). Consequently, the difference in the mean performance of the students of the group 3 is statistically significant and it has not been occurred randomly or due to differences among the students of group 3 with the students of the other both groups. So, the adaptation of the game to the playing skills of each player, which is based on the presented fuzzy mechanism, helps her/him to succeed better educational performance. However, this is not occurred in the stereotype-based adaptable game, since the P(T < =t) two-tail value (0.149) that is derived from the comparison between group 1 and group 2 is bigger than 0.05. Therefore, the evaluation process underlines the success of the presented fuzzy-based adaptable game. In addition, two objective data from the game were compared for the three groups. These data are: the number of people that succeeded to complete the game (no_comp) and the mean time that is needed to progress from a stage to the next stage (time_stages). According to the conducted t-test results 35.3% of the students, who used the non-adaptable version of the game, succeeded to complete the game. The corresponding percentage for the students of the group 2 is 50% and for the students of the group 3 is 73.5%. The results are presented in Table 12. Considering the value of P(T < =t) two-tail, we notice that it is lower than 0.05, when we compare group 1 with group 3 (0.001) and group 2 with group 3 (0.047). Therefore, the number of learners that succeeded to complete the game is significantly greater when they use the fuzzy-based adaptable version of the game. Also, the t-test proves that this difference in the values of no_comp is statistically significant, and it has not been occurred randomly or due to differences among the students of group 3 with the students of the other both groups.
Furthermore, the value of time_stages is 29.941 minutes, 23 minutes, and 14.735 minutes for group 1. Group 2 and group 3 correspondingly (Table 13). Also, we notice that the value of P(T < =t) two-tail is lower than 0.05 for all the comparisons between the three groups. So, the difference of the value of time_stages among the three groups is statistically significant. Therefore, the mean time that a learner is needed to progress from a stage of the game to the next stage is lower to the adaptable versions of the game. Also, we notice that in the fuzzybased adaptable version of the game this mean time is much lower. Consequently, the presented fuzzy-based adaptation mechanism allows learners to spend less time for navigating into the playing environment and focus on the educational content.

Generalization of the proposed fuzzy DDA mechanism
The aim of the presented fuzzy-based DDA mechanism is to facilitate each individual student to navigate into the game allowing her/him to focus on the educational purpose of the game. The proposed fuzzy-based DDA mechanism can be used in any educational game. It is independent of the educational content. The crucial aspect is to identify the key attributes of the game, which affect the player's navigation difficulty. Then, the playing skills that a player has to have in order to be able to navigate into the game have to be determined. For each playing skill, the levels of ability and the criteria, on which it is based, have to be defined. These data are emerged by the game designers through users' observation, while they interact with and play the game. Their behavior and reactions during playing have to be registered. The game playing skills, their levels of difficulty and their criteria are used to define the fuzzy sets. Furthermore, the game system's reactions to each player's skills have to be designed. Finally, the fuzzy rules on which the adaptation decisions are based, are formed, taking into account the above. Consequently, the generalized steps of the proposed fuzzy-based DDA mechanism are the following:

Conclusion
To conclude, in this paper a fuzzy-based adaptation mechanism of a serious 3D-game, that teaches the programming language 'HTML', playing skill difficulty, is presented. This mechanism uses fuzzy set for describing a player's gameplay skills, like the time s/he needed to end a battle, the loss of her/his life by the enemy, the time s/he needed to escape by a maze, her/his loss of life suffered by the maze traps, and the amount of help s/he requested for help during her/his navigation. Then, fuzzy rules are applied over the defined fuzzy sets to classify the player to a difficulty level considering her/his ability in battles and her/his skills in navigating a maze. According to the fuzzy rule-based mechanism output, the game adapts the difficulty of the next battle and of the next maze. The adaptation is realized automatically and dynamically in real-time. In such way, the game succeeds to balance its difficulty with each individual user's playing abilities and skills. The game was used by a group of 34 of students of an undergraduate program in Informatics of the University of Piraeus, Greece. They participated in a comparative evaluation process, which included questionnaire and experiment. The evaluation results showed that the adaptation of the game (i) decreases the players' negative feelings, like boredom and frustration, (ii) succeeds to keep players' interest for the game undiminished and, (iii) encourages the replay-ability.
The proposed fuzzy-based DDA mechanism can be used by designers and developers of educational games to confront with navigation problems. It is in our future plans to develop a cross-platform that will accept as input a game's playing skills, their difficulty levels, criteria and their values and it will automatically create the fuzzy-based adaptation module. Also, we are going to extend the adaptation process taking into consideration the player's feelings by developing an affective model. Furthermore, we aim to study and incorporate in our adaptation mechanism and other artificial intelligent techniques, like machine learning.