The Development of Expert Mood Identifier System using Fuzzy Logic on Blackberry Platform

In our daily life, deciding what caused the bad mood is not easy. This study will design an Expert Mood Identifier System for mobile application. We propose a model that uses 6 variables as the inputs, they are intensity of Sleep (SL), intensity of Eat (ET), hours of using Phone (PH), Spare Time (ST), intensity of Sensitive (SN), intensity of Confidence (CF). These inputs, using Sugeno fuzzy logic, are then fuzzificated to linguistic variables, so that they able to evaluated with the if-then rules. Result of the evaluation will show the highest possibility causes either in Love (LV) or density schedule. It will be defuzzificated to a crisp number showing the percentage of what causes it. The experiment results are presented and show the Mood Identifier system is running well on BlackBerry platform and can be used successfully to identify the causes of bad mood with a solution for each case.


INTRODUCTION
Everyday our moods are so unexpected that it is hard to know where they come from, why they occur and what can be done about them. But these daily contrast in our feelings are actually easier to understand and manage than most people realize. If someone is an introvert-that is, someone with more of a quiet, shy nature-what he does or says tends to depend a lot upon how he feels. In other words, he is affected by his moods. If he is an extroverts, who focus more on the outside world, it is easier for him to ignore their moods. However, extroverts who ignore how they feel for too long can lose sight of their deeper human needs. As a result, they become stressed, no longer enjoy life and find that they've lost their purpose. It is very important to know what makes the mood change to worse and to solve it. In this study, we will use the fuzzy logic to calculate what the causes of bad moods, with knowledge from the expert of psychology. State of the art of this research is a new model of Expert Mood Identifier system using BlackBerry platform that very popular in Indonesia.

MATERIALS AND METHODS
So far the method using technology to identify the causes of mood is using an interactive voice response system. It is a chance to solve this problem using questionnaires with different method. Defining a feeling is not only yes or no and it is not an exact number, but it can be represented with fuzzy set. For example, feeling good and bad is subjective, it is not only 'good' and 'bad', but can be 'slightly good', or 'not too bad'. Thus we need a method that can use a imprecise and ambiguous values as the inputs, like fuzzy logic.

Theory of Moods
Based on APA Dictionary of Psychology, a mood defines as any short-lived emotional state, usually of low intensity (e.g., a cheerful mood an irritable mood). Moods are a background feeling that persists over time that define how someone are. Usually moods are less intense and longer lasting than emotions, although the lower intensity is not true in a case of a serious Science Publications JCS depression. It does not directly express, instead expressing it by the way of thinking, communicate, behave and interpret the world. It is not the same as emotions, which are directly expressed or suppressed. Sometimes we can misunderstood it as personality-which is also can be seen from our daily behavior-and makes it harder to identify the mood and what causes it. Another term used in the scientific literature to refer moods is affect, a term that many biological and behavioral scientist use to indicate mood. It has a certain surface quality or immediacy associated with it. Affect level can be used to indicate observable emotional reactions such as crying, or to rating of immediate feelings that the subjects make themselves (Miller, 2009;Thayer, 2001).
According to Thayer (2001), moods are created by the health and illness, sleep, food, amount of recent exercise and even time of the day are very significant as well. It is something like a clinical thermometer, reflecting all the internal and external events that affect us. Moods are differentiated from emotions by intensity and duration. They are considered to be low-intensity long-lasting affective states, whereas emotions are considered high intensity, situation specific and brief. The psychology literature is replete with examples of how emotions and moods affect decision making, but personality's role is also essential because of the differences in cognition helping to explain why different people reach different decisions while experiencing the same emotions (Santos et al., 2011).

Expert Systems for Mobile Application
Drastic increase occurred in the use of games for a fun and educational tool for students and effective discussion about the use of adaptive games to enhance interested learning and entertaining to various aspects of education using mobile application such as BlackBerry platform (Nicola, 2011). One of the well-known providers of mobile games/applications that are used in Indonesia is BlackBerry devices from Research in Motion (RIM). BlackBerry Operating System enables the developers to develop open source Java-based applications that can be easily commercialized (Rizk, 2009).
Expert systems is a computer program, designed to make available some of the skills of an expert to nonexperts (Siller and Buckley, 2005). It is characterized with expert knowledges, knowledge acquitition, solving problem and describe the solution.
The expert knowledge can be stored into a knowledge base, usually in a rule-based system. It can be drawn by the lecturing or by interviewing. The knowledges than used to compare with the information inputed by the nonexperts. The system will find a solution based on the information and will describe the solution like an expert do.
In this study, the knowledge of psychologist is drawn by interviewing and it is used to find what causes the bad mood.

