SARSA class
SARSA (on-policy TD control) with optional schedules and helpers
Enhancements over the minimal SARSA:
- decaying epsilon and alpha schedules
- optional eligibility traces (lambda) for SARSA(lambda)
- helpers: bestAction, maxQ, reset, clone
- serialization to/from Map/JSON
Constructors
Properties
- alpha ↔ double
-
getter/setter pair
- alphaDecay → double?
-
final
- alphaMin → double?
-
final
- epsilon ↔ double
-
getter/setter pair
- epsilonDecay → double?
-
final
- epsilonMin → double?
-
final
- gamma → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lambda → double
-
final
- nActions → int
-
final
- nStates → int
-
final
-
qTable
↔ List<
List< double> > -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bestAction(
int state) → int -
chooseAction(
int state) → int -
clone(
) → SARSA -
maxQ(
int state) → double -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
{double defaultValue = 0.0}) → void -
toJson(
) → String -
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
update(
int state, int action, double reward, int nextState, int nextAction) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited