Aquabot: A Diagnostic Chatbot for Achluophobia and Autism

Chatbots or chatter bots have been a good way to entertain one. This paper emphasizes on the use of a chatbot in the diagnosis of Achluophobia – the fear of darkness and autism disorder. Autism and Achluophobia (fear of darkness) are the most common neurodevelopment disorders usually found in children. State of the art trivial diagnosis methods require a lot of time and are also unable to maintain the case history of psychological disease. A chatbot has been developed in this work which can diagnose the severity of disease based on user’s text based questions. It performs Natural Language Processing (NLP) for meaning extraction and uses Decision Trees to characterize a patient in terms of possible disease. NLP unit extracts meaning of keywords defining intensity of disease’s symptoms, from user’s chat. After that similarity matching of sentence containing keywords is performed. Depth First Search (DFS) technique is used for traversing Decision Tree and making decision about severity of disease. The proposed system namely Aquabot, proves to be an efficient technique in diagnosing Achluophobia and Autism. Aquabot is useful for practitioner psychologists to assist a human psychologist. Aquabot not only saved time and resources but also achieved an accuracy of 88 percent when compared against human psychologist’s diagnosed results. Keywords—Chatbot; Achluophobia; autism; expert system


I. INTRODUCTION
A chatter bot or simply chatbot is a piece of software that resembles a human being. In that it can respond to the user's text-based questions or sentences like human being. In this respect a successful chatbot will be the one whose text responses have higher degree of resemblance to a human being's responses. The history of development of chatbots is as long as any other piece of software. While chatbots are now available for different types of computers as well as platforms from PC to Android and iPhoneit is common to note that their main usage is in entertainment and as a chatting application followed by their use as a virtual support agent on various websites as a second usage. This leaves a good room for research in various areas to use a chatbot and psychology is only one such example.
As human beings are progressing in terms of science and technology, they are on a sharp decline towards having higher level of psychological problems. These psychological problems can be minor as well as major in some cases. In this sense innovations are affecting user psychology. User psychology refers to psychological analysis of users in interactional situations [1]- [4]. As psychological concepts, methods and theories can be used to analyze human/technology interaction [3], human/technology (especially computer) interaction can be used in determining the psychology of the user.
Natural disasters like earthquakes and floods which occur continuously in recent few years till now, have arisen a lot of psychological problems among the people worldwide. And in these conditions there are not sufficient enough psychologists as required. Due to increase in psychological problems and lack of human psychologists there is a strong need to develop a system which is helpful in diagnosis of psychological disorders in order to save psychologists time.
At this same time there are a large number of artificial chat bots available, the main purposes of these chat bots is, however, limited to entertainment, client support and advertising [8]. Some of the chatbots are also used for teaching purpose and better learning of students [13], [14], [15]. This turns out to be an interesting point. That is, we can use a specifically designed chatbot to interact with the user, get more information regarding his/her psychology and thus diagnose their psychological problems if they exist.
Aquabot specifically focus on deciding whether the user has the fear of darkness or notor is affected by Achluophobia or not. It can be seen commonly that a human being doesn't admit that he/she is affected by a psychological problem such as achluophobia. Nor does he/she would like to go to a psychiatrist. Moreover if a friend of his/her tries to talk about their psychological problems, most of the time they'll end up being angry because the society gives the name of "mantel retarded" to the people having any kind of psychological problems even if it is at very minor level. A chatbot may come very handy in these circumstances so the purpose of this initial diagnosis is to have a rough estimation about the fact that user is affected or not before a real psychiatrist is involved.
Our chatbot (that we call as aquabot) specifically focus on deciding whether the user has the fear of darkness or notor is affected by Achluophobia or not. It can be seen commonly that a human being doesn't admit that he/she is affected by a psychological problem such as achluophobia. Nor does he/she would like to go to a psychiatrist. Moreover, if a friend of his/her tries to talk about their psychological problems, most www.ijacsa.thesai.org of the time they'll end up being angry because the society gives the name of "mantel retarded" to the people having any kind of psychological problems even if it is at very minor level. A chatbot may come very handy in these circumstances so the purpose of this initial diagnosis is to have a rough estimation about the fact that user is affected or not before a real psychiatrist is involved.

