sarsa_trace#

sarsa_trace(model_free_values, second_stage_values, starting_state, action, reached_second_stage, reward, learning_rate, eligibility_trace)[source]#

The prediction errors and value changes of cpm.models.learning.SARSATrace.

Returns:
stage1_prediction_error, stage2_prediction_errorfloat
model_free_changefloat

The change of model_free_values[starting_state, action].

second_stage_changefloat

The change of second_stage_values[reached_second_stage].