I think John Goalby wrote:
> If I understand the previous posts correctly, backward-
> chaining was achieved in Jess using forward-chaining and
> so one is really just the "opposite" of the other?

This is a two part utterance: yes, Jess implements backward chaining
in terms of forward chaining. It's modeled on something originally
implemented in, I think, the old ART shell. Whether one can say
b.c. is the opposite of f.c. depends on what "opposite" means, I
guess. 

> 
> Can any problem be solved with relative ease using either
> forward or backward chaining or is it the case that certain
> problems lend themselves to a particular approach?
> 

Theorem-proving kinds of problems can eb easier to solve with backward
chaining. These are the kinds of things to which Prolog is
particularly well-suited. 

> It has seemed to me that modelling database access is easiest
> achieved using backward-chaining.

That's certaibly one way, and Thomas Barnekow's brilliant work is an
excellent example of this.

> 
> Would it be possible to use forward-chaining to perform
> database queries?  Would it be natural?


Sure; you'd just need to write explicit rules.

"If I'm supposed to evaluate something for student ?x and I have
(record ?x), then (calculate-something) (assert (done))".

"If I'm supposed to evaluate something for student ?x, and I have no
(record ?x), then assert (fetch-from-database ?x)". 

"If (fetch-from-database ?x) then (fetch-record ?x) (assert (record
?x))" 

Jess's backward-chaining lets you do this in only two rules. No huge
savings. 

> 
> Does it really depend on how you state the problem to
> be solved or are there determining factors that lead
> one to use a method over another?
> 

It depends on how the problem is stated, I think, more than anything
else. 


> Thanks
> 
> John.
> 
> ----Original Message Follows----
> In Jess, the pattern (not (q)) means there is no fact (q).
> 
> In Jess's backward chaining, you write a special kind of rule that can
> generate (q), and it is triggered when a (q) fact would be matched but
> there isn't one -- i.e., when (not (q)) is true. The other premises of
> this special rule would collectively be 'p' in your example.
> 
> So if something is interested in (q), but there is no (q), the special
> rule is triggered -- but it will only fire if (p) is true. Therefore
> in a real sense,  (p) implies (q), and (not (q)) implies (not (p)) --
> i.e., if (q) can't be created, it is because (not (p)).
> 
> So I think what Jess does matches your textbook description rather
> well, given the forward-chaining framework in which it works.
> 
> I think Patrick Tang wrote:
>  > Hi,
>  >
>  > I want to ask a general question on backward chaining in rule system,
>  >
>  > I have found some books on logic and they have  definition on backward
>  > chaining as follows,
>  >
>  > given a rule,  p implies q,
>  > then by backward chaining, it need to start with  (negation q),  to
>  > imply (negation p),
>  > i.e.  ~q implies ~p, that is their definition on backward chaining.
>  >
>  > But in many rule systems Jess, they perform backward chaining without
>  > any negation,
>  > why are the differences ?
>  >
>  > Thanks
>  >
>  > Patrick
>  >
> 
> 
> 
> 
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> Org. 8920, MS 9012                  [EMAIL PROTECTED]
> PO Box 969                  http://herzberg.ca.sandia.gov
> Livermore, CA 94550
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify 
> [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to