## 2 Related Work
In [18], the researchers proposed a facial expressions model that is based on hierarchical reconstruction with the purpose of capturing refined and finer details of human faces. Other researchers, [19; 20] modeled facial expressions as part of a virtual character animation pipeline, where the blendshapes are transformed from a reference face to a target one using regression models. According to the researchers, these models performed well in comparison to other cited methods in the field. Real-time facial animation has been the subject of [21; 22; 23], where the researchers start with real-time tracking of a human actor, then transfer the collected data on facial emotions, expressions, or poses to either the face of an animated character [21; 22] or another human's face [23]. Overall, in these three papers, the researchers depended on the weighting of the resultant blendshapes vectors to generate plausible facial expressions, which led to successful facial expression transfer. In spite of the fact that these studies do not address gaming environments, the implications of reported success can be utilized or built upon to animate either player-controlled or computer-controlled gaming characters (avatars). The accurate detection and recognition of the player's in-game, face-reflected emotions and the interfacing of recognized expressions to game avatars with the purpose of making them imitate human expressions based on in-game variables is one area of research that has received much attention in recent years. [24], for example, implemented a fuzzy logic model, FLAME, to replicate emotions in virtual characters depending on event appraisal, i.e., based on the user's emotional responses to a specific event. The researchers introduced, as well, inductive learning algorithms to dynamically adapt the virtual character to users' actions and the environment. The study reported an overall positive evaluation of the model by the users with a focus on the impact of implementing the learning algorithms but emphasized the potential for extending it through considering personality attributes. [PERSON], [PERSON], and [PERSON] [25], for instance, utilized an embedded Hidden Markov Model (HMM) for the real-time recognition of the players' facial emotions while engaging in an interactive game; then, a face alignment depending on the game role and context was performed. The study reports an 84% accuracy rate for the classification of unknown cases. In a similar manner, the HMM model developed for emotion recognition in [26] was intended for gaming environments, and the input of the model was six recorded videos, which were processed and codified as representing six emotions: joy, astonishment, rage, antipathy, fear, and sadness. Summarizing the results of the literature review, a number of researchers have pointed out the positive impacts of the virtual characters behavior to the gamers, and especially, the impact of facial expressions, as they can represent emotions. A number of researchers have automatically recognized emotions from facial expressions using various machine learning techniques. Some research has been done in the area of non-playable character (NPC) modeling, where they have modeled some standard behaviors and associate them with some in-game events. The main difference of all the above with our work is that we propose the development and use of a probability model that will govern the facial expressions of the computer-controlled character. The proposed model is trained using the facial expressions of a real human, playing the game and reacting to various game events. The aim is to enable a more realistic behavior of the computer-controlled character.