John Ternent wrote:
> Is there a rule of thumb that points to the problem being unsuited for
> solution by Rete, or do you just have to set it up and see that some
> facts require the "or" logic? My only hint that something was going
> wrong was that as I added a constraint which I thought was an "and"
> constraint and would narrow the search space, it increased by the number
> of solutions available for the constraint.

I'm not sure there's a rule of thumb. In this case there were some
giveaways in the problem statement:
 - it was labelled as a 'logic puzzle', so my first thought was: Prolog!
 - there were one or two 'or'-s in the problem description. This
generally means you have to be able to try one possibility, and if this
fails, try the other (next), i.e. you need backtracking. Again: Prolog!

In general the combination Prolog (backward chaining, backtracking) +
CHR (forward chaining) is a very powerful problem-solving tool. Jess
only has forward chaining and a limited form of backward chaining (also:
no backtracking!). Also, I think the performance of CHR compilers is
generally far better then Jess (a bold statement to make on the Jess
mailing list, I know ;-) ).

> 
> Here's as far as I got with the problem:
> 
I'm sorry, I'm not very good at reading Jess code. Maybe someone else
can comment on this?


CHeeRs,
Peter
begin:vcard
fn:Peter Van Weert
n:Van Weert;Peter
org:K.U.Leuven;Computer Science
adr:room 01.05;;Celestijnenlaan 200A;Heverlee;;3001;Belgium
email;internet:[EMAIL PROTECTED]
title:DTAI (Declarative Languages and Artificial Intelligence)
tel;work:+32 16 327665
x-mozilla-html:TRUE
url:http://www.cs.kuleuven.be/~petervw/
version:2.1
end:vcard

Reply via email to