As an answer to your "big" question: no. There is no distinction between a rule that isn't activated because one of its patterns doesn't match with any of the existing facts or due to the absence of facts of a type. Hence, (A, B and not C) with A, B and C that does not match is indistinguishable from A, B and no C at all.

Are all your facts booleans or simple (integer, enum,...) values? "Answer to question" seems to indicate this.

Note that there are rules (boolean expressions) determining a "solutiion" and rules governing data acquisition. I'd try and model the second group, possibly based on facts representing the individual "solution", what is required to reach them, how much has been required, whether one is still feasible, etc.

"Decision tree" seems to be the thing you need, but Drools doesn't have this out of the box.

-W


On 21 August 2011 00:23, Kal <kalarhan@gmail.com> wrote:
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