Dummy
Ver. 1.2.0 (2022-11-07)
This module provide Policy Dummy for unittest purpose.
- class mlpro.rl.pool.policies.dummy.MyDummyPolicy(p_observation_space: MSpace, p_action_space: MSpace, p_buffer_size, p_batch_size=5, p_warm_up_step=10, p_ada: bool = True, p_visualize: bool = False, p_logging=True)
Bases:
Policy
Creates a policy that satisfies mlpro interface.
- Parameters:
p_observation_space (MSpace) – Subspace of an environment that is observed by the policy.
- p_action_spaceMSpace
Action space object.
- p_buffer_sizeint
Size of internal buffer. Default = 1.
- p_batch_sizeint
Batch size. Default = 5
- p_warm_up_stepint
Warm up step. Default = 10.
- p_adabool
Boolean switch for adaptivity. Default = True.
- p_visualizebool
Boolean switch for env/agent visualisation. Default = False.
- p_logging
Log level (see constants of class Log). Default = Log.C_LOG_ALL.
- C_NAME = 'MyPolicy'
- C_BUFFER_CLS
alias of
RandomSARSBuffer
- add_buffer(p_buffer_element: SARSElement)
Intended to save the data to the buffer. By default it save the SARS data.
- _add_additional_buffer(p_buffer_element: SARSElement)
- clear_buffer()
Clears internal buffer (if buffering is active).
- _adapt(p_sars_elem: SARSElement) bool
Adapts the policy based on State-Action-Reward-State (SARS) data.
- Parameters:
p_sars_elem (SARSElement) – Object of type SARSElement.
- Returns:
adapted – True, if something has been adapted. False otherwise.
- Return type:
bool