11.10 Other Environment Types

There are a couple of other types of environments that embellish the basic model described above. Two of these are particularly appropriate for specific algorithms, and are therefore described in the context of these algorithms. Thus, for information on the environment types that associate a particular time with each event (TimeEnvironment, TimeEvent_MGroup, and TimeEvent), see the recurrent backpropagation part of the manual: section 14.2.5 RBp Sequence Processes and TimeEvents. However, note that the CsSettle process (see section 15.4 Cs Proceses) will use the time value for determining how long to settle, which is different from the way this variable is used in RBp. For information about the environment types that allow individual patterns within an event to be chosen probabilistically (ProbEventSpec, ProbPatternSpec_Group, PropPattern), see the constraint satisfaction part of the manual: section 15.7 The Probability Environment and Cs.

The XYPattern and XYPatternSpec provide a mechanism for applying patterns that move around on a larger input layer. The offset of a pattern is specified by the offset member of the pattern, which can be updated (e.g., by a script) to move the pattern around on subsequent pattern presentations. The pattern spec provides options to determine the way in which the pattern is applied to a network layer:

bool wrap
This controls whether to wrap the pattern around the network layer if it should extend beyond the maximum coordinate for the layer in either the x or y dimension. The alternative is that it is "clipped" at the maximum, and that portion of the pattern is simply not presented.
bool apply_background
The portions of the network layer which do not receive input from the pattern can optionally be set to a particular "background" level, by setting this flag.
float background_value
This is the value to set the background units to, if applicable.

Finally, there is the ScriptEnv, which is an environment with a script associated with it. The script is called at the beginning of the epoch, when the EpochProcess calls the InitEvents function on the environment. The ScriptEnv defines this function to run its script, which can contain code to build an entire epoch's worth of events dynamically (i.e., as the epoch is starting). This is useful for environments which have a probabalistic character which is more complicated than simple frequency sampling. An example of a ScriptEnv is provided in the demo of a simple recurrent network, which learns to perform like a finite state automaton. The training events are generated probabalistically at run-time using a ScriptEnv from a script version of the automaton. This demo can be found in the demo/bp_srn directory.

Note that the ScriptEnv, like other script-based objects, provides an array of script args called s_args that can be used to control the behavior of the script and customize it for particular cases. The meaning of these arguments depends of course on the script that is being used, but they should be documented near the top of the script code.