PolicyGradient class

REINFORCE-style Policy Gradient with optional baseline and normalization

Constructors

PolicyGradient({required int nActions, required List<int> policyLayers, int? seed, bool useBaseline = false})

Properties

baseline double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
nActions int
final
policy ANN
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useBaseline bool
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectAction(List<double> state) int
toJson() String
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
updateFromEpisode(List<List<double>> states, List<int> actions, List<double> returns, {bool normalize = true}) → void
Update from a single episode represented as lists of states, actions and returns. Supports optional baseline subtraction and advantage normalization.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(String s, {int? seed}) PolicyGradient
fromMap(Map<String, dynamic> m, {int? seed}) PolicyGradient