Re: Hypothetical Reasoning in PowerLoom

lee martie <[email protected]> Mon, 18 Oct 2010 05:44:13 -0400
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
The solution I came up with was to put hypothetical facts in a submodule and
ask my hypothetical question in the submodule.

Thanks.
Lee


On 10/16/2010 10:42 PM, lee martie wrote:
> I am trying to do some hypothetical reasoning in Powerloom but I
> can not figure out how.
>
> Can anyone give me a simple example of the commands I need to use?
>
> For example if I have:
>
> (defconcept city)
>
> (assert (city newyork))
>
>
> (deffunction peopleHappy ( (?c city)) :->  (?i INTEGER)  )
> (deffunction peopleUnHappy ( (?c city)) :->  (?i integer) )
> (deffunction population ( (? city) ) :->  (?n integer) )
>
>
> (defrule unhappy (=>     (>  (population ?x) 75)
>
>               (>= (peopleUnhappy ?x) (- (population ?x) 75) )
>           )
>    )
>
> I would like to ask the following question hypothetically:
> (ask (=>  (= (population newyork ) 100) (>= (peopleUnhappy newyork) 25) ) )
>
> Anyone know how I can do this?
>
>
> Thanks for your time and help.
> Lee Martie
>
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
>