Expert System for Determination of Type Lenses Glasses using Forward Chaining Method

One of the branches of computer science that is widely used by humans to help her work is the establishment of an expert system. In this study we will design an expert system for determining the type of spectacle lenses using a forward chaining method. In forward chaining method, starting with the initial information (early symptoms) and moved forward to fit more information to find the information in accordance with the rules of the knowledge base and production, and will be concluded in the form of the type of disorder diagnosis of eye disorders and provide solutions in the form of lenses of eyeglasses. Result from this study is that the match calculation of algorithm of forward chaining method between system and manual calculations produce the same output.


INTRODUCTION
Development of computer technology is rapidly increasing rapidly, of course, there is a computer technology that can solve problems that occur.One branch of computer science that is widely used by humans to help her work is the establishment of an expert system.The expert system is a system that seeks to acquire human knowledge into a computer in order for the computer can solve a particular problem as it is commonly done by experts [1].Specialists in question here are people who have special skills that can solve problems that can not be resolved by the layman.Expert system is an artificial intelligence program that combines pegetahuan base (knowledge base) with inference systems.The workings of the expert system later is by asking questions to the user and the user is expected to answer and enter the answer by selecting one or more of the options provided by the system.Such interactions will continue until the system reaches a conclusion and provide diagnostic results [2].
Until now there have been several developments the results of expert systems in various fields in accordance expertise of someone.One example of the application of expert systems in the field of health, namely the application of eye refractive disorders diagnosis and care tips eye with web-based forward chaining method.In this study we will design an expert system that will produce a solution in the form of corrective lenses by using forward chaining.Forward chaining is a method of finding or conclusion is based on data or facts leading to the conclusion.The type of system that can use tracking technique forward chaining, namely (1) the system is represented by one or more conditions; (2) for each condition, the system looks for some rules in the knowledge base corresponding to the conditions in the if part; (3) every rule can generate new conditions of conclusion requested on the part of then; (4) any conditions added to the system to be processed.If encountered a condition, the system will return to step (2) and are looking for some rules in the knowledge base back.If no new conclusion, this session ends [3].
In building a web-based system would require a database to store the data in the system.MySQL is a software that can manage the database very quickly, can hold data in a very large number.To generate a web page would need a programming language that can help in displaying the page.HTML commonly called a "markup language" is a set of "tags"."Tag" is used to display web pages in a specific display [4].
Definition of the lenses is a transparent medium bounded by two refractive surface of at least one of which curved so happened twice before exiting the lenses refraction.Types of eyeglass lenses available in several forms, ie single vision lenses (for nearsightedness), bifocal lenses (for nearsightedness), progressive lenses (for older eyes), and a cylindrical lenses (for eye cylinder) [5].

METHOD
The method used building expert system for determination of type lenses glasses consists of four stages, namely literature, problem formulation, problem solving and conclusions.A literature study is reviewing the relevant literature will be used to collect data and information needed in research.Data taken from Wijaya Kusuma Optics and Optical sekaran.These data are required to be processed as input data and will be used in testing.Input data is a kind of spectacle lenses, eye disorders disorders, and symptoms of eye disorders, and the output is the result of diagnosis and the solutions recommended by experts.Application of expert system for determining the type of spectacle lenses starting with software development in the process of diagnosing disorders of eye disorders by using a prototype model.With this method of prototyping systems developer and expert specialists can interact with each other during the manufacturing process of the system.Prototype model will be shown in Figure 1.

Figure 1. Model Prototype
In Figure 1 shows that in building a system with a prototype model requires three stages.The first stage is to listen to customers, the second stage of building and repair market, and the third is the customer test control market.
Stages of development of a prototype model, namely (1) listen to the customers, at this stage of the collection needs of the system by listening to complaints from customers.To create a system that fits your needs, then it should be known in advance how the current system and then see what problems occur; (2) design and prototyping, at this stage the design of prototype systems.Prototype created a system tailored to the needs of pre-defined or user of customer complaints; (3) trial, at this stage the prototype of the system is tested by the customer or user.Then do the evaluation shortcomings of customer needs.Builder (developer) then back to listen to complaints from customers to improve the existing prototype.
Examples of forward chaining implementation applied to the 10 rules stored in the knowledge base.The first fact that A and F is true if K also is true according to the rules.Examples of rules in the forward chaining are shown in Table 1 and Table 2.
The main advantages are forward chaining these methods will work well when the problem stems from collecting or bringing together information and then looking for what conclusions can be drawn from such information.But the weakness of this method is the possibility of no way to identify where some more important facts from other facts.

RESULTS AND DISCUSSION
Making the decision tree is used to help simplify the process of knowledge base.The decision tree expert system for determining the type of spectacle lenses can be seen in Figure 2.

Figure 2. Decision Tree Expert System for Determination Type Lenses Glasses
The resulting decision tree in Figure 1 is used as a reference in formulating the rules of production.List of production rules for determining the types of eyeglass lenses based on the type of disorder of eye disorders, and symptoms can be seen in Table 3.

Table 3. Production Rules Expert System for Determination of Type Lenses Glasses
To describe the process flow of data contained in the application of expert system for determining the type of spectacle lenses then be made to the data flow diagram (DFD).Data flow diagram (DFD) applications expert system for determining the type of spectacle lenses can be seen in Figure 3.The second describes the process of the search process that has an inflow and an outflow.The incoming data stream on the second process is a knowledge base that will explore the symptoms of each disorder diagnosis of eye disorders.The flow of data out of the second process is the information diagnosaan disorders eye disorders and solutions leading to pakarlensa database.

