@@ -19,8 +19,7 @@ import (
1919//
2020// State is comprised of one or more Elements, each of which consists of an
2121// tensor.Values chunk of values that can be obtained by the model.
22- // Likewise, Actions can also have Elements. The Step method is the main
23- // interface for advancing the Env state.
22+ // The Step method advances the Env state.
2423//
2524// The standard String() string fmt.Stringer method must be defined to return
2625// a string description of the current environment state, e.g., as a TrialName.
@@ -35,11 +34,10 @@ type Env interface {
3534 labels.Labeler
3635
3736 // Init initializes the environment for a given run of the model.
38- // The environment may not care about the run number, but may implement
39- // different parameterizations for different runs (e.g., between-subject
40- // manipulations). In general the Env can expect that the model will likely
41- // have established a different random seed per run, prior to calling this
42- // method, and that may be sufficient to enable different run-level behavior.
37+ // It is best if the Env has its own random seed and random sequence
38+ // generator (e.g., lab/randx), and sets a new random seed for each run.
39+ // It may also implement different parameterizations for different runs
40+ // (e.g., between-subject manipulations).
4341 // See Step() for important info about state of env after Init
4442 // but prior to first Step() call.
4543 Init (run int )
@@ -51,13 +49,13 @@ type Env interface {
5149 // If there are no further inputs available, it returns false (most envs
5250 // typically only return true and just continue running as long as needed).
5351 //
54- // The Env thus always reflects the *current* state of things, and this
52+ // The Env thus always reflects the _current_ state of things, and this
5553 // call increments that current state, such that subsequent calls to
5654 // State() will return this current state.
5755 //
5856 // This implies that the state just after Init and prior to first Step
59- // call should be an *initialized* state that then allows the first Step
60- // call to establish the proper *first* state. Typically this means that
57+ // call should be an _initialized_ state that then allows the first Step
58+ // call to establish the proper _first_ state. Typically this means that
6159 // one or more counters will be set to -1 during Init and then get incremented
6260 // to 0 on the first Step call.
6361 Step () bool
@@ -68,9 +66,7 @@ type Env interface {
6866 // The returned tensor must be treated as read-only as it likely points to original
6967 // source data: please make a copy before modifying (e.g., Clone() methdod).
7068 State (element string ) tensor.Values
71-
72- // Action sends tensor data about e.g., responses from model back to act
73- // on the environment and influence its subsequent evolution.
74- // The nature and timing of this input is paradigm dependent.
75- Action (element string , input tensor.Values )
7669}
70+
71+ // note: Action is no longer defined in the interface so that
72+ // it can be more flexible in the types of arguments used.
0 commit comments