Uncategorized APIClass ObjectQLearner ClassOn this pageQLearner Class Description: A class for creating QLearner objects. Usage: local ML = require("ML")local qLearner = ML.QLearner() pack Type: Function. Description: Construct a state from given hints and condition values. Signature: pack: function(self: QLearnerClass, hints: {integer}, values: {integer}): --[[state]] integer Parameters: ParameterTypeDescriptionhints{integer}Representing the max number of possible hints. For example, if there are two conditions, and each condition has 3 possible values (0, 1, 2), then the hints array is {3, 3}.values{integer}The condition values as discrete values. Returns: Return TypeDescriptionintegerThe packed state value. unpack Type: Function. Description: Deconstruct a state from given hints to get condition values. Signature: unpack: function(self: QLearnerClass, hints: {integer}, state: integer): {integer} Parameters: ParameterTypeDescriptionhints{integer}Representing the max number of possible hints. For example, if there are two conditions, and each condition has 3 possible values (0, 1, 2), then the hints array is {3, 3}.stateintegerThe state integer to unpack. Returns: Return TypeDescription{integer}The condition values as discrete values. __call Type: Metamethod. Description: Create a new QLearner object with optional parameters for gamma, alpha, and maxQ. Signature: metamethod __call: function( self: QLearnerClass, gamma?: number --[[0.5]], alpha?: number --[[0.5]], maxQ?: number --[[100.0]] ): QLearner Parameters: ParameterTypeDescriptiongammanumberThe discount factor for future rewards. Defaults to 0.5.alphanumberThe learning rate for updating Q-values. Defaults to 0.5.maxQnumberThe maximum Q-value. Defaults to 100.0. Returns: Return TypeDescriptionQLearnerThe newly created QLearner object.