A. Psychological Problems
With evolution of science and technology, human life is greatly affected. It brings up both good and adverse effects on human life and society. One of the adverse effects is increase in psychological problems. Depression is just one example of the problems arise with evolution of science and technology. Psychology is the study of human behavior and thus problem in one's behavior is known as psychological problem. There exist many psychological disorders like anxiety disorder, mood disorder, eating disorder, developmental disorder etc. User psychological science means analyzing user's behavior in interaction environments. Psychological ideas, strategies and theories may be implemented to analyze human/technology interaction.

1) Autism and achlouphobia
Autism is a pervasive developmental disorder. For autism disorder treatment robots are used to interact with patients [10], [11]. The fear of the dark is a common fear among children and to a varying degree is observed for adults [Online].

B. AI Techniques used in Psychology
Expert systems can be made using Artificial Intelligence which can assist a psychiatrist in clinic. These systems can help both in diagnosis of problem and its treatment. Many techniques of AI are used in psychological field; some of them are discussed here:

1) Fuzzy logic
Fuzzy is used in determining psychological patterns of a person using internet [7].

2) Expert system
In psychological diagnosis and treatment many expert systems are made [9]. An expert system to keep record of family history to diagnose psychological issues is also made [11].

III. RELATED WORK
The diagnosis of physiological problems like diagnosis and treatment of phobias through some chatting is the most popular and commonly used method. In existing systems, psychological problem and diseases are diagnosed by help of human psychiatrist. In field of automation of treatment of psychological problems there are some techniques of virtual reality are used. Virtual reality is the computer-generated simulation of a three-dimensional image or environment that can be interact with a seemingly real or physical way by a person using special electronic equipment, such as a helmet with a screen inside. It will be helpful in diagnosis before involvement of human expert. Previously in fields of psychological problem's diagnosis and treatment some work is done in phobia's treatment like Arachnophobia [Ian Millington], Acrophobia [5], fear of flying phobia [6], etc. By examining actions and body language of a patient its mental condition e.g. stress and anxiety can be measured, in this area a lot of work is done in key strokes measuring while playing a game.
There already existing some non-chatbot psychological support online [13]. Psycare propose an online psychological counseling framework. It comes up with many vital features like automatic assist in mind to customers with support of the buildup of wealthy psychological knowledge and a strong knowledge analysis system, seamless integration of mobile and therefore the net, by that the customers' psychological changes square measure simply to be captured and recorded. Multidimensional psychological screening by consultants and intelligent module and personalization, pursuit the complete method of medical aid of every client, that makes the new model because the user's personal mental coach.
Expert systems are also developed for diagnosis of psychological problems (like disorders and phobias) diagnosis and treatment. An expert system for diagnosis of phobias is present in [8]. Diagnosis of psychological disorders with a hybrid proposal of an expert system that is integrated to structured methodologies in decision support (Multi-Criteria Decision Analysis MCDA) and knowledge structured representations into production rules and probabilities (Artificial Intelligence AI). An expert system for family therapy system is proposed in [11]. It contains the knowledge bases which comprise a separate part of the system, it is a straight forward matter to introduce new theoretical models into the system, as well as to update existing ones' own performance, and since the sub-system also contains its own separate knowledge base, containing the rules governing the Consistency Test, it is easy to modify one aspect of the system without worrying about its ramifications for the others. The Family Therapy Expert System demonstrates that there is a role within the workplace for knowledge based systems which are designed to address specific needs within a particular domain of expertise.
For autism treatment there are some artificially intelligent automated works already done. In [9] FACE (Facial Automation for Conveying Emotions) interacts with kinesics, non-verbal communication conveyed by body part movements, or facial expressions, and so on, taking into account the polemics space goal is define and test a therapeutic protocol for autism in order to enhance social and emotive abilities in people with autism. People with autism focus their attention on single details, but the interaction with a robot may allow an autistic subject to concentrate herself/himself on the limited number of communication modalities of the robot. This paper's work includes Biometrics and Neural Network for the Classification of the Behavior of the Interlocutor. In [10] authors concentrate on attempts to improve the diagnostic standards of autism by using social robots to provide quantitative, objective measurements of social response. It use of interactive, social robots which create standardized social presses designed to elicit a particular social response. It concludes with a discussion on www.ijacsa.thesai.org therapeutic and diagnostic possibilities for this work and speculates on how the use of social robots in autism research might lead to a greater understanding of the disorder. There are chatbots already been used in field of psychiatry [12]. A chatbot is used to train and improve skill of students of psychology and psychiatry at University of Barcelona in diagnosis of Generalized Anxiety Disorder (GAD). It proposes architecture to evolve from a chatbot to an Embodied Conversational Agent (ECA) with the ability to express emotions and personality traits through written texts. This paper's work used images of a virtual human to reinforce the emotion and intensity of the emotion in the written texts. It presented an architecture using emotions and personality traits to endow an ECA of emotional dialogues based on AIML (Artificial Intelligence Markup Language).
There are some limitations of already existing systems. The expert systems already present [7], [8] for psychological usage has the limitation of bounding user to respond in some given options. These expert systems are not giving users the freedom to say whatever they want to say, which can be more helpful in drawing a true picture of user's psychological problems. User may not be able to interact with these expert systems in a relax environment.
A chatbot may come very handy in these circumstances so the purpose of this initial diagnosis is to have a rough estimate about the fact that user is affected or not before a real psychiatrist is involved. A comparison between techniques used in existing diagnostic systems is given in Table 1. Assessment of performance and efficiency of a chatbot is challenging. Usually it includes evaluation of computational cost, the response time measurement. There exits numerous chatbots for different purposes. Accuracy rate and standard deviation (SD) is also discussed. Comparison of aquabot's performance with ViDi (diagnostic chatbot for diabetic patients) is also given.

