Skip to main content

Example Appication of Forward and Backward Chainning (Printer problem and Eyes problem diagnosis)

In this post, we are going to explore about inference first order logic, especially the forward and backward chainning. What the purpose of forward or backward chainning? is it related to a chain? Well yes or no, yes but in term of logical chain. Chainning in the term of this post is actually a reasonning. So when we talked a forward chainning, in short, we talked about forward reasonning method. as well as backward chainning.
We used reasonning to know or find things or to concluded something from the known data or knowledge base. As an example of data/knowledge base"there's exist X such X is a man and X is Socrates " therfore we can conclude that Socrates is a man. But with term of chainng, we used more variable or data(knowledge base) that can bound each other or with another conclusion (like a chain) but not circular. Example : A is B, B is C therefore A is C.

So...whats the different between forward and bacward chainning then ?
According to (Suyanto,2014) Forward chainning starts from the sentence in knowledge base and then generate new conclusion from the sentence, so it can be used for further inference. Usually, this method will be used when we add some facts to knowledge base and expect the result from logical consequences. Meanwhile, backward chainning starts with something that we wanted to prove, then find implication sentences so that we can come up with conclusion with fact(with premise) we want to prove, based on knowledge base. Of course, backward chainning only gathering fact based on goal/hyphothesis/diagnosis that we want to prove.

Printer Problem



In the video shows how to determine problem of printer. The process is simple by answering yes or no about basic symtomps. This step is requaire to gather the fact and match it with the knowledge base to find the right problem and solution. So because the expert system gather the fact first and then concluded it, so the method used is forward chainning.

We can see the knowledge base of the expert system at 0:16 . The form of question has been built based on the common problems that frequently occur at printer, just like a printer technician would ask you when we wanted to repair the printer, so this is the whole point of expert system to mimic the experts. Also, at that time (0:16-0:20) we see the rule or premiss that system build (knowledge base) so the computer can start the inference, this important part, if you want to get an accurate conclusion add the detail or make more rules(premisses). At 0:39-1:30 we see the interface of how program is used and give the result. So the user answer is matched(look at 0:20 it match with chain rules G2,G8,G9) with the knowledge base and it says or draw the conclusion as "P3-Toner Printer".

Eyes Problem Diagnosis
Different with the previous example, this video gives the reverse logic or backward chainning method. Why? Because the goal is to find prove to support hyphothesis. If the hyphothesis is not supported with knowledge base or fact that follows, then its wrong. In practical situation we often guessing something with lack of support evidence or in finding the supported evidence we, intentionally or not, are leaving other important fact and then judge the conclusion with unreasonable logical consequences. In this example, for instance someone has eye pain and search the diagnosis through, say it, WebMD or Alodokter, then did self-diagnosis. I mean, its not wrong just its not practical because, usually, the doctor in internet can't get full information about patient symptoms to suggest or conclude something other than to invite to come to the nearest hospital.


In the video you can skip to program interface at 50:47, basically in backward chainning we have to hyphothesis something and then find proof  based on logical consequences from knowledge base. Example from video is 'ulkus kornea' after that pop up some supported question to clarify the fact. If the fact is all true and match then system automatically give confirmation about hyphothesis is true or not. Another example is "trakoma" the video shows even 1 premises or fact is false then the hyphothesis cannot be proved or wrong/false.

Reference
Suyanto.(2014).Artificial Intelligence Searching-Reasoning-Planning-Learning. Banding: Informatika.
Leondes, C. T. (1998). Fuzzy Logic and Expert Systems Applications (Neural Network Systems Techniques and Applications) (Vol. VI). (C. T. Leondes, Penyunt.) San Diego: Academic Press.


Comments

Popular posts from this blog

Permainan Bola Tangan

Langit Merah

3D Rotational Matrix (Matriks rotasi 3 dimensi) Roll, Pitch, dan Yaw