Tuesday, April 14, 2009

Arachneuron Lists in Action

The simple activities of reciting a list of primitives (musical notes, colors, or letters) and verifying that a given list that is read in by Arachneuron's senses matches the expected list of primitives can be accomplished by 3 levels, each level containing different data structures. All 3 levels feature the same basic data structure, a node (called a pnode) containing 2 words of data. Each word is 32 bits long. The first word contains either a pointer to another node or an atom (a musical note/interval, a color, or a letter). The second word contains a pointer to another node. (A musical interval is the difference between adjacent notes in a melody.) The top level contains the list of primitives. Each node in this list contains an atom and a pointer to the next node in the list. The middle level contains numerous random tuples. Each tuple consists of two atoms. Each atom is a musical note, a color, or a letter. All atoms of all tuples in the middle layer are of the same type: a musical note, a color, or a letter. The bottom layer sends atom values read in by Arachneuron's senses to the middle layer, and sends atom values from the middle layer to Arachneuron's output facilities.

Reciting a Melody

All atoms in the musical note list in the top layer are musical intervals (differences between adjacent notes). Somewhere else in Arachneuron's brain the musical key is chosen (the first note in the melody). This musical note is sent to the middle layer, and a list of all tuples starting with that note is generated. This list is composed of pnodes, the first word in the pnode points to the tuple and the second word points to the next pnode in the list. A second list of tuples is generated, in which the difference between the atoms in those tuples equals the current musical interval in the top layer. Both lists are sorted by the first atom of each tuple. A merge operation is performed on both lists. If any tuple occurs in both lists, then a match is found, and the second atom in that tuple is sent to the bottom layer (the next predicted note in the melody), and the next musical interval in the top layer becomes the current musical interval, and processing continues. If no match is found, or if the incoming musical note heard by Arachneuron's ear that was just spoken by Arachneuron doesn't match, then the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer).

Listening to a Melody

This is very similar to reciting a melody. The expected melody is activated in the top layer. After the merge operation, if a match is found (a tuple occurring in both lists in the middle layer), the predicted note is sent to the bottom layer. If it matches the incoming note from Arachneuron's ear, then all is well, and processing continues in the top layer. Otherwise, the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer).

Reciting a Color List

This is very similar to reciting a melody, except all atoms in the list in the top layer are colors (24-bit values, consisting of red, green, and blue bytes). The first color in the chosen list is sent to the middle layer, and a list of all tuples starting with that color is generated. This list is composed of pnodes, the first word in the pnode points to the tuple and the second word points to the next pnode in the list. A second list of tuples is generated, in which the second atom in the tuple matches the next atom or color in the chosen list. A merge operation is performed on both lists. If any tuple occurs in both lists, then a match is found, and the first atom in that tuple is sent to the bottom layer. If the incoming color sensed by Arachneuron's eye that was just painted by Arachneuron doesn't match, then the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer). Otherwise, the next color in the top layer becomes the current color, and processing continues.

Perceiving a Color List

This is very similar to reciting a color list. The expected color list is activated in the top layer. After the merge operation, if a match is found (a tuple occurring in both lists in the middle layer), the predicted color is sent to the bottom layer. If it matches the incoming color from Arachneuron's eye, then all is well, and processing continues in the top layer. Otherwise, the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer).

Reciting a Word

This is very similar to reciting a color list, except all atoms in the list in the top layer are letters (ASCII characters). The first letter in the chosen word is sent to the middle layer, and a list of all tuples starting with that letter is generated. This list is composed of pnodes, the first word in the pnode points to the tuple and the second word points to the next pnode in the list. A second list of tuples is generated, in which the second atom in the tuple matches the next atom or letter in the chosen list. A merge operation is performed on both lists. If any tuple occurs in both lists, then a match is found, and the first atom in that tuple is sent to the bottom layer. If the incoming letter heard by Arachneuron's ear that was just spoken by Arachneuron doesn't match, then the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer). Otherwise, the next letter in the top layer becomes the current letter, and processing continues.

Listening to a Word

This is very similar to reciting a word. The expected word is activated in the top layer. After the merge operation, if a match is found (a tuple occurring in both lists in the middle layer), the predicted letter is sent to the bottom layer. If it matches the incoming letter from Arachneuron's ear, then all is well, and processing continues in the top layer. Otherwise, the top layer is informed that an error condition has occurred. The top layer then may inform its parent layer (an even higher-level layer).

Error Recovery

The process of reciting lists of atoms, or verifying a given list of atoms against incoming sensory data, should be able to gracefully cope with simple error conditions, such as a missing atom, an extra atom, or a transposition of 2 adjacent atoms. Also, near matches of colors and off-by-one matches of musical intervals should be dealt with gracefully. The above functionality has yet to be implemented.

No comments:

Post a Comment