Creates a new CLearnSystem using a specific CRuleSet.
The CLearnSystem class takes care of creating new scripts based on a predefined CRuleSet. It does not evaluate the scripts nor modifies the rules written to them.
The procedure of creating scripts is done using three phases:
The header and footer are freely choosable. You can simple override or reassign the CLearnSystem.create_header() and CLearnSystem.create_footer() methods to let them return your required code.
Creates the footer for the script file.
The default implementation does nothing.
Creates the header for the script file.
The default implementation does nothing.
Creates a rule list from the currently active CRuleSet. Gets maxrules rules from the set CRuleSet and passes their code back as string for the script file.
Adapted from Pieter Spronck’s algorithm as explained in Spronck et al: 2005, ‘Adaptive Game AI with Dynamic Scripting’.