A GWA Framework for Combined Reasoning
5.4 Illustrative Example - Simple String Generation
The simple example we present here illustrates how the framework is used. The task of the configuration is to construct sub-strings of a given target word (starting from the first letter).
The background knowledge is individual letters and the target word itself. This task is not difficult, and somewhat contrived, but it demonstrates the mechanics of how processes co-operate in performing an overall task. The system we have designed here will generate all sub-strings of the word “MISSISSIPPI”.
5.4.1 System Design
As mentioned in §5.2, to design a configuration for a particular task, we must define the broadcastable artefacts, the processes and the initial state. In our example, this is as follows:
Broadcastable Artefacts: text strings of length zero or more.
Processes: we define a single Letter process. It carries with it, as background knowledge, the target word and a single letter. It reacts to the broadcast of a text string. If the broadcast string is the same as the target string then the process detaches itself from the workspace with no proposal. Otherwise, the process creates a new string by attaching its letter to the end of the broadcast and proposing this new string for broadcast. It ranks this proposal by counting the number of letters of its creation that match the target word, in the correct character position, and using that as the importance measure.
Initial State: one process is attached for each of the letters “M”, “I”, “S” and “P”. The first round starts with the broadcast of the empty string, “ ”.
5.4.2 The Simple System in Action
Table 5.1 shows how processing progresses on a round by round basis. In the first round, nothing is broadcast (null ). Each process reacts to this by proposing a string consisting of just their background character.
5.4. Illustrative Example - Simple String Generation 95
Processes
M I S P
Round Broadcast Prop. Imp. Prop. Imp. Prop. Imp. Prop. Imp.
1 null M 1 I 0 S 0 P 0
2 M MM 1 MI 2 MS 1 MP 1
3 MI MIM 2 MII 2 MIS 3 MIP 2
4 MIS MISM 3 MISI 3 MISS 4 MISP 3
5 MISS MISSM 4 MISSI 5 MISSS 4 MISSP 4
6 MISSI MISSIM 5 MISSII 5 MISSIS 6 MISSIP 5
... ... ... ... ... ... ... ... ... ...
12 MISSISSIPPI detach detach detach detach
Table 5.1: Processing in the simple sub-string system.
The process proposing “M” ranks this higher than all other proposals as it matches most char-acters of the target word (in the right positions, i.e., the first letter). Consequently, the process proposing “M” wins the contest for access to the workspace and its proposal is broadcast. All processes react again in the second round. Their proposals are all concatenations with “M”. In this round, “MI” is ranked highest and becomes the next broadcast. The process continues, in a manner that should hopefully now be obvious, until all other sub-strings of the target word are broadcast. When the target word itself is broadcast, all the processes detach. Processing then ends as there are no further broadcast proposals.
5.4.3 An Extension to the Simple System
The simple substring generating system we describe above is heavily tailored to the specific target word. Each process must be pre-configured with the target word itself, together with one particular component letter. By a simple re-design, we could make the system more general and reduce the amount of effort in configuring the background knowledge. Here is a better design, requiring less configuration to run each time:
Broadcastable Artefacts: there are two types of these, the target artefact and the substring artefact, both of which are string lists of length two. The first of these strings is a flag to distinguish the type of artefact. This is “t” for a target artefact and “s” for a substring artefact. The second string of the list is either the target word or a substring.
Processes: we modify the existing Letter processes. They now propose substring artefacts, rather than simple strings, by creating a list in the form [s,substring]. They no longer carry the target word as background knowledge. In response to the broadcast of a target artefact they now store the broadcast target word. In that same round, they then propose their own letter as a substring artefact. They respond to substring broadcasts as they did for string broadcasts in the earlier version. All their proposals are ranked, as before, by matching with the target word. We also define a new process, TargetNotifier. The user configures this process with the required target word as background knowledge. In each round, it proposes a target artefact, in the form [t,targetword ], with an importance rating of 1. It responds to a target artefact broadcast by detaching from the workspace.
Initial State: one Letter process is attached for each of the letters of the alphabet plus there is one TargetNotifier, configured with the required target word. The first round starts with the broadcast of an empty string.
The benefit of this re-design is that, in order to run the system for a new target word, the user need only configure the TargetNotifier process. All other processes, and the initial state, are untouched.
Processes
TargetNotifier N R U . . .
Round Broadcast Prop. Imp. Prop. Imp. Prop. Imp. Prop. Imp. . . .
1 null [t,RUN] 1 - - - . . .
2 [t,RUN] detach [s,N] 0 [s,R] 1 [s,U] 0 . . .
3 [s,R] [s,RN] 1 [s,RR] 1 [s,RU] 2 . . .
4 [s,RU] [s,RUN] 3 [s,RUR] 2 [s,RUU] 2 . . .
5 [s,RUN] detach detach detach . . .
Table 5.2: Processing in the Enhanced Simple Substring System.
Table 5.2 illustrates how the system will run for the target word “RUN”. For clarity, we have not shown all the other processes for the other letters of the alphabet. The only process to propose a broadcast in the first round is the TargetNotifier, which proposes a target artefact containing the target word “RUN”. In round two, the TargetNotifier reacts to this broadcast by detaching. All the Letter processes react by storing this target word and proposing their individual letters as substring artefacts. The rounds continue, as in the first version of the system, until all sub-strings have been broadcast.