A. Comparison Techniques 1) Percentage accuracy
For assessment of accuracy of psychologist chatbot, its diagnosed results are compared with human psychologist diagnosed results. In this way, its accuracy rate is verified.

2) Time complexity
For performance evaluation, time taken by Aquabot to generate response to user's chat (after making decision by traversing decision tree) is compared by ViDi.

B. Comparison with ViDi Chatbot
The ViDi (Virtual Diabeties Physician) chatbot and its functionality are described below.

1) ViDi chatbot
The ViDi Chatbot is a chatbot which is designed to give idea of chatbot's usage as diagnostic systems for disease. The ViDi chatbot improves its performance by using a new algorithm Extension and Prerequisite. This new algorithm enables relations between responses that significantly make it easier for user to chat with chatbot using the same approach as chatting with an actual human. ViDi gives different responses of the same input given by user according to current conversation issue. The usage of Extension and Prerequisite algorithm not only improves the response time but also enhance accuracy of responses of ViDi chatbot. Fig. 1 shows chatting window on ViDi chatbot.

1) Aquabot verses ViDi Chatbot
Aquabot uses decision tree (DFS traversal) for its performance improvement. The usage of decision tree improves the response time and regularity in responses of aquabot. Our system achieves a slightly lesser response time (in generating responses of user's questions) as compared to ViDi chatbot. ViDi is not tested on diabetes patients in clinics.
Hence the accuracy of ViDi as diagnostic system for diabetes is not checked. In comparison to ViDi, Aquabot is tested on psychological patients in clinics. In this way, aquabot's usefulness as a psychologist's assistant is proved by its good diagnostic accuracy. Table 2 shows a comparison between aquabot and ViDi chatbot.

IV. PROPOSED SYSTEM
There is a requirement of such a system which is helpful in diagnosis of psychological disorders to save psychologists time and to keep record of patient's case. Or a system is required that would make the diagnosis easy and interesting like casual chat. We propose a system which is able to have a conversation with the user and find out his/her psychological problem. Our system will deal with two psychological problems, i.e. Autism and Achluophobia. Autism is a developmental disorder with impaired social interaction and communication. And achluophobia is the fear of dark in any person. We propose a chatbot that will ask questions from user to diagnose his/her problem while making sure that nothing seems fishy to him/her. Chat-bots are the systems that can do chat with humans in natural language. Chat-bots are used in many fields like medicine, entertainment and engineering.
Here we are proposing a chat-bot to be used in clinics for diagnosing psychological disorders. It allows patients to directly interact with it and tell his/her problem openly. The advantage of chat-bot will be easy and correct diagnosis of disorders.
Proposed system consists of a number of modules but can be divided into three core modules:  Generate a reply of user's input.
 Process user input and traverses the decision tree unless a leaf of the tree is reached.
 The decision tree itself.

A. Decision Trees
Decision trees are fast, easily implemented, and simple to understand. They are one of the simplest decision making techniques available. The extensions to basic model can make them extremely sophisticated as well as powerful. They have the advantage of being very modular and easy to create. They can be seen being used for everything from animation to complex strategic and tactical AI [7]. Decision trees can also be learned, and that learning is relatively fast as compared to approaches such as neural networks or genetic algorithms. Decision trees can be used in chatbot's to improve its performance [17]. Given a set of knowledge, we need to generate a corresponding action from a set of possible actions. The mapping between input and output may be quite complex. The same action will be used for many different sets of input, but any small change in one input value might make the difference between an action being sensible and an action appearing stupid. For example if we ask the user whether he/she knows cricket, their answer may be positive or negative. If it is positive, it makes sense to ask whether they like bowling or batting but if it is negative, asking the same question is meaningless and stupid.

1) Decision Trees
In Psychological Chatbots as described in System Design portion, the system needs to make a decision against each and every input from user. So decision making is the middle component of our AI model. The idea is that user will enter the text and the system will process it. At this point system also has to decide what to ask next in the conversation. This decision making is very important as for a proper and seamless functioning of system; otherwise it will look strange or perhaps horrible. We choose to use Decision Trees for our decision making requirements because of their simplicity and power.
A possible structure of decision tree can be seen in Fig. 2.
2) Flow of System: The system flow will be:  User will enter text message into chat window.
 Message will be split into sentences.
 Then separately each sentence is further splited into phrases.
 Synonyms of phrases are taken from knowledge base -New sentences are generated using synonyms (max 20 to 30 sentences) -Search for questions in brain. One of the generated questions will match, serve one of its answers at random otherwise if no question matches, topic will be changed.

Pseudo Code
Following is the pseudo code of our proposed system: www.ijacsa.thesai.org

1) Start 2) Random (User text first or Aquabot's text first)
3) Wait for user's input 4) Process answer 5) Split message into sentences 6) Split each sentence into tokens 7) Get synonyms of each token 8) Use synonyms to generate new sentences 9) Search for questions in brain 10) If question found then generate answer and serve on screen.

B. Screen Shots
The system developed is a normal chatbot which can be used for entertainment purpose for general chat. This is shown in Fig. 3. The aquabot is also a psychiatrist which can diagnose neurosis problems. Initially achluophobia is diagnosed with help of questioning answering. On the basis of answers user gives it is decided whether user is victim of achluophobia or not. The psychiatrist chatbot for achluophobia is shown in Fig. 4.

C. Working of Aquabot 1) Natural Language Processing NLP:
In diagnosis process when aquabot ask any question from user the answer is processed using following Natural Language Processing methodologies [16].

2) Tokenization:
The sentence of answer typed by user is splatted into tokens and then each token is saved for comparison.
3) Keyword extraction: Each token is checked and compared to the words which can explain intensity of any symptom or keywords.
4) Similarity matching of sentence: After each token comparison, the whole sentence's similarity is also matched for confirming whether the keywords are used in the same context to explain the symptom intensity or in some other meanings shown in Fig. 5.

5) Understanding meaning of Keywords:
After the similarity matching, the keywords are mapped to the severity of symptom; here four levels of symptom severity are used, i.e. normal, minor, average and severe.
In case the keyword explaining the symptom's, severity is found in user's answer, the keyword is saved after mapping to severity level. In this fashion, all the question regarding the diagnosis are asked. When questioning session is completed then the entire symptoms saved are checked and the decision tree gives the result of diagnosis by depth First Search technique shown in Fig. 6.
If the answer of user does not contain the words explaining the severity of any symptom and no keyword can be mapped by similarity matching of sentence then the same question is asked again. The same question when asked again, it is made easier and different options are added to it, which tells user what to response in this question, shown in Fig. 7. www.ijacsa.thesai.org   Aquabot is a framework proposed for using a chatbot as virtual assistant of a psychologist in clinics. The framework is divided into three parts: Psychological Counseling (on bot's window), Natural Language Processor (NLP) and rule base (contains rules about diagnosis of autism and achluophobia). Fig. 8 shows the framework of aquabot. This work intends to design a rule based diagnostic expert system [10]. It will take answers to ask question as input and process it and ask the next suitable question according to inference building. Thus diagnosis will be done on input symptoms by traversing a decision tree. Sample of rules for diagnosing autism is given below:

Rule 1
If: Response to own name. (Always) Then the subject knows own name.

Rule 2
If: Response to own name. (Never) And knows own name. (Not at all) Then the child may have any have any developmental disorder.

Rule 337
The subject is more towards average autistic category And Fearful or anxious. (Never) Then the subject is categorized under average autism.
Sample of rules for diagnosing achluophobia is given below:

Rule 1
If: Liking night time. (Always) Then subject is not afraid of night time.

Rule 2
If: Liking night time. (Never) And Feel comfortable in sleep. (Never) Then subject may have any sleep disorder.

Rule 195
The subject is more towards minor achluophobia category. And Night time or darkness is biggest stressor. (Always) Then subject is categorized under minor achluophobia. The psychological disorders, which are diagnosed by aquabot are autism and achluophobia (fear of darkness). Four categories are made in term of diagnosing both disorders, these categories are given below: www.ijacsa.thesai.org  Normal case.
 Minor case.
 Average case severe case.

A. Diagnosis Observations
When aquabot is tested in clinics for diagnosis of achluophobia and autism, the following results were observed.

B. Diagnosis Accuracy
The decision made by aquabot for diagnosis of achluophobia and autism disorder was then proved by human psychologist and percentage accuracy is calculated. Standard deviation of aquabot's and human psychologist diagnostic scores is also calculated.

1)
Achluophobia Diagnosis: Table 3 shows percentage accuracy of aquabot's diagnosis of achluophobia. For diagnosing achluophobia, patients of three age groups are tested using aquabot. In each age group there were 10 patients. Out of 10 persons of group one, seven were females and three were males. In group two we had five females and five males. In group three there were nine females and one male patient. Accuracy of diagnosis and standard deviation is given in Table 3 below.
In Fig. 9, percentage accuracy of aquabot's achluophobia diagnoses is plotted, when compared to human psychologist's diagnoses. We assume that human experts are 100% accurate as compared to any diagnostic system like aquabot. On y-axis percentage accuracy is plotted. On x-axis age groups are plotted. a) Autism Diagnosis: Table 4 shows percentage accuracy of aquabot's diagnosis of autism disorder in children. For diagnosing autism, aquabot is tested on patients of three age groups. Parents (usually mothers) and caretakers of autistic children, answer the aquabot's diagnostic questions. First group comprise of children whose age range is one years to three years. Out of ten children four were females and six were males. In group two we had fifteen patients, eight females and seven males. Age range of group two is four to six years. In group three, there were fifteen patients, five females and ten males. Age of group three patients was seven years or more than seven years.
In Fig. 10 percentage accuracy of aquabot's autism diagnoses is plotted, when compared to human psychologist's diagnoses. We assume that human experts are hundred percent accurate as compared to any diagnostic system like aquabot. On y-axis percentage accuracy is plotted. On x-axis age groups are plotted.

VI. CONCLUSION
Aquabot is a normal chatbot which can be used for entertainment. As well as it is an assistant of clinical psychologist for diagnosis of achluophobia and autism disorder, this can assist a human psychologist in clinics. This will be very helpful in diagnosis of achluophobia and autism and it will save time and resources as well. The proposed technique aquabot proves to be very useful in psychological counseling process in psychology clinics. It helps in saving human psychology expert's time. Aquabot is also a new and beneficial application of chatbots. In future, the aquabot can be extended. Here in this thesis work we use just use two psychological problems to be diagnosed. Like this aquabot can be used for more psychological problems diagnoses. Aquabot can even be extended for taking and saving case history of physical disease. In this way, human expert doesn't have to take case history manually, which will of course save time. Another future direction could be using chatbots for treatment of psychological disorders. The human psychologist uses the method of counseling for treatment of psychological problems. Same type of counseling can be done using a chatbot. Using chatting through a chatbot for relaxing a person having some psychological problems like depression etc. is possible. In future aquabot can be combined with some techniques which capture facial expression of user; it will be helpful in drawing true picture of user's psychological condition.