Personal Blog : My OUM(Open University Malaysia) journey starting from Jan 2011 till graduate.
Everyone can copy the contents in this blog and please leave some credit or a backlink to me... -Thank You-

Monday, April 8, 2013

Comparison between case-based reasoning, model-based reasoning and rule-based reasoning

Case-based reasoning.
Case-based reasoning is a means to use previous experiences to solve new problems encountered. Dfki.uni-kl.de define case-based reasoning as “A case-based reasoner solves new problems by adapting solutions that were used to solve old problems”. (Riesbeck & Schank, 1989). In other words case-based reasoning is a methodology to human reasoning and thinking for building intelligent computer systems. In case-based reasoning techniques, there are four phases of problem solving:
§  Retrieve. Take the case of a similar nature to be used for the present troubles..
§  Reuse. Using the selected cases to be adapted to the proposed settlement in order to resolve the problem..
§  Revise. Ensure that the solution chosen and tested.
§  Retain. Maintaining the methods used and stored as learning new ones.
The following are the Advantages of case-based reasoning techniques compare to another two.

a.      High user acceptance

b.     Improve over time and adapt to change

c.      Make use of existing data, for example in database

d.     Problem solving improve from reuse method

e.      Requires less maintenance effort

f.      Reduces the knowledge effort


Model-based reasoning.
 Based on wikipedia.org, they define Model-Based Reasoning as “model-based reasoning refers to an inference method used in expert systems based on a model of the physical world”. In this way, the main focus is the development of a model. Model-based reasoning is used for troubleshooting. It plays a very important role in the system of artificial logic and reasoning in science. The model aims to find out why the system suddenly stops and fails. Simple observation done to solve the problem based on old cases.
Model-Based Reasoning popular technology used in the medical field. For example, a company wants to develop and test a system that reads the heart rate when a person is walking, running and rest. In this case, the system developer needs to create a connection to the human heart. Human heart data should be obtained and model to read this heart to be developed. Users may be able to fill the patient's heart rhythm data. Next make a diagnosis from the data collected and may make assumptions about the disease faced by patients.
Approaches in Model-Based Reasoning is very different from Case-Based Reasoning using long experience to the solution. Model-Based Reasoning can be used for the development of new systems and the Case-Based Reasoning suitable to solve new problems similar to the problem that has been solved before.


 Rule-based reasoning.
  
Rule-based reasoning is a technique that uses the statement "IF-THEN-ELSE". Conditions have been set, and it must be followed. The "if" means "when the condition is true",  "then" means "take action A" and the "else" means "when the condition is not true take action B." Here is an example with the rule:
IF rain is TRUE
THEN
provide an umbrella
ELSE
do not have an umbrella.
Rules can be “forward-chaining”, also known as “data-driven reasoning”. It starts with data and facts, then look at the conditions which are to determine the ultimate goal. On the other hand, it also known as "backward-chaining" or "goal-driven reasoning" that starts with the goal and see the conditions to achieve that goal.
Unlike the two Case-Based Reasoning and Model-Based Reasoning, Rule-Based Reasoning rely heavily on existing conditions that must be followed. No matter whether it is aimed at solving the problems or the development of new models, the conditions have been provided must be adhered to without compromise.
 



KNOWLEDGE MODELING AND REPRESENTATION - PROLOG

Prolog Programming.



(a) Find the last element in weekdays list.
            (i)      %  Find the last element in weekdays list .
% last(X, weekdays) ,  X is the last element of the list weekdays .
% (element, weekdays) (?,?) .
% Note : last(?element,? weekdays)
last(X,[X]).
last(X,[weekdays]).
X=Friday

 




(b) Find the N'th element in weekdays list. (N=2).
            (i)      % Find the N'th element of a list.
% The first element in the list is number 1.
% nth1(X, weekdays,N), X is the N'th element of the weekdays
% (nth1,list,integer) (?,?,+)
% Note to readers: nth1(?Index, ?List, ?element) is predefined.
nth1 (X,[X|_],1).
nth1(X,[_| weekdays], N),  N > 1, N1 is N - 1, nth1(X, weekdays, N1).
X=tuesday
   



(c) Reverse a list
(i)        % reverse(L1weekdays,L2weekdays) :- L2weekdays is the list obtained from L1weekdays by reversing the orders of the elements.
% (list,list) (?,?)
% Note : reverse(+List1weekdays, -List2weekdays) is predefined
reverse(L1weekdays,L2weekdays) , reverse (L1weekdays,L2weekdays,[]).
reverse ([],L2weekdays,L2weekdays) :- !.
reverse ([X|Xsenarai],L2weekdays,M),  reverse (Xsenarai,L2weekdays,[X|M]).









(d) Duplicate the elements in weekdays list.
(i)        % * Duplicate the elements in weekdays list * .
% dupli(X, weekdays) ,  X is the last element of the list weekdays .
% (element, weekdays) (?,?) .
% Note : dupli(?element,? weekdays)
dupli(X,[X]).
dupli(X,[weekdays]).





(f) Drop every N’th element from a weekdays list. (2nd element).
(i)        % drop(L1 weekdays,N,L2 weekdays) :- L2 weekdays is obtained from L1 weekdays by dropping every N'th element.
% (list,integer,list) (?,+,?)
drop(L1weekdays,N,L2weekdays) , drop(L1 weekdays, N, L2 weekdays, N).
% drop(L1 weekdays,N,L2 weekdays,N),  L2 weekdays is obtained from L1 weekdays by first copying N-1 elements
% and then dropping an element , dropping every
% N'th element.
% (list,integer,list,integer) (?,+,?,+)
drop([],_,[],_).
drop([_|Xweekdays],N,Yweekdays,1) :- drop(Xweekdays,N,Yweekdays,N).
drop([X|Xweekdays],N,[X|Yweekdays],K) :- N > 1, N1 is N - 1, drop(X weekdays,N,Yweekdays,N1).





(h) Rotate weekdays list N places to the left. (N=3)





(i) Remove the N'th element from a list. (2nd element)





(j) Extract a slice from a list.(position 2 and 4).


 

Table Grade