Click or drag to resize
Accord.NET (logo)

SarsaUpdateState Method (Int32, Int32, Double, Int32, Int32)

Update Q-function's value for the previous state-action pair.

Namespace:  Accord.MachineLearning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
public void UpdateState(
	int previousState,
	int previousAction,
	double reward,
	int nextState,
	int nextAction
)
Request Example View Source

Parameters

previousState
Type: SystemInt32
Curren state.
previousAction
Type: SystemInt32
Action, which lead from previous to the next state.
reward
Type: SystemDouble
Reward value, received by taking specified action from previous state.
nextState
Type: SystemInt32
Next state.
nextAction
Type: SystemInt32
Next action.
Remarks
Updates Q-function's value for the previous state-action pair in the case if the next state is non terminal.
See Also