Trait rurel::strategy::learn::LearningStrategy
source · pub trait LearningStrategy<S: State> {
// Required method
fn value(
&self,
new_action_values: &Option<&HashMap<S::A, f64>>,
current_value: &Option<&f64>,
received_reward: f64
) -> f64;
}
Expand description
A learning strategy can calculate a learned value for the action which was taken from the
values for the actions in the new state (new_action_values
), the current value
(current_value
), and the reward that was received after taking the action.
Required Methods§
sourcefn value(
&self,
new_action_values: &Option<&HashMap<S::A, f64>>,
current_value: &Option<&f64>,
received_reward: f64
) -> f64
fn value( &self, new_action_values: &Option<&HashMap<S::A, f64>>, current_value: &Option<&f64>, received_reward: f64 ) -> f64
Calculates a learned value for the action which was taken from the
values for the actions in the new state (new_action_values
), the current value
(current_value
), and the reward that was received after taking the action.