how to use dual knoweldge base for single query?

22 views
Skip to first unread message

Muler

unread,
Oct 17, 2017, 10:25:03 AM10/17/17
to SWI-Prolog

I want to use two different knowledge base from different source for the same problem.  The inference engine works by checking these two knowledge base for input received from the user. After that the check those two knowledge base before decide. When the get the same result display that result to the user. Rather when the result is different they decide based one the highest number of matching attributes. Is it possible to implement these idea on prolog inference engine? Any one  help me.

Thank you!!   

Anne Ogborn

unread,
Oct 18, 2017, 2:50:22 PM10/18/17
to Muler, SWI-Prolog
Some alternatives:

1. add the reifying 'knower' as an argument

believes(sally, loves(bob, sue)).
believes(sally, loves(sue, bob)).
believes(bob, loves(bob, sue)).
believes(bob, loves(sue, bob)).
believes(sue, is_using(sue, bob)).
believes(sue, loves(bob, sue)).

Shame on Sue.

2. use pengines.

someone_believes(X) :- pengine_rpc('http://sally.me', X).
someone_believes(X) :- pengine_rpc('http://sue.me', X).

someone_believes(X) :- pengine_rpc('http://bob.me', X).


So part of this story has to be how we combine the knowledge bases.

Or do you mean you just have two modules and want to combine a predicate from either of them?

someone_believes(X) :- sally:believes(X).
someone_believes(X) :- sue:believes(X).
someone_believes(X) :- bob:believes(X).

bit more detail about where these two knowledge bases are, and what it means to combine them, please.
Reply all
Reply to author
Forward
0 new messages