[rules-users] Using Drools for modeling with rule-driven agents

Russ Abbott russ.abbott at gmail.com
Sun Aug 23 01:13:46 EDT 2009


Thanks Greg, That sounds quite promising.  I've never used Drools and can't
say how the Rete network will be organized. In fact, before your message I
wasn't aware that Drools allows multiple Rete networks. If that's the case
it seems to make a lot of sense for each agent to have its own. Since the
agents are supposed to be individual and disjoint I was imagining that I'd
have to code an agent's id into its rules to limit those rules from being
applied to other agents. But multiple Rete networks sounds much much
better!  It would be even better if each agent could run its rules
asynchronously in its own thread. Is something like that possible: multiple
threads of rule evaluators running on a single workspace?

-- Russ



On Sat, Aug 22, 2009 at 9:26 PM, Greg Barton <greg_barton at yahoo.com> wrote:

> Yes, rules can be manipulated at runtime.  The class org.drools.RuleBase
> has methods for adding Packages and removing Packages and individual rules,
> and can be called at runtime as demonstrated by Mark in this jira post:
>
> https://jira.jboss.org/jira/browse/JBRULES-1431
>
> I haven't tried it myself, but now that the subject has come up I probably
> will. :)
>
> As for the best approach to do this, I'd suggest that you have your own
> rule representation that generates DRL, then compile that DRL in the
> standard way using the PackageBuilder.  On first blush it may seem best or
> more elegant to try creating Rule objects directly, circumventing the
> PackageBuilder, but that's a waste of time in my opinion. (The main focus
> for support from the drools team is the language and other "external" parts
> of the system.)
>
> So, how will agents interact in your system?  Will each have it's own rete
> network?  Or will several agents share a rete?
>
> --- On Sat, 8/22/09, Russ Abbott <russ.abbott at gmail.com> wrote:
>
> > From: Russ Abbott <russ.abbott at gmail.com>
> > Subject: Re: [rules-users] Using Drools for modeling with rule-driven
> agents
> > To: "Greg Barton" <greg_barton at yahoo.com>
> > Cc: rules-users at lists.jboss.org, "Antony W. Iorio" <
> antony.iorio at gmail.com>, "HusseinAbbass" <h.abbass at adfa.edu.au>
> > Date: Saturday, August 22, 2009, 10:15 PM
> > That's a possibility. But the
> > underlying capability comes first. Can we do it in Drools?
> > Has anyone done it, and if so would you be willing to share
> > your experience?
> >
> > -- Russ
> >
> >
> >
> > On Sat, Aug 22, 2009 at 6:50 PM,
> > Greg Barton <greg_barton at yahoo.com>
> > wrote:
> >
> >
> > This wouldn't happen to involve evolutionary pressures
> > altering rules, would it?
> >
> >
> >
> > --- On Sat, 8/22/09, Russ Abbott <russ.abbott at gmail.com>
> > wrote:
> >
> >
> >
> > > From: Russ Abbott <russ.abbott at gmail.com>
> >
> > > Subject: [rules-users] Using Drools for modeling with
> > rule-driven agents
> >
> > > To: rules-users at lists.jboss.org
> >
> > > Cc: "Antony W. Iorio" <antony.iorio at gmail.com>,
> > "Abbass, Hussein" <h.abbass at adfa.edu.au>
> >
> > > Date: Saturday, August 22, 2009, 5:52 PM
> >
> > >
> >
> > > Hi,
> >
> > >
> >
> > > I'm interested in developing (if it doesn't
> > already
> >
> > > exist) and then using a framework for agent-based
> > modeling
> >
> > > in which the agents are rule driven. An important
> > feature is
> >
> > > that the agents and their rules must be dyanically
> >
> > > manipulable. That is, both the agents and the rules
> > must be
> >
> > > first class objects that can be manipulated as the
> > system is
> >
> > > running. Can Drools support that?
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > As someone not familiar with Drools I did my best to
> > find
> >
> > > out by looking at the Drools
> >
> > > Expert User's Manual. From what I could tell, the
> > Template
> >
> > > feature in which one uses Java objects as Template
> > data
> >
> > > sources comes close.  I'd like your advice
> > before
> >
> > > putting too much development effort into attempting to
> > use
> >
> > > it for that purpose.
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > In particular, would it be possible to set up a
> > mechanism
> >
> > > that could: create and delete agents on the fly;
> > associate
> >
> > > rule sets with agents on the fly; and modify the
> > rules
> >
> > > associated with an agent on the fly?  After each
> > such
> >
> > > action the system would change to reflect the change
> > in
> >
> > > agents and rules.
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > Thanks for your help.
> >
> > >
> >
> > > -- Russ Abbott
> >
> > >
> >
> > > P.S. If Drools would not be a good choice, is there
> > some
> >
> > > other system that you could recommend?
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > -----Inline Attachment Follows-----
> >
> > >
> >
> > > _______________________________________________
> >
> > > rules-users mailing list
> >
> > > rules-users at lists.jboss.org
> >
> > > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090822/ba5164e9/attachment.html 


More information about the rules-users mailing list