Closed tomason closed 11 years ago
Thanks!
The change seems to introduce strange CCEs when running DroomsTournament. What happens is:
1) First game on a particular playground passes OK. 2) Second game passes for as long as there are no reachable collectibles for my strategy. 3) Once there appears one reachable collectible, I get java.lang.ClassCastException: org.drooms.strategy.hungry.ReachableCollectible cannot be cast to org.drooms.strategy.hungry.ReachableCollectible
(Where ReachableCollectible is a fact type declared in my DRL.)
So far, it seems that when a second instance of ExecutorService is created (tournament creates second game => new CommandDistributor = new ExecutorService), all hell breaks loose. (This is confirmed by the fact that in single games, this doesn't happen.) Oh joy.
Interesting this problem can't be seen with random strategies that define their own FactType as well.
I also encountered similar problem with a class declared in java class. However the problem is only with @propertyReactive class and the problem is with building the rule itself (the second game is never run).
This appears also when only one game is played on the playground and next one is used then.
I'm currently looking at this issue.
I created an issue for this: #3.
I have resolved my problem as an issue in Drools. I have a workaround for it and the tournaments run with my strategy normally.
What was the solution? Perhaps it could be applied globally.
This pull request fixes the issue when it was possible to retrieve player's KnowledgeBase. Through it the StatefulKnowledgeSession could be retrieved and manipulated. That led to possibility of players influencing each others decisions.