Re: [rules-users] drools planner planning entity

2012-06-18 Thread Geoffrey De Smet
If you mean more then 1 planning entity class:
Yes, you can, but the construction heuristics in 5.4.0.Final cannot 
handle more than 1 class currently. 5.5.0.Beta1's "unified selectors" 
will fix that.

If you mean more then 1 planning entity instance:
Of course, real problems can have 50 000 entities and more.

Op 18-06-12 21:36, domingo schreef:
> Can I have more than one planning entity, let say 4, is it recommended or
> poor design?
> If any performance related warnings?
>
> thanks in advance
>
> -
> with kind regards,
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/drools-planner-planning-entity-tp4018034.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
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools planner constrains

2012-06-18 Thread Geoffrey De Smet
Read this section in the manual
http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html#d0e150

Op 18-06-12 20:20, domingo schreef:
> Hi,
> In drools planner
>
> what exactly breaking a constraint means?
>
> thanks lot,
>
> -
> with kind regards,
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/drools-planner-constrains-tp4018033.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
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools planner CloudProcessDifficultyComparator & CloudComputerStrengthComparator

2012-06-18 Thread Geoffrey De Smet
They are used by some of the construction heuristics (Best Fit *, * Fit 
Decreasing).

Read the manual section 4.3.3.2. Planning entity difficulty
http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html#d0e2001


Op 18-06-12 22:01, domingo schreef:
> Hi,
>
> In the cloudbalance example...I noticed two comparator classes...
> CloudProcessDifficultyComparator (this is for planning entity class
> comparator) and CloudComputerStrengthComparator (this is for planning
> variable comparator class),
>
> please help me to understand more about these planning entity difficulty and
> planning variable strength comparator classes.
> why do we need this and why not use one class level comparator?
>
> thanks,
>
>
> -
> with kind regards,
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/drools-planner-tp4018035.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
>

-- 
With kind regards,
Geoffrey De Smet


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread zeeshan
*Hi Vincent !

50k records is very less for the projects scaling over 1 lac(100k) records
and when I started working on Drools, I was assured with performance and
ease in developing business rule. But if xls format(DTs) not even supporting
26k records , how can I implement it for client requirement.

  Initially after Heap size, I was successful in running 26k
records. After few trials ,it stopped supporting 26k and we have to scale
down to 3.5k. That is why I was asking to tell me some alternate solution to
rectify this problem because if it can run for 26k initially, then it should
continue running with the same or more number of records.

So kindly help me in solving this issue which me and my team
struggling for a 2 weeks and with your help I am sure we can solve this
problem which would be help not only for me but also for this WHOLE
COMMUNITY.

Thanks !!!*

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018040.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


Re: [rules-users] drools-planner-distribution5.4 final unzipping error....

2012-06-18 Thread Manikandan Subramanian
On Fri, Jun 15, 2012 at 11:46 PM, domingo  wrote:

> Hi,
> I am try to unzip the drools-planner-distribution-5.4.0.final.zip, while
> unzipping I got the following warnig messages...
> DeciderScoreComparatorfact...is password protested.Please enter the
> passwordin the box..
> File 'initializer' is password protected.Please enter the passwordin the
> box..
> File 'Factory' is password protected.Please enter the passwordin the box..
> File 'MachineReassignmentSolution' is password protected.Please enter the
> passwordin the box..
> File 'MrOriginalMacineSolutionIn..' is password protected.Please enter the
> passwordin the box..
> File 'EmployeeConsecutiveAssignment' is password protected.Please enter the
> passwordin the box..
> ...
> ..etc
> I suspect some of the files are password protected...how to get rid of
> this?
>
> thanks
>
> -
> with kind regards,
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/drools-planner-distribution5-4-final-unzipping-error-tp4017999.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
>



-- 
Thanks,
Mani
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor jackrabbit session issue?

