Analogue buffers are specialised COGENT buffers which contain and manipulate graphical representations. Their contents are interpreted as denoting graphical representations, and they can be displayed graphically, but they can also be manipulated using ordinary COGENT rules and conditions. In their present form, they can be used to form the basis of a variety of models of imagery processes, and reasoning processes based on imagery.
Analogue buffers can only contain objects of a specified range of types, presently points, intervals, lines, circles, boxes, polygons, polylines and markers. Each type has a specific syntax, as detailed below. Configurable buffer properties include Dimensionality (1-d or 2-d), Continuity (continuous or granular, subspecified by Granularity, or grain size) and Point movement, which implements a variety of imagistic decay, characterised by the tendency for point locations to drift randomly, within configurable limits. Additionally, extra Access properties permit retrieval ordering based on geometrical order, with possible values Right->Left, Left->Right, Top->Bottom and Bottom->Top.
The image viewer displays the contents of the analogue buffer under a geometric interpretation. Thus each object in the buffer is interpreted as specifying a graphical object, such as a point, interval, line, polyline, polygon, circle, box, text object or x_mark, and displayed accordingly.
As well as displaying each object's graphical information, the viewer also constructs and displays a key, using the contents of each object's first parameter, Name, as text. Each distinct Name entry is colour-coded to correspond to its associated graphical representation. In the one-dimensional case, the graphic object is displayed beside its key entry, using the horizontal dimension of the screen to display the graphical information. In the two-dimensional case, both dimensions of the screen are used to express the graphical information, and associations between graphical displays and key entries are expressed by the colour coding alone.
Colour-coding may be over-ridden by specifying a known colour for an object, and it is possible to deselect this colour coding and display the graphic in monochrome, using the Colour checkbox on the properties panel. If Colour is deselected, the key is not displayed.
Graphical objects are represented within OOS as prolog structures, and only a limited range of these are permitted to be added to an analogue buffer. In general, each permitted graphical object type has a principal functor (such as point, line or circle), and two arguments specifying first, its Name, and second, its geometrical specification. The Name argument can be instantiated as any prolog structure, but the geometrical specifications depend on the object type, as detailed below. A third, optional argument, specified as a list, permits specification of display options for the object, such as colour, line weight and style, and filled or line drawing.
In general, a 1-d point is represented as a single number which specifies its position on the dimension, whereas a 2-d point is represented as a pair of coordinates, using the comma operator and round brackets, specifying its position in two dimensions, like this: (X, Y). Since all values are evaluated before addition of the object to the buffer, they can be specified as evaluable functions: ((37 + 2) - 27, 16 mod 5) will be evaluated to (12, 1) before the object is added to the buffer. If the function is not evaluable, OOS will print a warning and the object will not be added, since the interpretation of the buffer as a diagrammatic representation implies that all locations should be fully specific, precluding objects with unspecified locations.
Some object types (point, line, text and x_mark) can be used in both 1-d and 2-d buffers; note, however, that their geometric specifications will differ in each case.
Object types supported in a 1-d analogue buffer must specify their coordinates as single numeric values, since they can only range along one dimension.
All 2-d object types use (X, Y) coordinate pairs to denote locations. In keeping with the computational tradition, the location (0, 0) denotes the top, left corner of the display, so the value of X increases from left to right, while the value of Y increases from top to bottom.
The text and box object types can be given an optional alignment specifier, which controls how the object is aligned with respect to its reference point. This is specified as (Xalign, Yalign) where Xalign can have one of the values l (left), c (centre) or r (right), and Yalign can have one of the values b (bottom), c (centre) or t (top). If omitted, the viewer assumes the default values (l, b).
Any graphical object may be given a third, optional argument, consisting of a list of secondary property specifications. For example, to colour a circle red, and fill it, use:
There are no restrictions on the syntax of items in the secondary properties list, but only the following have any effect:
Secondary properties are not currently supported in PostScript output or in HTML output.
As a subclass of the standard, propositional buffer class, analogue buffers have all the standard configurable properties such as Decay, Capacity and Access order. These all operate as normal, on the graphical objects which may exist in an analogue buffer:
Duplicates (possible values: on/off; default: off)
This property governs the buffer's behaviour when it receives an ``add'' message for an item already in the buffer. If Yes, the item is simply added to the buffer according to the usual rules (which depend on further properties as discussed below). If No, the item is not added, but its previous occurrence will be ``refreshed''. (This is actually effected by deleting the previous occurrence before adding the new occurrence.) Note that the procedure which tests if an element is already in the buffer requires that the given element match term for term and variable for variable an existing term. It is not simple term unification. Hence it regards item(X) and item(cat) as different, but item(X) and item(Y) as the same.
Decay (possible values: None/Probabilistic/Fixed; default: None)
This property specifies whether the elements of a buffer decay with time, and if so what pattern of decay is observed. When the value is None, elements will remain in a buffer until they are either explicitly deleted or are forced out by the buffer overflowing. When the value is Probabilistic, elements decay in a random fashion, but with the probability of decay begin constant on each cycle. This probability is specified in terms of a half life (specified by the Decay Constant property). The half life is the number of cycles it takes on average for half of the elements to decay. When the value is Fixed, elements remain in the buffer for a fixed number of cycles (specified by the Decay Constant property).
Decay Constant (possible values: 1 -- 9999; default: 20)
This property determines the decay rate if decay is specified for the buffer. In the case of Probabilistic decay, the constant specifies the half-life (in cycles) of buffer elements. A larger number will result in a longer half-life and so a slower decay. In the case of Fixed decay, the constant specifies the number of cycles an element will remain present in the buffer after the element is added to the buffer (provided it is not ``refreshed'' via Duplicates: No, as discussed above). Again, a larger number will lead to slower decay.
Initialise (possible values: Each Trial/Each Block/Each Subject/Each Session;
default: Each Trial)
The timing of buffer initialisation is determined by this property. When the value is Each Trial, the buffer will automatically initialise itself at the beginning of each trial. When the value is Each Block, the buffer will initialise itself at the beginning of each block of trials (i.e., contents will be preserved across trials within a block). Similarly, when the value is Each Subject, contents will be preserved across simulated blocks and when the value is Each Session, the contents will be preserved across subjects.
Limited Capacity (possible values: on/off; default: off)
This property determines whether the buffer has limited or unlimited capacity. If the value is Yes then the buffer's capacity is limited to the value specified by the Capacity property, and its behaviour when that capacity is exceeded is governed by the On Excess property; if the value is No, these two properties are ignored.
Capacity (possible values: 1 -- 9999; default: 7)
This property specifies the capacity of a buffer in terms of the number of items it may hold. If Limited Capacity is not selected, this property has no effect.
On Excess (possible values: Random/Youngest/Oldest/Ignore; default:
The value of this property determines how the buffer behaves when its capacity is exceeded. If the value is Random, then a random element will be deleted from the buffer to make way for the new element. If the value is Youngest, then the most recently added element will be deleted to make way for the new element. If the value is Oldest, then the least recently added element will be deleted to make way for the new element. If the value is Ignore, then the new element will be discarded and the buffer contents will not be altered. If Limited Capacity is not selected, this property has no effect.
Additionally, analogue buffers have special properties pertaining to their interpretive domain:
Dimensionality (possible values: 1d/2d; default: 1d)
The value of the Dimensionality property determines whether the buffer behaves as a one- or two-dimensional space
Continuity (possible values: on/off; default: off)
This property controls whether coordinates are specified on a continuous or granular (discontinuous) scale, on both dimensions where appropriate. If a granular scale is selected, coordinates are rounded to multiples of of the Granularity value before being added to the buffer.
Granularity (possible values: any positive floating point number;
The Granularity parameter specifies the grain size used for rounding when Continuity is deselected, that is to say, the interval between adjacent values. For example, if it is set to 1, an integer scale is used.
Access (possible values: Random/FIFO/LIFO/Left->Right/Right->Left/Top->Bottom/Bottom->Top; default: Random)
This property dictates the order of access to a buffer's elements when the buffer is ``matched''. If access is Random, then match will instantiate its argument to an element from the buffer selected at random (provided that element unifies with the argument of match). If access is FIFO (First In, First Out), then match will return the oldest element which unifies with its argument. If access is LIFO (Last In, First Out), then match will return the youngest element which unifies with its argument.
The directional options such as Left->Right and Top->Bottom will return elements in orders dependent on their spatial layout; objects are accessed in the order in which they would be encountered, by scanning the geometrical space in the given direction. So for example, by scanning left to right, object 1 would be retrieved before object 2 if object 1's leftmost point is farther left than object 2's. The effects of directional scanning access are dependent on the buffer's dimensionality: in the 2-d case, the directions correspond to the directions visible on the analogue buffer viewer's canvas, whereas in the 1-d case, Left->Right and Top->Bottom are equivalent, and give the same results. Essentially, in the 1-d case, left and top correspond to low values, whereas right and bottom correspond to high values.
Point Movement (possible values: on/off; default: off)
When Point movement is selected, locations are adjusted with small random deviations on each COGENT cycle, so that over time, the contents of the buffer tend progressively to distort. It can be considered as a property of a particular kind of representational medium, which is unable to represent location accurately. More generally, however, it can be used to provide a source of random variance in the graphical domain. The amount of point movement is controlled by the Variance parameter.
Variance (possible values: any positive floating-point number;
The amount of point movement is controlled by the Variance parameter, which specifies a normal probability distribution from which deviations are sampled. With Variance set to 1.0, approx 68% of deviations will be less than or equal to 1 scale unit in magnitude. The effects of point movement interact with those of granularity, since with small variance values relative to the granularity values, the probability that a point will not deviate enough to reach the next grain is increased. As well as applying to all locations explicitly represented in the graphic objects, in 1-d or 2-d buffers, point movement also applies to circles' radii, causing circles to change in size as well as to move.
Colour (possible values: on/off; default: on)
It is possible to view analogue buffer contents in either monochrome or colour. If the Colour property is on, colour is used, and where appropriate, a colour key which gives correspondances between element names and the colours used to draw them is displayed. The value of the Colour property does not affect the way in which analogue buffer contents are processed.
X Scale (possible values: 0.0 - 10.0; default: 1.0)
The image view of analogue buffer may be scaled for ease of viewing. The "natural" unit of measure is one pixel, but this may be altered. The value of the X Scale property determines the scaling of pixels per analogue buffer unit in the horizontal dimension. Like the value of the colour property, it does not affect the way in which analogue buffer contents are processed.
Y Scale (possible values: 0.0 - 10.0; default: 1.0)
The Y Scale is the vertical analogue of the X Scale property. It determines the scaling factor in the vertical direction in terms of pixels per analogue buffer unit. The value of the Y Scale property does not affect the way in which analogue buffer contents are processed.
Recall that all information must be represented in COGENT via Prolog terms. Buffer elements are no exception, but they are perhaps the simplest sorts of box elements in COGENT. This is reflected in the simplicity of the buffer element editor. Apart from the comment line, it contains a single text field into which the buffer element should be typed. The contents of this field should be a valid Prolog term. If not, however, COGENT does automatic syntax checking (and attempted correction) of editor elements, and so any error will be noted and (possibly) corrected.