1
votes

i'm new in prolog. i've learn about Qualitative probabilistic networks (QPN) for probabilistic reasoning. A QPN is graphical model of probabilistic influences among a set of statistical variables, in which each influence is associated with a qualitative sign. The algorithm used for reasoning in QPN is sign-propagation algorithm which is as below:

Input: a qualitative probabilistic network,Q

Output: Sign of the influence of evidence node O on each node in the network

procedure PropagateObservation(Q, O, sign, Observed):
for each Vi  ϵ V (G)
do sign [Vi]   ← ‘0’;
PropagateSign (Ø, O, sign).

procedure PropagateSign(trail, to, messagesign):
sign[to] ← sign [to]        messagesign;     *//update the sign of to
trail ← trail     {to};  *// add to to the set of visited nodes
for each active neighbour Vi of  to  given {O}      Observed 
do linksign ← sign of (induced) influence between to and Vi;
    messagesign ← sign [to]      linksign;
    if Vi  ϵ  trail and sign [Vi] ≠  sign [Vi]        messagesign
    then PropagateSign (trail, Vi, messagesign).

V = variables/nodes O = evidence node

This algorithm works with qualitative sign multiplication and addition table (Sorry, i've problem to put those tables here). I wanna write this algorithm in prolog (i use swi-prolog currently). Unfortunately, i have no idea how to start to program this algorithm in prolog since i'm a newbie and not sure whether it can be programmed in prolog. I'm sorry if my question is not very clear. please tell if i need to explain more. Maybe rough ideas from all of u might help. thank u.

1

1 Answers

1
votes

You might want to take a look at the book Prolog Programming for Artificial Intelligence by Ivan Bratko ISBN-13: 978-0-20140-375-6. Chapter 20 is on the topic of Qualitative Reasoning. The companion website http://www.pearsoned.co.uk/highereducation/resources/bratkoprologprogrammingforartificialintelligence3e/ for the book has the example programs available online. You might start by looking at those programs to understand how he implements qualitative reasoning (though not QPN in particular) in prolog.