On Fri, Jan 22, 2010 at 3:34 PM, drooler <span dir="ltr"><<a href="mailto:david_wynter@yahoo.com">david_wynter@yahoo.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
New to Drools. Could not find a specific answer to this, but it may be there<br>
in the forum somewhere. I have written a rule set for testing the 'fitness'<br>
of 3000 generations of organizms. The rules always test fitness against the<br>
last dozen or so generations. So I need to start at generation 13 and then<br>
when all rules have run against that generation and referencing the previous<br>
12 I need to increment the 'current' generation so that it points at<br>
generation 14. All rules are written relative to that current generation.<br>
How do I know when to increment to the next generation as I need to be<br>
certain that Drools has fired all the rules for the current generation?<br>
<br></blockquote><div><br>One way to do it: You use<br> session.fireAllRules();<br>after you have inserted all your germs or whatever. Then, the updates to<br>increment the generate may be done, after which you call fireAllRules()<br>
again.<br><br>Another way would be to have a rule with very low salience, which will<br>fire after all the regular ones. Here, the consequence might do the update<br>modifications, which should reactivate regular rules. And so on.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Once I have done that, I have some modification objects to put in working<br>
memory that influences the 'fitness' of the generations. These modification<br>
objects have up to 5 parameters. I what to be able to vary these 5<br>
parameters and retest. Rather than tweak them and re run the 3000<br>
generations is there a way to use the Planner where different moves can<br>
alter the 5 parameters and determine a score to measure whether the<br>
modifications are enduring over many generations. In other words the score<br>
does not relate to an individual generation but a lasting affect over many<br>
generations.<br></blockquote><div><br>Surely you don't expect an answer to this question? We have no way of telling<br>what sort of influence the parameters have on the rules and/or facts, or how<br>to propose a way for assessing the outcome of the runs.<br>
<br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thx.<br>
<br>
David<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/How-do-you-know-when-all-rules-have-finished-tp134766p134766.html" target="_blank">http://n3.nabble.com/How-do-you-know-when-all-rules-have-finished-tp134766p134766.html</a><br>
Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>