2012-06-18 Thread Jervis Liu
On 2012/6/16 1:15, 0beron wrote:
> I am having the same issue and I am using "guvnor-5.3.0.Final-jboss-as-7.0".
> Could you please let me know any way to stop this. It keeps making my log
> file (super) bloated.
Hi, the issue reported by the previous email had been fixed in Guvnor 
5.3 final. If you still see this problem, could you please provide 
following info so that we can take a deeper look.
1. Guvnor version
2. Application server type (JBOSS AS 7, AS 6, Tomcat?)
3. Jdk version
4. detailed stack trace.

Thanks,
Jervis

> Thanks in advance!
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Guvnor-jackrabbit-session-issue-tp3868067p4017998.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Cannot get Custom Forms to work in Guvnor

2012-06-18 Thread Esteban Aliverti
What is the url you are using for the custom form? Did you try to see what
is going on using something like firebug of chrome developer tools? Is the
URL even invoked?

Best Regards,



Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Tue, Jun 19, 2012 at 12:21 AM, sams  wrote:

> I cannot get custom forms to work in guided editor. I can create a working
> set, add the field and value, and define the custom form OK. When I get to
> the editing experience and click on the 'pencil' I get a popup the size
> that
> I declared bit with no content. It makes no difference what URL I enter.
>
> Can someone please confirm that this feature indeed works in 5.4.0 on
> Tomcat?
>
> Thanks,
> Sam
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Cannot-get-Custom-Forms-to-work-in-Guvnor-tp4018036.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Cannot get Custom Forms to work in Guvnor

2012-06-18 Thread sams
I cannot get custom forms to work in guided editor. I can create a working
set, add the field and value, and define the custom form OK. When I get to
the editing experience and click on the 'pencil' I get a popup the size that
I declared bit with no content. It makes no difference what URL I enter.

Can someone please confirm that this feature indeed works in 5.4.0 on
Tomcat? 

Thanks,
Sam


--
View this message in context: 
http://drools.46999.n3.nabble.com/Cannot-get-Custom-Forms-to-work-in-Guvnor-tp4018036.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] drools planner

2012-06-18 Thread domingo
Hi,

In the cloudbalance example...I noticed two comparator classes...
CloudProcessDifficultyComparator (this is for planning entity class
comparator) and CloudComputerStrengthComparator (this is for planning
variable comparator class), 

please help me to understand more about these planning entity difficulty and
planning variable strength comparator classes. 
why do we need this and why not use one class level comparator?

thanks,


-
with kind regards,

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-planner-tp4018035.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] drools planner planning entity

2012-06-18 Thread domingo
Can I have more than one planning entity, let say 4, is it recommended or
poor design?
If any performance related warnings?

thanks in advance

-
with kind regards,

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-planner-planning-entity-tp4018034.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] drools planner constrains

2012-06-18 Thread domingo
Hi,
In drools planner

what exactly breaking a constraint means?

thanks lot,

-
with kind regards,

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-planner-constrains-tp4018033.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


Re: [rules-users] drools-planner-distribution5.4 final unzipping error....

2012-06-18 Thread domingo
this can be avoided using proper unzip tools. If any have this issue use
winrar/winzip or any unzip tool.
I used windows xp to unzip the file, that's why i got that error. 

-
with kind regards,

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-planner-distribution5-4-final-unzipping-error-tp4017999p4018032.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


Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread Vincent LEGENDRE
ok sorry ... 
may be one idea then: drools is using POI as java layer to read xls sheets, and 
it is very very very memory consuming ... especially with .xlsx format. May be 
that drools parser don't even reach a point where it can check the row count 
... 
hope this helps... sorry again . 

- Mail original -

De: "Wolfgang Laun"  
À: "Rules Users List"  
Envoyé: Lundi 18 Juin 2012 19:40:25 
Objet: Re: [rules-users] Hibernate Configuration with Drools 5.4 

Relax, Vincent, it was sent due to my explicit request, and it was a maller 
size version. 

