Fiabilitate si Durabilitate - Fiability & Durability No 1/ 2018 Editura “Academica Brâncuşi” , Târgu Jiu, ISSN 1844 – 640X 246 USING EXPERT SYSTEMS TO DESIGN MECHANISMS Ph. D. Student Anca-Olimpia MOSNEAGA (TALAAT-HAMID), Ph. D. Iosif TEMPEA, ―Sfantul Sava‖ National College, 23 General H. M. Berthelot St., Bucharest, Romania University POLITEHNICA Bucharest, 313 Spl. Independentei, Bucharest, Romania e-mail: iosiftempea@yahoo.com, ancamtal@yahoo.com Abstract: Expert systems, as a component of Artificial Intelligence. are used on an increasingly wider scale to solve certain problems in various fields. In this paper, we are describing the structure of an expert system used to design mechanisms. Keywords: mechanism, database, expert system, knowledge acquisition, inference mechanism. 1. Introduction Expert systems are a distinct category of informatics systems incorporating artificial intelligence that can simulate the reasoning of human experts using computer programmes and databases [1]. Just like any other programme, expert systems have an algorithmic structure, but they are open to improvement by developing a knowledge database and a set of inference rules [3]. Since the system is capable of acquiring new knowledge by including the results of the inferences made in its own knowledge database, the solutions provided by the system for the same problem, may vary, due to the new knowledge acquired. The experts system‘s capacity to respond to a requirement within a certain time interval that has to be as short as possible, depends on the size of its knowledge database and the way this database has been structure. But, the larger the knowledge database, the more accurate the results obtained. Also, the correctness of the inference mechanism, the accuracy with which the knowledge is combined in order to issue a solution, shall determine the extent to which the result of an inference can help solve the initial problem. Thus, there must be a balance between the size of the knowledge database + the knowledge acquired and the speed in finding a solution to the problem. 2. Expert system’s structure In order for an expert system to function, one must go through the following stages:  Knowledge acquisition  Knowledge representation  Knowledge processing  Displaying the results According to the stages listed above, an expert system shall comprise the following modules: [2]  Knowledge acquisition module  Module database  Facts database  Inference mechanism mailto:iosiftempea@yahoo.com mailto:ancamtal@yahoo.com Fiabilitate si Durabilitate - Fiability & Durability No 1/ 2018 Editura “Academica Brâncuşi” , Târgu Jiu, ISSN 1844 – 640X 247  Result explaining module  User interface 2.1. Knowledge acquisition module The core element of an expert system is the body of all specialised knowledge accumulated in the knowledge database. In order to acquire knowledge, one must set up some teams made of knowledge engineers and human experts in the field of mechanisms design. The knowledge engineers shall design the knowledge database, they shall build the knowledge acquisition module and they shall update the knowledge database. The human experts shall provide factual knowledge based on specialised books as well as heuristic knowledge based on the good practice principles learned during their working experience in the field. Fig. 1 Elements of a knowledge acquisition module 2.2. Knowledge database and facts database The body of all knowledge used to determine any solution represents the knowledge database. Following the acquisition of such knowledge, the knowledge engineer reflects this knowledge by designing the knowledge database as a set of data structures. In case of an expert system using inference mechanisms based on production rules, the knowledge database will be made of rules and facts database. In the rules database, one will store the rules that will be usable to solve the initial problem. [5] The facts database will comprise the problem‘s initial data, as well as intermediary data obtained while applying the production rules, via the inference mechanism. One fact will be described using three characteristics:  object - a mechanism component found in a certain state that can be deduced.  state – the state in which the object is found or the object‘s relationship with other components of the mechanism.  quantification – a value indicating the size of the object‘s state. The intermediary data represents the rules‘ snapshots. The use of these snapshots depends on the rules application priority and the conflict resolution system. Thus, the intermediary data is arranged in the facts database according to its priority. Fiabilitate si Durabilitate - Fiability & Durability No 1/ 2018 Editura “Academica Brâncuşi” , Târgu Jiu, ISSN 1844 – 640X 248 2.3. Inference mechanism The inference engine is a programme applying the knowledge stored in the knowledge database on the facts stored in the facts database, in order to generate new facts or a solution to the problem, by induction or, in order to confirm or infirm a hypothesis by deduction. . Fig. 2 Block sketch of an inference mechanism 2.4. Result explanation method The stages the inference mechanism goes through, the rules applied during each of these stages, shall be displayed in front of the user via the result explanation module. This way, any eventual errors within the knowledge database shall be discovered, as well as any eventual incorrect or wrongly applied production rules. 2.5. User Interface The user interface is used to insert the input data, to display the results and the explanations related to the way the expert system has reached its current solution. It is important for the interface to be as friendly as possible. Fiabilitate si Durabilitate - Fiability & Durability No 1/ 2018 Editura “Academica Brâncuşi” , Târgu Jiu, ISSN 1844 – 640X 249 3. Knowledge representation The knowledge that must be represented in the expert system‘s knowledge database consists of the data and information received by the knowledge engineer from the human expert, via the specialised literature [2]. The knowledge representation methods are specific to the chosen programming language and the inference mechanism. The procedural methods used to represent the knowledge are based on algorithms and they may be: production rules, decisional trees and neuronal networks. Out of the declarative methods, the most widespread is the frame method [6]. 3.1. Production rules The knowledge representation method based on production rules is similar to human reasoning, relying on the cause-effect principle. The expert system‘s knowledge base shall be built on the factual and heuristic knowledge held by the human expert and it shall be represented as a set of type [4] rules: IF condition THEN result The result may be:  a set of parameters representing a new fact set to be added to the facts database [4]  the display of a message requiring the introduction of new parameters  adding a new rule in the rules stack/queue . The production rules must simulate human reasoning, carrying out the same inferences based on facts. A deductive expert systems, will start from the initial data (facts), then the rules in the knowledge database will applied one by one in order to determine a result. An inductive expert system will start from the result (purpose) and it will look for rules that can be applied in order to demonstrate the proposed result. 3.2. Decisional trees If the knowledge is represented using decisional trees, one shall build the space for the states that the mechanism can be found in and, in order to determine the solution to the problem, one shall use graphs and graph analysis strategies. The graph nodes will be the mechanisms‘ states while the graph curves will be the mechanism‘s transit from one state to another, following an action represented by logic operators. In this case, one will also be able to calculate the minimum cost solution, by attaching an application cost to each operator. The search strategies will be in depth or in wide searches, depending on the problem requirements. 3.3. Frames This knowledge representation method is based on sketches comprising declarative and procedural knowledge. a frame is a structured object comprising information on the object, rules that can be applicable to the object and the way such rules are applied. Frames are an object oriented formalism [6] the connection between various objects being made by applying a method (rule). In expert systems based on frames, the facts are correlated, synthesised band structured in distinct, ranked entities, which leads to simplified algorithms, due to inheritance and to an easy way to add new knowledge. [7] Fiabilitate si Durabilitate - Fiability & Durability No 1/ 2018 Editura “Academica Brâncuşi” , Târgu Jiu, ISSN 1844 – 640X 250 4. Conclusions An expert system is based on the factual and heuristic knowledge held by certain human experts and it is made of a computer programme that uses its knowledge database in order to simulate human reasoning. The efficiency invested in designing the knowledge database and the informatics algorithm created, as well as the way knowledge is represented, shall determine the size and the time needed by an expert system to solve a problem. The development of integrated systems such as CAD/CAE/CAM, as well as the ever increasing volume of data processed, led to the creation of intelligent design systems based on computational algorithms and geometric modelling, as well as the algorithms used in the knowledge representation methods.[7] References 1. Zaharie, Dorin, “Sisteme expert”, (Expert System) DUAL TECH Publishing House, Bucharest, 2005, page 9-15 2. Poole David, Mackworth Alan, Goebel Randz, “Computational Intelligence a logical approach”, Oxford University Press, Oxford, New York, 1998, pag. 9-15, 200-220 3. Carstoiu, D., I., “Sisteme expert” (Expert System) , ALL Publishing House, Bucharest, 1994 page 16-26 4. Gavrilas, Mihai, “Note de curs”, (Course Notes) Universitatea Tehnica ―Gh.Asachi‖, Iasi, http://iota.ee.tuiasi.ro/~mgavril/Simpe/L2.htm 5. Zaharie Dorin, Nastase Pavel, “ Sisteme expert de gestiune”, (Management Expert Systems), Romcart Publishing House, Bucharest, 1993, page 60-87 6. ***, “Note de curs, Inteligenta artificiala si retele neuronale” Universitatea Politehnica Timisoara (Course Notes, Artificial Intelligence and Neuronal Networks) http://www.mpt.upt.ro/doc/curs/gp/Sisteme_inteligente_in_electrotehnica/Inteligenta_artificia la_si_Retele_neuronale_cap1.pdf 7. Butila, Eugen, Valentin, “Rezumat teza de doctorat” (PhD Thesis Summary) Brasov, 2009, pag.6-9 http://www.rrv.ro/rrv/rezumate_teze/2009.09.15_rez_butila_eugen_valentin.pdf http://iota.ee.tuiasi.ro/~mgavril/Simpe/L2.htm