Hi Russ,
We are using Drools for games based on participatory modeling work
here in Chiapas. Our games have agents that participate against human
players (or they could play each other in a typical multi-agent system
if we wanted). I use JMS to broadcast updates to the games; our
agents just need to listen to a JMS stream, create an environmental
context (or update one) from serialized objects in the messaging layer
and then fire rules against that context. Any kind of messaging layer
should provide a similar functionality.
best wishes,
Andrew
---------------------------------
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
El 23/08/2009, a las 12:13 a.m., Russ Abbott escribió:
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_bar...@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.abb...@gmail.com> wrote:
> From: Russ Abbott <russ.abb...@gmail.com>
> Subject: Re: [rules-users] Using Drools for modeling with rule-
driven agents
> To: "Greg Barton" <greg_bar...@yahoo.com>
> Cc: rules-users@lists.jboss.org, "Antony W. Iorio" <antony.io...@gmail.com
>, "HusseinAbbass" <h.abb...@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_bar...@yahoo.com>
> wrote:
>
>
> This wouldn't happen to involve evolutionary pressures
> altering rules, would it?
>
>
>
> --- On Sat, 8/22/09, Russ Abbott <russ.abb...@gmail.com>
> wrote:
>
>
>
> > From: Russ Abbott <russ.abb...@gmail.com>
>
> > Subject: [rules-users] Using Drools for modeling with
> rule-driven agents
>
> > To: rules-users@lists.jboss.org
>
> > Cc: "Antony W. Iorio" <antony.io...@gmail.com>,
> "Abbass, Hussein" <h.abb...@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@lists.jboss.org
>
> > https://lists.jboss.org/mailman/listinfo/rules-users
>
> >
>
>
>
>
>
>
>
>
>
>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users