[rules-users] Re: Drools-solver -- solution questions

Geoffrey De Smet ge0ffrey.spam at gmail.com
Sat Feb 7 08:44:58 EST 2009


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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 




More information about the rules-users mailing list