RULES PRODUCTION RULES
The third process is the last process describes the process of diagnosis and solution which has two inflow and the outflow.The first incoming data stream in the third process is the information diagnosaan disorders eye disorders and a solution obtained from the database pakarlensa, and incoming data flow both in the form of symptoms that have been input by the user when the consultation.The flow of data coming out of the third process is the diagnosis of disorders of eye disorders and solutions are provided to the user.
Then from the data that has been obtained from experts, built a database design using the entity relationship diagram (ERD).Entity Relationship Diagram (ERD) is one of the relational model that uses the arrangement of data stored in the abstract system.
ERD is an entity relationship models that contain the components of the entity set and relationship set, each equipped attributes that represent all the facts of the real world that will be reviewed, and can be described more systematically.Entity relationship diagram (ERD) application of expert system for determining the type of spectacle lenses can be seen in Figure 4.The accuracy of a system is needed in building applications, to produce the accuracy of a system then tested the validity of the system is done by that test the validity of expert system and test the validity of the system for users.On the validity of the test system to produce experts that forward chaining algorithm method with the system is matched so that the system can work properly, then the system also has a criteria as the systems are compatible browser.It is shown that the system is able to work on each of the different browsers that google chrome, mozilla firefox, internet explorer, opera mini, and safari.But in certain browsers such as Internet Explorer browser, the menu display is responsive bootstrap work.Furthermore, the system has in terms of completeness of data regarding diagnostic data eye disorders spectacle lenses and solutions recommended by experts.And last of all the features contained in the system is going according to the knowledge base.Test the validity of users do thirty seven times with different respondents.This produces some results that seven respondents are not impaired or normal eye of eye disorders, eleven respondents impaired eye disorders myopia, hyperopia three respondents, five respondents presbyopia, two respondents had astiagmatisme, and the last nine respondents did not work properly diagnosed.Test the validity of the system to the user performed on thirty-seven respondents.Twenty-eight respondents declared fit in with the system to test the validity of the diagnosis issued by the system, while nine other respondents did not get an appropriate diagnosis.It provides a level of accuracy of the system where the accuracy of the system in which the number of users who are successful in testing the validity of the system divided by the total number of respondents was multiplied by 100%.By doing the test the validity of the system's users showed that 75.7% system accuracy.

CONCLUSION
Based on the explanations that have been submitted, it can be concluded that the design and build an expert system for determining the type of spectacle lenses by using forward chaining thing to do is to make a decision tree, in order to be easier to change the symptom data, diagnostic data, and data solutions types of eyeglass lenses in the form of production rules (if and then) so that the data that has been provided by the experts can be represented with the system.Later in building an expert system application for the determination of the type of spectacle lenses, web-based writer uses MySQL database that supports the PHP programming language contained in one software package XAMPP.With the accuracy of the results obtained on the validity of the test system generates a 75.7% accuracy rate, it tells us that the expert system for determining the type of eyeglass lenses can help in service Optics and Optical sekaran Wijaya Kusuma.The suggestions for further development of expert systems, the need for additional types of eyeglass lenses solution for users who have multiple eye disorder diagnosis.As well as the use of the language factor more attention in order to produce a system that is user friendly.

R- 1 IFFigure 3 .
Figure 3. DFD Expert System for Determination Type Lenses Glasses In the data flow diagram (DFD), there are three processes, namely the first process the data entry process of symptoms, diagnostic data, and data solutions, both describe the process of the search process, and the third, which describes the process of diagnosis.The first process is the process of data entry of symptoms, diagnostic data, and data solutions have an inflow and an outflow.The incoming data stream in the first process is the symptoms, diagnosis, and solutions.The flow of data out of the first process is data symptoms, diagnosis, and solutions leading to pakarlensa database.

Figure 4 .
Figure 4. ERD Expert System for Determination Type Lenses Glasses table has three attributes, namely atibut ID, kode_gejala, and answers.Each consultation process have a diagnosis tables and table solutions.When consultations, consulting tables have a diagnosis of the diagnosis table and each diagnosis has a solution of table solutions.The relationship between the attribute cardinality consultation with tables diagnosis is one to one, as well as on the consultation table and table solutions is one to one.This also applies to table cardinality diagnosis on the table a solution that is one to one for each diagnosis has only one solution.Atibut owned the diagnosis table that there are four attributes including nama_diagnosa, kode_diagnosa, captions, and kode_solusi.Atibut owned at the table only solution, there are two attributes that kode_solusi attributes, and attribute solution.Each diagnosis is taken knowledge tables and tables of knowledge took a table for each symptom, symptoms may represent a diagnosis in disorders of eye disorders.Each diagnosis disorders have some symptoms of eye disorders.Cardinality relationships between tables diagnosis with knowledge tables is one to many, then the relationship cardinality of the table knowledge with the same symptoms table, which is one to many.Atibut owned at the table the knowledge that there are seven attributes include the attributes ID, sequence, if, ya_tanya, ya_diagnosa, tidak_tanya, and tidak_diagnosa.Atibut held on the tables of symptoms only, there are two attributes that kode_gejala attributes, and attribute nama_gejala.

Table 4 .
Table test the validity of the user are shown in Table 4. Validity Data for users