[net.lang.prolog] Logic Programs with Uncertainties

Koen%UCLA-CS@sri-unix.UUCP (11/11/83)

From:  Koenraad Lecot <Koen@UCLA-CS>

Prerequisites: Paper,  Shapiro IJCAI-83
               Prospector - Probabilistic RQ%}easoning

Hi everybody,

I hope some of you are familiar with the paper by Ehud Shapiro on
Logic Programs With Uncertainties that appeared in the Proc. of
IJCAI-83. I encountered a few problems when trying to use his
interpreter for Prospector.  His interpreter:

  solve(true,[]).
  solve((A,B),[X|Y]) :- solve(A,X),solve(B)
  solve(A,F(S)) :- his_clause(A,B,F),solve(B,S).

F is called a certainty function, is monotone increasing and maps
a list into some numeric value in [0,1]. Of course, when you read
his paper it's all clean and clear. The question is, how useful
is it for existing expert systems ?

One feature Prospector and Mycin have in common is that all evidence
for  a particular hypothesis is collected before any conclusion is
made. In  Prospector, for example, there are two ways of combining
evidence:

  1. logical combinations
  2. multiple pieces of evidence

If a hypothesis has multiple pieces of evidence, each will influence
the probability of the hypothesis independently of the other. Note
that Prolog needs only one piece of evidence. On the other hand, the
antecedent of an inference rule may also be a logical combination of
evidences using the logical operators AND,OR and NOT. We note that
Prospector makes a difference between

  H <- E1
  H <- E2
and
  H <- E1 OR E2

where Prolog does not. The probabilities of logical combinations are
simple fuzzy set formulas: P(A AND B ) = min {P(A),P(B)}

                    P(A OR B ) = max {(P(A),P(B)}
                    P(NOT A) = 1 - P(A)

The probability of a hypothesis with multiple evidence is defined
as some expression P(H|E') = product of the likelihood ratio for
each evidence.

A problem occurs when trying to apply Shapiro's method to Prospector.
The question is how to deal with multiple evidence. My solution is to
change his interpreter into something like below:

% we assume that all prior probabilities where defined by the domain
% expert the problem is to compute posterior probabilities

  solve((A,true),V) :- solve(A,V).
  solve((A,B),V) :- solve(A,V),V1),solve(B,V2),min(V1,V2,V).
  solve((A;B),V) :- solve(A,V),V1),solve(B,V2),max(V1,V2,V).
  solve(A,V) :- rule_head(A),setof0(B,clause(A,B),Bodies),
                solve_list(Bodies,List),compute(A,List,Value).
  solve(A,V) :- fact(A), ask the user for his estimate or use the
                prior probability

  solve_list([],[]).
  solve_list([H|T],[VH|VT]) :- solve(H,VH),
                               solve_list(T,VT).

rule_head(A) and fact(A) are defined on the knowledge base which is
stored on a separate file. this file is consulted using a special
"consult" that keeps track of the database references.  I should
note here that Peter Hammond did basically the same thing for his
Mycin in Prolog. ( AS - Imperial College - 1981 )

The question for me is: are we still within the semantics of
Logic  Programs with Uncertainties as Shapiro defines them ? Does
it matter ? Shapiro does not mention multiple evidence in his paper
as this is not pure Prolog. Has anybody a cleaner solution ? All
comments are welcome.

Thanks,

-- Koenraad Lecot

P.S.:  I am not defending Prospector's way of handling uncertainty.
       I only tried to use Shapiro's interpreter.