The policy and action-value

The QLData class encapsulates the attributes of the policy in the Q-learning algorithm by creating a QLData record or instance with a given reward, probability, and Q-value that is computed and updated during training. The probability variable is used to model the intervention condition for an action to be executed.

If the action does not have any external constraint, the probability is 1 (that is, the highest), and it is zero otherwise (that is, the action is not allowed anyhow). The signature is given as follows:

final private[scalaml] class QLData(    val reward: Double,     val probability: Double = 1.0) {    import QLDataVar._    var value: Double = 0.0    @inline final def estimate: Double = value * probability    final 

Get Scala Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.