I've taken this off-list to get a first-hand impression of why these DTs are 
considered as a viable solution, and how it fails, etc.. And I think that the 
OPs Q is legitimate; techniques propagated in Drools Expert without any caveats 
(e.g., don't do it for more than N rows) should fail gracefully, with an error 
message such as "after umpteen zillion rules: out of memory" and not just turn 
belly-up. 

After having received some feedback from the OP about alternative approaches 
I'll report back to the list. 

-W 




On 18 June 2012 19:26, Vincent LEGENDRE < vincent.legen...@eurodecision.com > 
wrote: 




Did you really send a 50k rows table to a personal email ??? I can't believe it 
... 
I think you should : 
- read the mailing list rules 
- read the previous Wolfgang post telling that you should consider not using 
such big tables (consider a rule using your 50k rows as parameters) 
- ask questions that are related to rules, and not java heap size limits ... 



De: "zeeshan" < zeeshan.spr...@gmail.com > 
À: rules-users@lists.jboss.org 
Envoyé: Lundi 18 Juin 2012 08:19:27 
Objet: Re: [rules-users] Hibernate Configuration with Drools 5.4 



Hi Laune ! 

I have mailed you my spreadsheet at ur gmail id. 

Thanks ! 

-- 
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018017.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 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


Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread Wolfgang Laun
Relax, Vincent, it was sent due to my explicit request, and it was a maller
size version.

I've taken this off-list to get a first-hand impression of why these DTs
are considered as a viable solution, and how it fails, etc.. And I think
that the OPs Q is legitimate; techniques propagated in Drools Expert
without any caveats (e.g., don't do it for more than N rows) should fail
gracefully, with an error message such as "after umpteen zillion rules: out
of memory" and not just turn belly-up.

After having received some feedback from the OP about alternative
approaches I'll report back to the list.

-W



On 18 June 2012 19:26, Vincent LEGENDRE
wrote:

> Did you really send a 50k rows table to a personal email ??? I can't
> believe it ...
> I think you should :
>- read the mailing list rules
>- read the previous Wolfgang post telling that you should consider not
> using such big tables (consider a rule using your 50k rows as parameters)
>- ask questions that are related to rules, and not java heap size
> limits ...
>
> --
> *De: *"zeeshan" 
> *À: *rules-users@lists.jboss.org
> *Envoyé: *Lundi 18 Juin 2012 08:19:27
> *Objet: *Re: [rules-users] Hibernate Configuration with Drools 5.4
>
>
> Hi Laune !
>
> I have mailed you my spreadsheet at ur gmail id.
>
> Thanks !
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018017.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 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


Re: [rules-users] Hibernate Configuration with Drools 5.4

2012-06-18 Thread Vincent LEGENDRE
Did you really send a 50k rows table to a personal email ??? I can't believe it 
... 
I think you should : 
- read the mailing list rules 
- read the previous Wolfgang post telling that you should consider not using 
such big tables (consider a rule using your 50k rows as parameters) 
- ask questions that are related to rules, and not java heap size limits ... 

- Mail original -

De: "zeeshan"  
À: rules-users@lists.jboss.org 
Envoyé: Lundi 18 Juin 2012 08:19:27 
Objet: Re: [rules-users] Hibernate Configuration with Drools 5.4 

Hi Laune ! 

I have mailed you my spreadsheet at ur gmail id. 

Thanks ! 

-- 
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018017.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Daniel Souza
Hi Sotty.. It's ok..
Here you can find something about my project that I run into.. BioAgents
http://books.google.com.br/books?id=ohX4jvy96aoC&printsec=frontcover&hl=pt-BR#v=onepage&q=BioAgents&f=false

First it started using JESS.. after that Drools and Reinforcement Learning..
But the method applied to the project has not been well accepted.. This
project was started for Master Thesis. There are two master thesis in
respect to the BioAgents..

When I started my undergraduate research. I needed to run into this
project.. That the programming wasn't modular.. The multiagent system
doesn't work wery well.. The rules adopted can't change, if it change the
system needed to change too.. And I needed to do all the project again
alone.. The prototype now work very well.. But with rule sources limited for
each biologist's viewpoint.

All I need to do.. is to have independence of viewpoint.. and suggest the
best solution..

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018028.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Davide Sottara
Predictive models, such as neural networks, support vector machines, cluster
models, decision trees etc can be used in two ways. One is classification:
you take some input data/facts and the model will estimate if this
particular set has a given characteristic or not. 
E.g. given a set of genes, you might want to see if the individual is prone
to suffer from a disease.
You might be more interested in regression/prediction: given a set of input
data/facts, the model will estimate a dependent variable. E.g. given a
sequence of genes, the model will try to predict the next in line. Models
can give probabilities, too. The model would have to be trained with an
external data mining tool, but then could be imported by drools to provide a
runtime execution environment.

Even then, before thinking of the particular implementation, I'd try to
model the problem. Interviewing the domain experts and casting their words
into an organized representation will not be easy, I'm afraid. We can share
thoughts sometimes, if you want/can.
Davide

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018027.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Daniel Souza
Even more i read things seems more complex that are.. but in the same way
seems not..

I partially read about PMML and the following model seems a good solution:
http://www.ibm.com/developerworks/industry/library/ind-PMML1/image001.gif 

If I have facts mined expecting some value to show how precise is the
alignment.. It's good idea to normalize them and predict the most
significant fact.
If I know it well drools could be the Decision processing module..

But I need to learn about it first.. I doesn't have the knowledge..

Thanks so much..
Daniel Souza

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018026.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Daniel Souza
Hi Geoffrey..

Thanks for reply..
I'm brainstorming the biologist's Knowledge domain..
maybe heuristic approach could be the solution or I can do it in a simple
way..

But for now,. I have just rules with different ways to use them.. specific
for each biologist.
The Idea is to mix them to have an unique solution..

Bye..
Daniel Souza..

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018025.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Davide Sottara
Hi Daniel, if you have predictive models you might be interested in the PMML
integration we're working on.. but it's indeed necessary that you define the
nature of your problem and your requirements first :)
Let us know if you need more assistance
Best
Davide

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018024.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Daniel Souza
Hi sotty.. I know how A* algorithm works, but it's only a theoretical
knowledge..

It's good to know that I can express Heuristic Knowledge using drools
rules..
I just need to adjust well the problem domain to know what I really need to
do..

Thanks for showing how to use an heuristic behavior inside the rules..
I'm reading a lot.. And my problem is that, for an specific situation in my
problem, the biologists express the problem in different viewpoints and I
trying to understand well about these possible conclusions.. whose facts
have values with data mining to expect how precise is the alignment between
the sequence submitted and the query matched.
But there are constraints that I need to know first..

Bye
Daniel Souza

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018023.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Daniel Souza
Thanks for reply.. Laune

There are things in the book that would answer some questions..

Well, it's good to know that I can express a Heuristic Knowledge in Drools
Expert.
And I have drools planning to use metaheuristic.. But, I need to model my
problem well first to know what approach I will follow to express well my
rules.
With a lot of interviews in how to express the biologist's expertise about
manual annotation of genetic sequences..  I noticed that there are different
viewpoint in how to express the manual annotation.

The task of the manual annotation problem was divided in smaller problems
using multiagent system approach.

I tried to write the problem here.. but It will be too large.. and I erased
part of what I wrote.. :)

