|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Unexpected Powerloom truth maintenance behavior....
_______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
||
|
|
|
| Another issue I observed: (defmodule "TEST" :includes ("PL-USER")) (in-module "TEST");; repeat this if evaluating in STELLA (clear-module "TEST") (reset-features) (defconcept person (?x)) (defrelation alive (?x)) (defrelation spouse ((?x person) (?y person)) :axioms (symmetric spouse)) (defrelation married ((?x person) (?y person)) :<=> (and (spouse ?x ?y) (alive ?x) (alive ?y))) STELLA> (ask (forall ?x ?y (=> (and (spouse ?x ?y) (alive ?x) (alive ?y)) (married ?x ?y)))) :NULL_VALUE STELLA> (ask (forall (?x person) (?y person) (=> (and (spouse ?x ?y) (alive ?x) (alive ?y)) (married ?x ?y)))) :NULL_VALUE Shouldnt the above asks work? Is there any error in the asks? I tried (setq *type-check-strategy* :NONE) with no change... Thanks Srini --- On Thu, 8/21/08, Srini Ram <srini_ramaswamy_i@...> wrote: From: Srini Ram <srini_ramaswamy_i@...> |
| Thanks Tom, The :NONE issue was at the source of most of my problems....Its fine now. I had tried with parens around variables, but it hadnt worked. I guess the :NONE was the issue there. (ask (forall (?x ?y) (=> (and (spouse ?x ?y) (alive ?x) (alive ?y)) (married ?x ?y)))) Evaluation aborted. Same query seems to work now with the :NONE issue fixed.. As for why I didnt see the error, it was because I am using slime, and the error is actually seen in another buffer (the actual lisp process) which I was not monitoring. Thanks Srini --- On Thu, 8/21/08, Thomas Russ <tar@...> wrote: From: Thomas Russ <tar@...> |
| Hi Hans Can do...Will assert types explicitly. I am experiening the following issue: With following definitions: (defconcept person (?x))
I get the following correct response;(defrelation alive (?x)) (defconcept live-person (?x person) :<=> (alive ?x) ) (defrelation spouse ((?x person) (?y person)) :axioms (symmetric spouse)) ;; (defrelation married ((?x person) (?y person)) ;; :<=> (and (spouse ?x ?y) (live-person ?x) (live-person ?y) )) (assert (spouse jack jill)) (assert (and (alive jack) (alive jill))) STELLA> (retrieve all (married ?x ?y))
But by changing the definition of married as follows:There are 2 solutions: #1: ?X=JILL, ?Y=JACK #2: ?X=JACK, ?Y=JILL STELLA> (retract (alive jack)) |P?|(ALIVE JACK) STELLA> (retrieve all (married ?x ?y)) No solutions. (defrelation married ((?x live-person) (?y live-person))
I get an erroneous answer:<=> (and (spouse ?x ?y) )) STELLA> (retrieve all (married ?x ?y))
Just to checkThere are 2 solutions: #1: ?X=JACK, ?Y=JILL #2: ?X=JILL, ?Y=JACK STELLA> (retract (alive jack)) |P?|(ALIVE JACK) STELLA> (retrieve all (married ?x ?y)) There are 2 solutions: #1: ?X=JACK, ?Y=JILL #2: ?X=JILL, ?Y=JACK STELLA> (retrieve all (married ?x ?y)) There are 2 solutions: #1: ?X=JACK, ?Y=JILL #2: ?X=JILL, ?Y=JACK STELLA> (ask (live-person jack))
UNKNOWN Explanations not helpful: STELLA> (set-feature justifications)
Nor does this:|l|(:JUSTIFICATIONS :EMIT-THINKING-DOTS :JUST-IN-TIME-INFERENCE) STELLA> (retrieve (married ?x ?y)) There is 1 solution so far: #1: ?X=JACK, ?Y=JILL STELLA> (why) |kv|(<|i|@PRIMITIVE-STRATEGY,|i|@EXPLANATION-INFO>) 1 (MARRIED JACK JILL) follows STELLA> (set-feature trace-subgoals)
|l|(:TRACE-SUBGOALS :JUSTIFICATIONS :EMIT-THINKING-DOTS :JUST-IN-TIME-INFERENCE) STELLA> (retrieve (married ?x ?y)) There is 1 solution so far: #1: ?X=JACK, ?Y=JILL PATTERN: [F,F]
| GOAL: (MARRIED ?x ?y) | SUCC: ?X=JACK ?Y=JILL truth=T This is a bit disappointing since the ability of PL to classify dynamically and have rules being applicable based on that dynamic classification is very useful. In the above example, it does not seem that the dynamic classification is happening. I tried to force re-evaluation just in case the reevaluation of married needed a trigger: STELLA> (process-definitions)
but that didnt work...COMMON-LISP:NIL STELLA> (retrieve (married ?x ?y)) There is 1 solution so far: #1: ?X=JACK, ?Y=JILL Thanks Srini --- On Thu, 8/21/08, Hans Chalupsky <hans@...> wrote: From: Hans Chalupsky <hans@...> |
| I just tried to check the rules for my second version of married below and found: (print-rules married) (/PL-KERNEL-KB/FORALL (?x1 ?x2) (<= (SPOUSE ?x1 ?x2) (MARRIED ?x1 ?x2))) (/PL-KERNEL-KB/FORALL (?x1 ?x2) (<= (MARRIED ?x1 ?x2) (SPOUSE ?x1 ?x2))) This does not match what I wrote: (defrelation married ((?x live-person) (?y live-person)) :<=> (and (spouse ?x ?y) )) For some reason, the rules are not converted to FORALL ((?x1 live-person) (?x2 live-person)) (<= (MARRIED ?x1 ?x2) (SPOUSE ?x1 ?x2))) but specified universally. This is why married continues to hold even if jack is no longer live, and why the explanations and traces show married follwign directly from an assertion? Srini --- On Fri, 8/22/08, Srini Ram <srini_ramaswamy_i@...> wrote: From: Srini Ram <srini_ramaswamy_i@...> |
| Free embeddable forum powered by Nabble | Forum Help |