RLRP routing  v.0.1.0
rl_logic.ValueEstimator Class Reference

Class for assigning current estimated value for a given action and provides method for returning this value. More...

Collaboration diagram for rl_logic.ValueEstimator:
Collaboration graph

Public Member Functions

def __init__ (self, est_method_id="sample_average")
 Constructor. More...
 
def estimate_value (self)
 Main method for estimation value calculation. More...
 
def estimate_value_by_sample_average (self, action_id, reward)
 Estimate value by using a simple "sample average" method. More...
 
def delete_action_id (self, action_id)
 Delete an action_id from the current actions list. More...
 

Public Attributes

 actions
 Store current action ids and their current estimated value and step: {action_id: [est_value, step_count]}. More...
 
 estimate_value
 A reference to the estimation method chosen by the est_method_id. More...
 

Detailed Description

Class for assigning current estimated value for a given action and provides method for returning this value.

Constructor & Destructor Documentation

def rl_logic.ValueEstimator.__init__ (   self,
  est_method_id = "sample_average" 
)

Constructor.

Parameters
selfThe object pointer.
est_method_idDefault calculation method of the estimation value

Member Function Documentation

def rl_logic.ValueEstimator.delete_action_id (   self,
  action_id 
)

Delete an action_id from the current actions list.

Parameters
selfThe object pointer.
action_idID of the action being deleted.
def rl_logic.ValueEstimator.estimate_value (   self)

Main method for estimation value calculation.

It is being overridden in the constructor, depending on the chosen estimation method ID. Input: action_id - some action identifier; reward - value of the assigned reward. Output: current estimated value.

Parameters
selfThe object pointer.
def rl_logic.ValueEstimator.estimate_value_by_sample_average (   self,
  action_id,
  reward 
)

Estimate value by using a simple "sample average" method.

Reference to the method can be found in R.Sutton's book: Reinforcement Learning: An Introduction.

Parameters
selfThe object pointer.
action_idID of the action having been chosen.
rewardReward value received on the corresponding action ID.
Returns
Estimated value in float().

Member Data Documentation

rl_logic.ValueEstimator.actions

Store current action ids and their current estimated value and step: {action_id: [est_value, step_count]}.

rl_logic.ValueEstimator.estimate_value

A reference to the estimation method chosen by the est_method_id.


The documentation for this class was generated from the following file: