Creates a new, empty CRuleSet.
CRuleSet is a rule container class that manages rules, their weights and the weight distribution for the rules. The minweight and maxweight parameters are the minimum and maximum weight boundaries, each rule’s weight has to stay in.
Calculates the reward or penalty, each of the activated rules recives. fitness hereby can be used as measure of the performance or whatever is suitable in the implementation.
This must be implemented by inheriting classes.
Distributes the remainder of the weight differences between the last weights and current weights.
The method must return a value. This must be implemented by inheriting classes.
Updates the weights of all contained rules.
Adapted from Pieter Spronck’s algorithm as explained in Spronck et al: 2005, ‘Adaptive Game AI with Dynamic Scripting’.