Creating new skolems within a rule

"Prasan Samtani" <[email protected]> Wed, 11 Jul 2007 10:58:38 -0700
Newsgroups gmane.comp.ai.powerloom
Message-ID <479348D61212AC4DB31C9906F8C7028D02779C73@EXVBE012-5.exch012.intermedia.net>
I'm in the process of creating a multiagent system in Powerloom. I'm
looking for a way to create a new skolem within a rule without
explicitly naming it. Let's say I have a rule that defines how an agent
reacts in a particular situation: 

 

(defrule greeting-rule

            (=> 

                        (and      (conv-opening ?s) (act-addressee ?s
Pierre) (greeted Pierre FALSE) 

                                    (act-speaker ?s ?a) (= (act-time ?s)
(system-time TLTWorld)))

                        (and      (conv-opening pierre-greet)
(act-speaker pierre-greet Pierre)

                                    (act-should-execute pierre-greet
TRUE) (greeted Pierre TRUE) (act-addressee pierre-greet ?a) )

))

 

Every time this rule is triggered, the value of the skolem pierre-greet
is overwritten. Is there a way to create a new skolem in the right hand
side of the rule, such as:

 

(defrule greeting-rule

            (=> 

                        (and      (conv-opening ?s) (act-addressee ?s
Pierre) (greeted Pierre FALSE) 

                                    (act-speaker ?s ?a) (= (act-time ?s)
(system-time TLTWorld)))

                        (and      (create-new-skolem ?spr)            

(conv-opening ?spr) (act-speaker ?spr Pierre)

                                    (act-should-execute ?spr TRUE)
(greeted Pierre TRUE) (act-addressee ?spr ?a) )

))

 

This way, every time the rule is triggered, a new skolem is created that
has the correct values in its slots. This way, the values of the older
skolems are not overwritten. Is it possible to do this in PowerLoom, or
would you recommend an alternate approach?

 

Thanks,

Prasan

_______________________________________________
powerloom-forum mailing list
[email protected]
http://mailman.isi.edu/mailman/listinfo/powerloom-forum