Fuzzy Logic Theory
Fuzzy logic is a linguistic theory that models how to reason with vague rules of commons sense (Ross, 2010). It can control a complex and non-linier system even a system that hard to be represented mathematically. It is able to put ambiguous words or imprecise value as an input.
Fuzzy logic first introduced by Lukasiewicz (1920). In 1930s, Max Black researched further more about it and it was fading until Zadeh (1965) rediscovered it. He extended the work on possibility theory into a formal system of mathematical logic. This new logic for representing and manipulating fuzzy terms was called fuzzy logic (Negnevitsky, 2005). Figure 1 is an example of the classical logic of membership that can be represented mathematically with the indicator function Equation (1): where, X A (x) is the indicator of an unambiguous membership of x in set A, the symbol ∈ and ∉ denote contained in and not contained in, respectively. In this classical logic, if X A (x) is 1, then x is completely a member of A and if X A (x) is 0, then x is completely not a member of A.
Fuzzy logic uses a fuzzy set to present the value of the variables. Fuzzy set is a set containing elements that have varying degrees of membership in the set. In the classical set, the member of a crisp set would not be members unless their membership is full in that set (µ(x) = 1). In fuzzy set, the membership need not be complete so that it can also be members of other fuzzy sets on the same universe (Ross, 2010). In other words, the membership of an element may be between 0 and 1. Instead of just black and white, it employs the spectrum of colour as shown in Fig. 2.
The fuzzy logic used in this study is Mamdani method, it was introduced by Mamdani and Assilian (1975) of London University (Negnevitsky, 2005). The format of Mamdani method: where, x, y and z are linguistic variables; A, B and C are fuzzy sets.

Proposed Methods
The use case diagram for our proposed system shown in Fig. 3. The system consists of a series of question and answer and the solution included with the quote for giving the motivation to the user.
After we make an architecture of our application, we propose some rules based on the knowledge base from our psychologist that mastering about the mood of human, such as.
The rules of daily: • IF eating is less AND sleeping less THEN daily is worst • IF eating is less AND sleeping is normal THEN daily is worse • IF eating is less AND sleeping is more THEN daily is worst • IF eating is normal AND sleeping is less THEN daily is bad • IF eating is normal AND sleeping is normal THEN daily is normal • IF eating is normal AND sleeping is more THEN daily is bad • IF eating is more AND sleeping is less THEN daily is worst • IF eating is more AND sleeping is normal THEN daily is worse • IF eating is more AND sleeping is more THEN daily is worst The rules for broken heart: • IF social will is low AND social intensity is low AND dressing up is low THEN broken heart is very high • IF social will is low AND social intensity is low AND dressing up is normal THEN broken heart is high • IF social will is low AND social intensity is low AND dressing up is high THEN broken heart is medium • IF social will is low AND social intensity is normal AND dressing up is low THEN broken heart is high • IF social will is low AND social intensity is normal AND dressing up is normal THEN broken heart is normal • IF social will is low AND social intensity is normal AND dressing up is high THEN broken heart is normal • IF social will is low AND social intensity is high AND dressing up is low THEN broken heart is high • IF social will is low AND social intensity is high AND dressing up is normal THEN broken heart is normal • IF social will is low AND social intensity is high AND dressing up is high THEN broken heart is normal • IF social will is normal AND social intensity is low AND dressing up is low THEN broken heart is high • IF social will is normal AND social intensity is low AND dressing up is normal THEN broken heart is normal For processing the input, we use Mamdani method. There are four steps in Mamdani method

Fuzzification
The first step in Mamdani method is fuzzification, a process where the crisp inputs are converted to fuzzy number and to put them on the right fuzzy set such as sown in Fig. 4 Equation (2): If the input for the hours of sleeping is 10, the fuzzification result is:

Rule Aggregation
The next step is to modify the output fuzzy set with the Max function Equation (4)

Defuzzification
The last step is to convert the fuzzy output into crisp output. In this study, we used the Center of Gravity (COG) function to defuzzify the output Equation (5) Then the crisp output of the daily is 53, 200684%.

RESULTS
Experiments performed on the Simulator and BlackBerry Bold with OS 7.0 with the result shown in Fig. 5.

JCS Table 1. Answer and result for bad mood and causes of bad mood in fuzzy
Result From the various experiments, the system get the answer in Fig. 5d. The result gets from the rule, if bad mood degree is high, so is the cause, either broken heart or financial problems as shown in Table 1

DISCUSSION
We have developed the application and running well on BlackBerry platform. The system is able to identify the possibility of cause of user's mood, as an example shown in Table 1. The application can identify the cause of a bad mood with a percentage of truth until 80%.

CONCLUSION
This research has developed a framework for Mood Identifier System using Fuzzy Logic. Application that implementation on BlackBerry device can measure the degree of mood from their activity and detect the causes as broken heart and financial problems. This application can be run quickly on BlackBerry device because the design is simple and the question is short that can represent the result. The system has given the accurately and quickly result. The applications are successfully achieves the goals to detect the causes of bad mood. For future work, the model will be proposed mood detection that can detect many of the causes of bad mood.