Re: [rules-users] Iterative diagnosis - how to determine what is the next best fact?

2011-08-22 Thread Kal
Thank you for the reply Wolfgang!

Altho this particular application involves a Expert System, I quite enjoyed
learning about drools and I intend to keep studying it in the following
months regardless if I end up using it or not right now.

A solution (far from ideal) that I came up with was to 'explode' my rules,
something like this:

/Group A:
RULE: if ~A, solution is: text here 1
RULE: if A = ask B1

Group B: 
RULE: if A,~B1 = ask C1
RULE: if A, B1 = ask B2
RULE: if A, B1, B2 = ask B3
RULE: if A, B1, ~B2 = solution is: text here 2
RULE: if A, B1, B2, B3 ou ~B3 = ask B4
RULE: if A, B1, B2, B3, B4 = solution is: text here 3
RULE: if A, B1, B2, B3, ~B4 = solution is: text here 4
RULE: if A, B1, B2, ~B3, B4 = solution is: text here 5
RULE: if A, B1, B2, ~B3, ~B4 =  solution is: text here 6

Group C:
RULE: if A, ~C1 = ask D1


Groups D, E, F, G, .../

But that would means that a small sample with ~25 rules would have to be
'exploded' into ~50+ rules. The ASK command would represent a call to the
end user and it would be followed by a new Fact and fireRules.

Please note that a small sample with 25 rules has about 15 variables/facts
and altho I have one general goal: is it a problem or not?, there are
about 17 unique answers (e.g: yes it is a problem, so do this to solve
it). 

With that in mind, I think that using a rules system like drools would be
perfect to keep my application simple to maintain and to expand later ... a
complete solution would involve more goals, maybe 200-300 rules.

Any suggestions on how to use Drools or other solution would be greatly
appreciated.

Thanks!

Kal


--
View this message in context: 
http://drools.46999.n3.nabble.com/Iterative-diagnosis-how-to-determine-what-is-the-next-best-fact-tp3271709p3274844.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Iterative diagnosis - how to determine what is the next best fact?

2011-08-20 Thread Kal
Hi,

I am new to Drools. I read the documentation and I looked at the examples,
but I still not sure how to solve this problem:

1) Kind: iterative diagnosis

Rules:
if (A, B and C) then print (Solution 1)
if (A, B and not C) then print (Solution 2)
if (A, D and E) then print (Solution 3)
and so on...

The entry should be something like this:
* no facts are know
* user answers a question (lets say A = true), I update the Statefull
session and fire the rules
* system chooses a unknow fact based on condition for the best incomplete
rule. In this case, it would be B (as it knows A, but it doesn't know B or
C)
* user answers a new question (B = false), I update the session + fireRules
* system now knows that rule 1 (A, B and C) is not possible. It also knows
that rule 2 (A, B and not C) is not possible. So, it chooses the second
condition on rule 3 (A, D and E), which is: what is D?
* user answers a new question (D = true)

* user answers a new question (E= true)
* system prints: Solution 3!


My big question: can I extract from the working memory or rule manager or
the agenda a list of the rules that are 'almost' good to fire, but that
still requires some of its conditions to be know (by inserting facts)?

Thanks!


--
View this message in context: 
http://drools.46999.n3.nabble.com/Iterative-diagnosis-how-to-determine-what-is-the-next-best-fact-tp3271709p3271709.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users