Bye..
Daniel Souza

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018022.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


Re: [rules-users] How to write a Heuristic Knowledge in Drools Expert?

2012-06-18 Thread Geoffrey De Smet
If your problem is A* search efficient, you should use A* search. It's 
better and simpler than any metaheuristic.
Problem is, most real-life problems are NP complete and A* search 
doesn't work efficiently on those.

Some examples:
- Quickest route between 2 cities: Use A* search
- Quickest route to visit 4+ cities (TSP): Use metaheuristic (or LP)
- Bin packing: Use metaheuristic

The easiest way to make this decision, is to take a look if you find 
your problem on this list:
http://en.wikipedia.org/wiki/List_of_NP-complete_problems
(which is a long list of Karp's list: 
http://en.wikipedia.org/wiki/Karp%27s_21_NP-complete_problems )
If your problem or a subproblem of it is on that list, use Planner, 
because A* search will take a few billion years too long.
Otherwise go for A* search.

Op 17-06-12 21:57, Davide Sottara schreef:
> Are you familiar with the A* algorithm? A heuristic function is typically
> used in (state-)space search problems: at a given point, you may have
> alternative "paths" you can choose and the heuristic will help you
> estimate/predict how "successful" exploring that branch would be by giving a
> score. The function usually involves reviewing your path so far and trying
> to look ahead before making another step.
> More generally, heuristic decision making is a process where you choose an
> action (the "path") according to your current knowledge (your state) and
> some prediction criteria which is not necessarily the best, but the most
> promising.
>
> A heuristic search rule could look like this:
>
> rule "Example"
> when
>// you have a current state, given by one or more patterns
>$here : CurrentState( $history : path )
>// then you query for / generate a list of possible follow-up alternatives
>?possiblePath( $here, $nextFromHere )
>// optionally, you filter those which make sense qualitatively
>Filter( ... ) from $nextFromHere   // notice: $nextFromHere might
> not be in the WM
>// optionally, and/or you apply some heuristic scoring function, filtering
> quantitatively
>// notice that it might use the history, the current position or the next
> tentative step
>$score : Double( this>  THRESHOLD ) from heur( $path, $here, $nextFromHere
> )
>
>// any additional logic, e.g. accumulate scores?
>
> then
>// make your choice
>insert ( new Step( $nextFromHere ) );
>// the step will later modify the currentState
> end
>
> Notice that the following MUCH simplified version - a rule - is doing the
> same thing... Simply, there is only one promising and meaningful path - e.g.
> administering an aspiring - which is automatically chosen given the current
> state (of Fever).
>
> rule "a more traditional rule"
> when
>$path : MedicalHistory( ... )
>$here : FeverDiagnosis( temp<  38 )
>// ?possiblePath( $here, $nextFromHere )  -->  let's say aspirin, strong
> antibiotics and bone marrow transplant
>// but you can already figure out the scores a realistic function would
> give to the alternatives...
>// (ok, allergies from $path would make it different, but ignore...)
>// $score : Double( this>  THRESHOLD ) from heur( $path, $here,
> $nextFromHere )
> then
>// so you hardcode your choice!
>insert( new AspirinAdministration() );
> end
>
>
> Drools Planner is slightly different: you might indeed use it to define a
> plan - i.e. a sequence of actions to reach a goal - ***provided*** that you
> can reliably estimate the consequences of any action (move) you allow.
> Planner, however, already implements its own search strategies. What you
> provide there is a "score" for the current state (aka candidate "solution"),
> expressed in terms of hard and soft constraints, that planner algorithms
> will consume. You still have to provide the alternative moves and their
> effects, but the main difference between the scoring (the constraints) and
> heuristic function is that the former usually just look at the current
> state. So, in planner 1) you tentatively make a step and evaluate the
> results, 2) then backtrack and repeat until you have seen all possible
> paths, 3) you choose the best one according to the strategy (it's called
> meta-heuristic)
>
> With a heuristic function, you evaluate your possible future outcome (not
> just one step ahead) before you do make the step, so that's "predictive".
>
> Now, coming back to your question : how do you implement a heuristic
> function?
> The answer is: first you have to define it, given your problem :)
> Only then you can think of an implementation, but functions(), queries and
> rules with optional accumulates seem good candidates!
>
> Best
> Davide
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-Drools-Expert-tp4018012p4018015.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users