Basic Prolog problem

From: Tjitze Rienstra (tjitze_at_gmail.com)
Date: 10/04/04


Date: 4 Oct 2004 13:41:10 -0700

Hi

I'm working with a knowledge base for which I wrote some predicates
that assert facts which can be deducted from facts that are already
present. The details don't really matter, what I get stuck at is this:

If fact(A, B) is true then fact(B, A) is also true

I could assert fact(A, B) if fact(B, A) exists, which is what I did,
but then I thought that's not a nice solution because it really is
redundant data. I therefore created the rule

fact(A, B) :- fact(B, A).

which, for a reason that was obvious when I saw the output, doesn't
work when fact(B, A) doesn't exist.

Is there a way to implement this rule in a correct manner, without
asserting the facts? I'm sure this is basic stuff but I can't find the
solution anywhere.

Thanks in advance,

T



Relevant Pages

  • Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection?
    ... I tried executing the assert statement twice so that my rules policy can go ... Object facts, Object data, EngineState nextState) ... > connection being handed back. ...
    (microsoft.public.biztalk.general)
  • Re: The Tears Of Finding The Truth
    ... I know in some sense you do, because there's little factual room to disagree, even though you yourself like to deflect to 'HYPERETHNOCENTRISM' and the hatreds as living proof of...? ... And you provided nothing to assert, when I provided a small mountain of evidence and a forum for discussing what it means and entails. ... Your's was a flatus in a blizzard- a pile of not much of anything except your conclusion, which you just stated with no more facts than your own erroneous review, a faked one, taken from a one page reading from somewhere, that clearly shows this: you need to believe you are a giant. ... source and how it fits and then try to sell how I don't understand the causes, and all you had was hyperethnocentrism, and a few other flatulent self blame and blame of america, and it's you who are very very short of minimal study in the issues, the facts. ...
    (rec.martial-arts)
  • Re: BizTalk 2004 :: Fact retriever :: more than 1 data connection?
    ... > at Microsoft.RuleEngine.Rete.Rete.ExecuteInternal(Object facts, Object ... > object factsHndlOut = null; ... >> Simply create and assert more than one dataconnection. ... >> connection being handed back. ...
    (microsoft.public.biztalk.general)
  • Re: How to create a list of sharing variables?
    ... it was actually forbidden explicitly to use assert; ... stored the crossword in an array but as a number of facts field. ... also had the idea to transpose rows and columns but did it by replacing ... Given a general task, where the input consists of some objects (maybe of ...
    (comp.lang.prolog)
  • Re: IFactRetirever -- can we parameterize on already asserted fact
    ... long term facts, but not through the use of DataConnection. ... UpdateFacts method so that I can run the SQL query and populate my cache. ... data has been cached and assert it into the BRE without going to the database. ...
    (microsoft.public.biztalk.general)