[rules-users] drools-solver (initialization and starting score)
Andrew Waterman
andrew.waterman at gmail.com
Thu Feb 12 18:59:16 EST 2009
Hi,
I've been looking through my solver logs and on a problem i have
posed, the solver seems to first initialize and setup a best score:
INFO: Initialization time spend (3) for score (-5000004.0). Updating
best solution and best score.
However, this score is not correct. I use collect to load Tokens of a
certain type for my game, and those that are found, penalize the
system with a constraint:
rule "Too much unclaimed territory"
when
$list : ArrayList ( size > 2) from collect (
Token ($type : type == TokenType.UNDEVELOPED))
then
for (int i = 0; i < $list.size(); i++) {
insertLogical (new IntConstraintOccurrence (
"Too much unclaimed territory",
ConstraintType.NEGATIVE_SOFT, 3, $list));
}
end
However, the initial score does not seem to account for these
inserted facts. Due to this, all improving solutions are rejected,
and I see no change in the solution the solver finds and my starting
solution.
Any suggestions on how to delay initialization? Or get the starting
score to take into account this constraint (I've made it SOFT so the
values aren't so hard to follow in the logs, it was initially a HARD
constraint). I'd love to find a way around this problem, I've spent
most of the day playing with different configurations (acceptors and
foragers) trying to find a configuration that works for this base
problem.
best wishes,
Andrew
---------------------------------
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
+52 1 967 107 5902
+1 510 342 5693
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090212/ce6b44f4/attachment.html
More information about the rules-users
mailing list