There's no tutorial guide or anything like that. The basic procedure
is very easy: implement the "jess.Strategy" interface, then use
(set-strategy <classname>) to load it into Jess. There's really just
the one compare() method to write; it's supposed to implement the
"spaceship operator" (ie., comparison that returns negative, 0, or
positive to indicate how the activations should be ordered.) As long
as your ordering is internally consistent, it can be anything you
want. You can even ignore salience if you'd like, so that a perfectly
valid implementation could be something as simple as

/**
 * A Jess conflict resolution strategy that gives priority to 
 * rules with more patterns.
 */
public SizeStrategy implements jess.Strategy {
    public int compare(Activation a1, Activation a2) {
        return a1.getToken().getSize() - a2.getToken().getSize();
    }
    public String getName() { return "size"; }
}




I think Bogdan Werth wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
> I just wondered whether there are any place where I can get some more 
> information about how to write your own conflict resolution strategy for 
> Jess. There is a bit of information about this issue in "Jess In Action" 
> but not enough to start your own development. I am doing agent based 
> modeling with Jess and RePast and one of developments in the course of 
> my PhD will be to implement a conflict resolution strategy  sound and 
> consistent with a formal logic or, more likely, several  conflict 
> resolution strategies based  on several logics.
> 
> Many thanks in beforehand.
> 
> -- 
> 
> Bogdan Werth
> Doctoral Researcher Centre for Policy Modelling
> The Graduate School of Business
> Aytoun Building
> Aytoun Street
> Manchester
> M1 3GH
> UK
> Tel: +44 161 247 6481
> Fax: +44 161 247 6802
> Email: [EMAIL PROTECTED]
> Web: http://cfpm.org/~bogdan
> 
> **************************************************************
> Before acting on this email or opening any attachments you
> should read the Manchester Metropolitan University's email
> disclaimer available on its website
> http://www.mmu.ac.uk/emaildisclaimer
> ***************************************************************  
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to