[rules-users] Cost of queries
Hi All, I'm wondering if anyone can tell me the relative performance impact of queries. Is it just the cost of matching facts against them ( regular caching rules apply etc.)? Thanks, Dave ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: Drools-solver -- solution questions
Tabu search (and other local search algorithms such as simulated annealing) are very good at a) find an optimal solution. Unfortunately, it can't handle b) get the total number of solutions. I 'd recommend a brute force or better yet a branch-and-bound (with alfa and beta pruning) algorithm for b). In both cases you can reuse some of the internals of drools-solver: - your constraint rules in the drl files won't change. - you can reuse the score mechanism which uses the drools rule engine Due to the forward-chaining nature of the drools rule engine those algorithms too can take advantage of the scalibity and performance boost. Hey, if you do it right, you can write a BruteForceSolver and/or BranchAndBoundSolver which would be very welcome as a patch to drools-solver if you're willing to contribute it :) With kind regards, Geoffrey De Smet Andrew Waterman schreef: Hello, I'm starting to work with the drools-solver to help on a gaming project. Basically, we have a game that works in two modes: 1) a competitive game where humans (or agents) compete with one another on a well defined game board to achieve 24 points by using three (or four) agricultural development tokens. 2. A puzzle, where all 4 players work cooperatively to create an equitable solution, where all 4 players win with at least 24 points by means of our agricultural development tokens. I am starting to work with drools-solver to address the puzzle part of our game. Basically, we are interested in having the solver do two things for us: a) find the optimal solution for our game/puzzle, based upon our requirements [this part seems quite straightforward] and b) getting the total number of solutions that satisfy our constraints. We would like, as well, to be able to inspect these other, sub-optimal, solutions, in order to explore our game and puzzle further. From my reading of the "Solver" API , it looks like we will only be able to get the optimal solution. Does anyone have any suggestions for a workaround in this case? Or is there some functionality in the solver that I am missing? I look forward to your feedback. best wishes, Andrew - Andrew Waterman San Cristóbal de las Casas, Chiapas, Mexico ___ 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] Drools-solver -- solution questions
hi you could use a solution taboo, on all solutions found so far and let the solver solve again. the problem is that you never know when to stop this algorithm. that is, when you found the last valid solution. but you could stop the solver after a certain amount of time and decide that you have all solutions. best, tim On Wed, Feb 4, 2009 at 11:36 PM, Andrew Waterman wrote: > Hello, > > I'm starting to work with the drools-solver to help on a gaming project. > Basically, we have a game that works in two modes: 1) a competitive game > where humans (or agents) compete with one another on a well defined game > board to achieve 24 points by using three (or four) agricultural development > tokens. 2. A puzzle, where all 4 players work cooperatively to create an > equitable solution, where all 4 players win with at least 24 points by means > of our agricultural development tokens. > > I am starting to work with drools-solver to address the puzzle part of our > game. Basically, we are interested in having the solver do two things for > us: a) find the optimal solution for our game/puzzle, based upon our > requirements [this part seems quite straightforward] and b) getting the > total number of solutions that satisfy our constraints. We would like, as > well, to be able to inspect these other, sub-optimal, solutions, in order to > explore our game and puzzle further. From my reading of the "Solver" API , > it looks like we will only be able to get the optimal solution. Does anyone > have any suggestions for a workaround in this case? Or is there some > functionality in the solver that I am missing? > > I look forward to your feedback. > > best wishes, > > Andrew > > - > Andrew Waterman > San Cristóbal de las Casas, Chiapas, Mexico > > > > > > > > > ___ > 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