Events are the snapshots of the Environment presented to the Network. They represent a single coherent set of stimuli drawn from the environment. They are comprised of a set of patterns, which hold the information affecting the network on a layer by layer basis.
The structure of an event is determined by its corresponding
EventSpec. Any changes made in the event spec are automatically
made to all of the events that use that event spec. Thus, there must be
one event spec for each different type of event created. Event specs
reside in the environment itself, and not in the Project like other
specs. The Event has a pointer to its spec, called spec
.
This works just like other spec pointers (see section 8.4 Specifications).
Both the Event and EventSpec objects are essentially just
containers for their constituent Pattern and PatternSpec
objects, which are also kept in one-to-one correspondence. Thus, any
new pattern specs added in the pattern
group in an event spec
will result in corresponding patterns in the pattern
group on the
event. Different varieties of events will add event-level parameters
like frequency and time (see section 11.9 Frequency Environments and Events, section 11.10 Other Environment Types).
A Pattern is simply a list of real numbers, which are kept in a
floating-point Array object called value
. It can be "applied"
to a specified layer in the network. Each element of the value array in
the Pattern corresponds to a Unit in the Layer. In addition, one can
assign a flag to each value, which will alter how this value is applied
to the units in the network. The flag
member of a Pattern holds
the flags, which are only present if the use_flags
field in the
corresponding pattern spec is set to USE_PATTERN_FLAGS
or
USE_PAT_THEN_GLOBAL_FLAGS
. All of the flags are independent of
each other and be either on or off. The meaning of the flag values are
given in the PatFlags
enumerated type in the PatternSpec and
listed below.
TARG_FLAG
EXT_FLAG
COMP_FLAG
TARG_VALUE
EXT_VALUE
NO_UNIT_FLAG
NO_UNIT_VALUE
NO_APPLY
The options include the ability to control how the unit's external input
will be flagged, and where the value will be copied on the Unit (i.e.,
to its targ
or ext
field). This gives the user complete
control over how the pattern value is presented.
Note that the value
field is an float_RArray
type, which
has a range associated with it (hence the RArray), and it also has a
number of other useful functions that enable the distance between two
arrays to be computed, or various statistics like the mean, variance,
etc. to be computed on a given array. These functions may be useful in
creating and analyzing patterns.
The PatternSpec has several fields which determine where its corresponding pattern is presented, and what meaning it has to the network:
PatType type
INACTIVE:
INPUT:
ext
variable of the
corresponding Unit, and the EXT
flag is set on the
ext_flags
of the unit (and the layer the unit is in).
TARGET:
targ
variable of the
corresponding Unit, and the TARG
flag is set on the
ext_flags
of the unit (and the layer the unit is in).
COMPARE:
targ
variable
of the corresponding Unit, and the COMP
flag is set on the
ext_flags
of the unit (and the layer the unit is in).
PatLayer to_layer
FIRST:
LAST:
LAY_NAME:
layer_name
.
LAY_NUM:
layer_num
.
String layer_name
to_layer
is
set to LAY_NAME
).
Int layer_num
to_layer
is
set to LAY_NUM
).
TypeDef* pattern_type
LayerFlags layer_flags
ext_flags
will be set. The
DEFAULT
is to set them according to the pattern type
as
described above, but they can be set to any of the possible combinations
of flags (TARG, EXT, COMP
), or to NO_LAYER_FLAGS
at all.
This can be useful if you have an pattern which uses flags for different
values (see use_flags
) so the layer actually receives multiple
different kinds of external input.
PatUseFlags use_flags
flag
field of the Pattern and the
global_flags
of this PatternSpec will be used when applying the
Pattern to the network. This can be one of the following values:
USE_NO_FLAGS:
USE_PATTERN_FLAGS:
USE_GLOBAL_FLAGS:
USE_PAT_THEN_GLOBAL_FLAGS:
int n_vals
PosTDCoord geom
PosTDCoord pos
LinearLayout
action on the EventSpec can be called to arrange the
events linearly across or down the display.
float initial_val
value
arrays.
Random noise
String_Array value_names
int_Array global_flags
use_flags
) to
all of the patterns, determining how they are presented.
Note: the following information should be useful to those who wish to program in PDP++, but is not necessary for the average user to understand.