MEMORY ON PEREGAEA

Let's assume that a memory now takes the form of a strip-like `bucket' in which the Pairs are randomly ordered. The Comparator searches for a match serially as before, in this case from top to bottom. 
Larger memories can then, through reproductive errors, come to be made up of several comparator-bucket sets. Each new Input Pattern can then be passed to all these submemories simultaneously. If any one of their comparators finds a match, it copies the Output to the Effectors in the normal way. The entire matching process then need take no longer than for a single-bucket Memory.

What happens when an Input is matched to two identical Templates in two different buckets, but in which both, through a mutation, have come to possess different Outputs? As before, the one nearest the head of its bucket is selected. If both occupy the same relative position, one is selected by chance.


Up until now we have assumed that all Pattern Matches must be exact; black squares must match black squares and `white' squares white. More advanced Dynisms will use `nearest matching' in which an Input Pattern need only be matched to the template that is most similar to it. In other words, only the greatest number of squares need now match, black to black and white to white. The mismatched squares which I've shown here with crosses, must be at a minimum.

 
To show you how this works, let's imagine that the Dynism acquires a sensor that can detect some particular sound a Prey might emit, perhaps as a byproduct of its motion. We'll assume that this sensor can only register a single frequency, but can do so at eight different amplitudes - or eight levels of loudness if you like. It produces one of these eight bar graph-like Input Patterns for each such amplitude. 

If the Prey emits its sound at a constant amplitude, the Dynism will perceive this to vary according to its distance. Let's suppose though that the Dynism has only evolved templates for three of these patterns instead of all eight because it only needs three different responses: one for when the Prey is close, one when it is a little further away, and one for when it is distant. If the three templates are `1', `4', and `7' respectively, the `3' Input Pattern would then be nearest-matched to the `4' template. 

Imagine now that the Dynism's Prey come to emit more complex sounds, `chords' if you like that can contain up to four different frequencies. In order to extract an Input Pattern from the combination of frequencies being emitted, the Dynism must combine the patterns from four sound sensors into a single 7x4 Pattern like this and match it to a set of similarly-sized templates. This allows it to match up to 4096 different combinations of frequency and amplitude, although the Dynism may again only evolve a small subset of them:

 
Again the Template with the fewest mismatched squares is selected. If two or more match, the ones with the largest number of mismatched squares in any one column are discarded. Any further `ties' are broken at random 

Nearest-matching however has its price. It allows Dynisms to match any Input Pattern to one or another of its templates, no matter how loosely. This will inevitably lead to the occasional erroneous response. Dynisms must therefore minimize this risk by interspersing a few `null' templates with no Output Patterns between its Pairs in a bucket. Most such loose Inputs will then be matched to these Nulls instead. 

The layout of the ROM must also change slightly. Its subcomparators each acquire a small piece of RAM called a `buffer' (the small green squares attached to them) able to store one Template-Output Pair.
Each comparator begins by copying the first Pair in its bucket there. It then searches down through the bucket for another whose Template matches the Input more closely. If it succeeds, it swaps this Pair into the buffer in place of the first. When all the subcomparators have reached the ends of their buckets, they insert their nearest matches into a special submemory whose bucket is made of RAM rather than ROM. Its comparator then selects the overall Nearest Match from amongst these and copies its Output to the effectors.

The ROM Templates incidentally will never be sorted into any kind of order in the Dynism's memory, either with respect to their placement in a bucket or the placement of the buckets themselves. This is because they must be `free' to evolve into whatever form best enhances the Dynism's chances of survival.



We can now look at a more efficient Nearest Matching system the Dynism may then evolve. As you can see here, eight values can obviously be represented more compactly using `digital' patterns like these.

But then nearest-matching using the `analogue' system we've just seen becomes impossible. To show you why, let's imagine that a Dynism's sound sensor can now detect sixteen different sound amplitudes, and that it produces Input Patterns like these:
Let's also suppose just for the sake of illustration that the Dynism evolves templates for only four of these patterns; 3, 8, 10 and 15, with no Nulls. Using Analogue matching, this `12' Input Pattern would then nearest-match to within one square of both 8 and 15, not the 10 that it should. 
In order to find the `true' nearest-match, the Dynism must evolve a subcomparator that matches the Input Pattern to a bucket-like `look-up table' in the ROM containing all sixteen patterns. An internal sensor then uses this table to determine which of the four actual templates it is closest to. 

 

Clearly such a system would be absurd with such small patterns and memories, but not for larger ones. Imagine now that the Dynism acquires four sensors that produce a combined Input Pattern like this. It can then match each quadrant seperately with only a minor change to its memory structure.

Each ROM subcomparator now searches through its bucket for the Template with the closest set of such quadrant matches both absolutely and relatively. The first template in the bucket may for instance match like this; the quartet of numbers to the right of the template (plus the strength of the colour) shows the numerical differences between each quadrant. This template goes into the subcomparator's buffer as the first match.
The Subcomparator then looks down the bucket for a closer match. If it finds one, it copies it into its buffer in place of the first.

This template would then be replaced with one like this: If it proves to be the closest match in the bucket, the Subcomparator then passes it on to the RAM comparator to allow an even closer match to be found.

Unlike Analogue pattern matching, Digital pattern matching can be extended to patterns of any size with little loss in compactness and efficiency, although it does come at a slight price in speed. But then finding the optimum trade-off between benefits and penalties is as much a part of Denarian evolution as trial and error itself. - Or error and trial as that should perhaps really be.

Now you may be wondering why PereGaea evolves crude pattern-matching systems like these when a neural net system might be more efficient. Perhaps such a system does evolve, but it would then make my story about evolution on PereGaea hard to follow. In any case Neural Nets may not be the only Nearest Template matching systems that can arise on a world, others may predominate through Natural Selection like everything else. 

RETURN TO PEREGAEA