Class for selecting the action from the list of actions and their corresponding values.
More...
Class for selecting the action from the list of actions and their corresponding values.
The interface is provided via select_action() method.
def rl_logic.ActionSelector.__init__ |
( |
|
self, |
|
|
|
selection_method_id = "greedy" |
|
) |
| |
Constructor.
- Parameters
-
self | The object pointer. |
self | ID of used selection method. |
def rl_logic.ActionSelector.select_action |
( |
|
self | ) |
|
Default method for selecting the action.
It is overridden in init(). Input: {action_id: value}. Output: action_id.
- Parameters
-
def rl_logic.ActionSelector.select_action_e_greedy |
( |
|
self, |
|
|
|
action_values |
|
) |
| |
Select an action using "e-greedy" algorithm.
- Parameters
-
self | The object pointer. |
action_values | A dictionary containing {action_id: estimation_value}. |
- Returns
- The selected action_id.
def rl_logic.ActionSelector.select_action_greedy |
( |
|
self, |
|
|
|
action_values |
|
) |
| |
Select an action using "greedy" algorithm.
- Parameters
-
self | The object pointer. |
action_values | A dictionary containing {action_id: estimation_value}. |
- Returns
- The action_id with the maximum value.
def rl_logic.ActionSelector.select_action_softmax |
( |
|
self, |
|
|
|
action_values |
|
) |
| |
Select an action using "soft-max" algorithm, based on Gibbs (Boltzmann) distribution.
See the reference in R.Sutton's book: Reinforcement Learning: An Introduction.
- Parameters
-
self | The object pointer. |
action_values | A dictionary containing {action_id: estimation_value}. |
- Returns
- The selected action_id.
rl_logic.ActionSelector.eps |
Eps-value for the e-greedy selection method.
Default value is 0.1.
rl_logic.ActionSelector.select_action |
A reference to the selection method being used.
rl_logic.ActionSelector.selection_method_id |
Store a selection method ID value.
The documentation for this class was generated from the following file: