class ConstantRandomActionMechanism(RandomActionMechanism):
Constructor: ConstantRandomActionMechanism(random_action_probability)
This class inherits from the RandomActionMechanism class and represents a random action
mechanism in which the probability of executing a random action is constant and specified at
construction time.
| Method | __init__ |
This constructor initializes the random action mechanism with a fixed random action probability. |
| Method | reset |
This abstract method must be implemented by any concrete subclass. It is invoked by an RL agent during the initialization process and it must initialize or reset all internal state maintained by the random action mechanism. |
| Method | step |
This abstract method must be implemented by any concrete subclass. It is invoked by an RL agent at the end of each iteration of the learning process and it must update the internal state of the random action mechanism based on the previous best score and the current best score. |
| Property | random |
This abstract property must be implemented by any concrete subclass. It must return the current random action probability as a float value from the interval [0, 1]. |
| Instance Variable | __random |
A float from the interval [0, 1] that determines the constant probability with which a random action is executed. |
This abstract method must be implemented by any concrete subclass. It is invoked by an RL agent during the initialization process and it must initialize or reset all internal state maintained by the random action mechanism.
This abstract method must be implemented by any concrete subclass. It is invoked by an RL agent at the end of each iteration of the learning process and it must update the internal state of the random action mechanism based on the previous best score and the current best score.
| Parameters | |
previousfloat | The value of the best score before the current iteration, given
as a float. |
currentfloat | The value of the best score after the current iteration, given
as a float. |
This abstract property must be implemented by any concrete subclass. It must return the
current random action probability as a float value from the interval [0, 1].