Re: Assertion followed by retraction leads to error state...

Hans Chalupsky <[email protected]> Fri, 26 Sep 2008 18:10:21 -0700
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Srini,

a proposition has at most one truth value per module or context.  So,
when you asserted `(not (person jim))', it replaced the previously
asserted default truth value with FALSE (had the previous assertion
been a strict truth, it would have complained about a contradiction).
PowerLoom doesn't keep a history of prior truth values, so there is no
way to get back to the previous truth value with a retraction.

You might be able to get half of what you want by using `unassert'
instead of retract.  With `unassert' you don't have to remember
whether you asserted a truth or falsity.  So, you can simply call
`unassert' before each new assertion that might override a previous
truth value.  Conceivably, we could invent a command that combines the
two into one.  For example,

STELLA(3): (defconcept person)
|c|PERSON
STELLA(4): (unassert (person joe)) ;; ok, even if nothing was asserted yet
|P?|(PERSON JOE)
STELLA(5): (assert (not (person joe)))
|P|(NOT (PERSON JOE))
STELLA(6): (unassert (person joe))
|P?|(PERSON JOE)
STELLA(7): (assert (person joe))
|P|(PERSON JOE)
STELLA(8): 

Hans

>>>>> Srini Ram <[email protected]> writes:

> I am experimenting with default truths and retraction...
STELLA> (presume (person jim))   ; assume that jim is a person

> |p|(PERSON JIM)

STELLA> (ask (person jim))

> TRUE

STELLA> (assert (not (person jim)))  ;; we are told
> specifically that jim is not a
> person             

> |P|(NOT (PERSON JIM))

STELLA> (ask (person jim))          ; ok
> FALSE

STELLA> (retract (not (person jim)))  ;; retract
> |P?|(PERSON JIM)

STELLA> (ask (person jim))

> UNKNOWN                                    
> ;; wrong, we still have the presume
> ;; so by adding and retracting a fact we wound up

> ;; at a different state from where we started

> What I would like to happen is that new facts should be able to
> override old facts for cases where something can either be true or
> false...Since jim is either a person or not a person, I should not have
> to remember that I asserted that jim was not a person, and have to
> retract it before asserting the new knowledge that jim is in fact a
> person..From a maintenance perspective, this simplifies life a lot if
> we can assert new knowledge and have it simply replace prior (default)
> knowledge.