Hi all,
I would like to present a toy problem with my solution, and get your opinion on it.
The Problem:
There are two people p1 and p2. For each one of them, we have four possible addresses. . p1 may live in a1,a2,a3 and a4. P2 may live in a1,a5,a6,a7. So both may live in a1, but only one of them may live in a2-a7.
If that’s all we know, then the chance of a person to live in any addresses is the same. But if we get information that there is a 50% chance that p1 and p2 are married, than their chances of living in a1 are much higher.
I defined the following predicates:
1. PossibleAddress/2 - closed
2. PossiblyMarried/2 - closed
3. LivesAt/2 - open
4. Married/2 - open
And the rules are:
Prior rules.
5: !LivesAt(P,A)
5: !Married(P1,P2)
Next rule(constraint) states that the sum of the probabilities that a person live in an address is 1.0:
LivesAt(P,+A) = 1.{A:PossibleAddress(P,A)}
Now for the rule about married people living in the same address, and people that live together may be married:
30: PossiblyMarried(P1,P2) & PossibleAddress(P1,A) & PossibleAddress(P2,A) -> LivesAt (P1,A)| LivesAt(P2,A) | Married(P1,P2).
The last rule behaved a bit strange. At the end I duplicated the body to two rules and separated the LivesAt part of the head from the married predicate.
Is that a correct way to answer the initial question? Another approach? I would love to get your feedback.
Thanks, Tzahi
5: Person(P) & Address(A) -> !LivesAt(P,A) # prior rule
5:Person(P1) & Person(P2) -> !Married(P1,P2) # prior rule
LivesAt(P,+A) = 1{A:PossibleAddress.(P,A)} # a person lives in one of his possible addresses
PossiblyMarried(P1,P2) & PossibleAddress(P1,A) & PossibleAddress(P2,A) -> LivesAt (P1,A)| LivesAt(P2,A)| Married(P1,P2)
--
You received this message because you are subscribed to the Google Groups "PSL Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psl-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LivesAt(P,+A) = 1.{A:PossibleAddress(P,A)}
30: PossiblyMarried(P1,P2) & PossibleAddress(P1,A) & PossibleAddress(P2,A) & LivesAt(P1,A) & LivesAt(P2,A) -> Married(P1,P2) ^2
30: PossiblyMarried(P1,P2) & PossibleAddress(P1,A) & PossibleAddress(P2,A) & LivesAt(P1,A) & Married(P1,P2) -> LivesAt(P2,A) ^2
30: PossiblyMarried(P1,P2) & PossibleAddress(P1,A) & ~PossibleAddress(P2,A) & Married(P1,P2) -> ~LivesAt(P1,A) ^2
30: PossiblyMarried(P1,P2) & PossibleAddress(P2,A) & ~PossibleAddress(P1,A) & Married(P1,P2) -> ~LivesAt(P2,A) ^2
MARRIED('p1', 'p2') = 0.707
LIVESAT('p1', 'a1') = 0.356
LIVESAT('p2', 'a1') = 0.356
-D admmreasoner.initialconsensusvalue=ATOM
-D admmreasoner.initiallocalvalue=ATOM