Re: JESS: Jess: salience

2006-01-13 Thread Dusan Sormaz


I think that this discussion about salience may be related to other post

Re: JESS: Using a rule engine for plan recognition 
if you need to change order of rule firing you may establish control
facts that would trigger or de-trigger executions.
Dusan Sormaz

At 10:25 AM 1/13/2006, you wrote:
I think Yura wrote:
[Charset koi8-r unsupported, filtering to ASCII...]
> > (set-salience-evaluation every-cycle)
> 
> I think that would be really slow.
Only if the agenda is large, but yes, it could slow things down.

> However the problem is quite common, so probably we may use
some
> Java API to reevaluate the salience just once. The question is
which
> one.
The problem is that if you reevaluate the salience of a single
activated rule, then the whole agenda has to be recomputed. You
actually wouldn't gain much, assuming these salience changes were
frequent.
An alternative to every-cycle is when-activated, which will evaluate
the salience of a rule each time that rule is placed on the
agenda. Thus salience changes will affect new firings, but not
activations that existed before the change. This might be just
fine.
-
Ernest Friedman-Hill  
Advanced Software
Research  Phone:
(925) 294-2154
Sandia National
Labs   
FAX:   (925) 294-2234
PO Box 969, MS
9012
[EMAIL PROTECTED]
Livermore, CA 94550

http://herzberg.ca.sandia.gov

To unsubscribe, send the words 'unsubscribe jess-users
[EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify
[EMAIL PROTECTED]




*
* Dušan Šormaz, PhD, Associate
Professor 

* Ohio University
* Industrial and Manufacturing Systems Engineering Department
* 277 Stocker Center, Athens, OH 45701-2979
* phone: (740) 593-1545 
* fax:   (740) 593-0778  
* e-mail: [EMAIL PROTECTED] 
* url:

http://www.ent.ohiou.edu/~sormaz 
*
 



Re: JESS: Jess: salience

2006-01-13 Thread ejfried
I think Yura wrote:
[Charset koi8-r unsupported, filtering to ASCII...]
> > (set-salience-evaluation every-cycle)
> 
> I think that would be really slow.

Only if the agenda is large, but yes, it could slow things down. 

> However the problem is quite common, so probably we may use some
> Java API to reevaluate the salience just once. The question is which
> one.

The problem is that if you reevaluate the salience of a single
activated rule, then the whole agenda has to be recomputed. You
actually wouldn't gain much, assuming these salience changes were
frequent.

An alternative to every-cycle is when-activated, which will evaluate
the salience of a rule each time that rule is placed on the
agenda. Thus salience changes will affect new firings, but not
activations that existed before the change. This might be just fine.

-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




JESS: Jess: salience

2006-01-13 Thread Yura
> (set-salience-evaluation every-cycle)

I think that would be really slow. However the problem is quite common, so
probably we may use some Java API to reevaluate the salience just once. The
question is which one.

Yuri


To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




Re: JESS: salience

2006-01-12 Thread ejfried
I think =?iso-8859-1?Q?=5BEXTERN=5D_Manuel_Kollmu=DF?= wrote:
>  
> I want to change the salience of a rule during process.
>  
> e.g.
>  
> (defrule number1
> (salience 0)
>  

You could use a function call or defglobal to return the salience,
then use (set-salience-evaluation) to tell Jess to reevaluate salience
every time a rule is fired; 

(defrule number1
(salience (get-salience number1))
...

(deffunction get-salience (?name)
  (bind ?s (fetch (str-cat ?name "-salience")))
  (if (eq ?s nil) then
(return 0)
   else
(return ?s)))

(deffunction set-salience (?name, ?value)
  (store (str-cat ?name "-salience") ?value))

(set-salience-evaluation every-cycle)


>  
> How can I do this so that the new salience is save even after a restart
> of the program?
>  

You'd have to store the values yourself in some kind of persistent
store -- a database, etc -- and restore them when the program starts
up.


-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]




JESS: salience

2006-01-11 Thread [EXTERN] Manuel Kollmuß








hi jess
users

 

I want to change the salience of
a rule during process.

 

e.g.

 

(defrule number1

    (salience 0)

 

=>

(if   … then

(“increase
salience”)

 

else

(“decrease
salience”))

 

How can I do this so that the new
salience is save even after a restart of the program?

 

thanks in advance!