|COGENT Version 2.4 Help|
A buffer is an information store. It is a place where information can be put for later retrieval. Buffers are appropriate for both short term storage (as in modelling working memory, for example) and long term storage (as in large knowledge bases). They can be configured, through sub-classes and properties, so as to behave in a variety of different ways (allowing, for example, decay of elements or capacity restrictions).
Propositional buffers are buffers whose elements are symbolic propositions. There are no restrictions on the content that the propositional elements may represent. Other supported types of buffer are analogue, table, graph and stack.
The precise behaviour of a propositional buffer is determined by the values of the following properties:
Initialise (possible values: Each Trial/Each Block/Each Subject/Each Experiment/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, when the value is Each Experiment, contents will be preserved across simulated subjects, and when the value is Each Session, the contents will be preserved across experiments.
Duplicates (Boolean; default: FALSE)
This property governs the buffer's behaviour when it receives an ``add'' message for an item already in the buffer. If checked, the item is simply added to the buffer according to the usual rules (which depend on further properties as discussed below). If unchecked, 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.
Access (possible values: Random/FIFO/LIFO; 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.
Decay (possible values: None/Half-Life/Linear/Fixed; default:
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 Half-Life, 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 Linear, elements decay in a probabilistic fashion, but with the probability of an element decay increasing linearly with each cycle it remains in the buffer. The maximum number of cycles an element can spend in the buffer is given by the value of the Decay Constant property. (So if decay is Linear and the decay constant is 10, the probability of an element decaying on the first cycle will be 0.1, the probability of it decaying within two cycles will be 0.2, and so on, with the probability of it decaying in 10 cycles being 1.0.)
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 Half-Life 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 Linear decay, the constant specifies the maximum number of cycles an element may remain in the buffer. 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.
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.
Grounded (Boolean; default: TRUE)
If this property is set, attempts to add ungrounded terms (i.e., terms containing variables) to the buffer will result in an error message. The rationale for this property is that in most applications adding ungrounded terms to a buffer is probably results from a bug in the model, so flagging such occurrences is useful. In some applications, however, it may be reasonable to have ungrounded terms in buffers (e.g., where the terms represent production-like rules). In these cases, the property should not be set.
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.
|COGENT Version 2.4 Help|