[rules-users] best way to write this rule?

Wolfgang Laun wolfgang.laun at gmail.com
Sun Aug 28 03:36:29 EDT 2011


On 28 August 2011 01:23, Warner Onstine <warnero at gmail.com> wrote:

>
> As a player I have:
> - a list of badges I am in progress of completing
>

And also a list of badges a player already has, to avoid acquiting it over
and over again.


> - something I've just done that could go towards one or more of these
> badges
>

The "or more" is essential. I can imagine that certain things need to be
done more than
once. Is that so?


>
> Within the game there are:
> - a list of potential badges that a player could earn
> - with a set of things to do to earn each badge (what I'm considering the
> rules)
>

Notice that the definition of a badge and how to earn it is very similar to
what has
to be recorded for a player's progress.

It is certainly possible to write a rule for each badge to determine whether
a player
has achieved it. But it could be much simpler if all achievements are
tallied individually,
because then rules just need to check for each badge whether a player's
achievements
match the badge's requirements; this can be done with a single rule.

-W




>
> In short I don't want to have to go through each thing each player has
> done and try and determine which rule to run, I just want to pass in:
> - their set of badges (with steps they've completed so far)
> - what badges are available to earn (to match against)
> - what they just did
>
> Maybe I'm thinking about this the wrong way and there's an easier way
> to do this. Still trying to figure the best implementation of the rule
> and rule set. My goal is to load all the rules at load time (and
> reload when I add a new badge) so that I have a full knowledgebase and
> can just run it whenever someone does something in the game.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110828/84d48f8d/attachment.html 


More information about the rules-users mailing list