The ghost.pl immanence of the first working artificial intelligence is undergoing minor changes as the AI Mind becomes able to think with English prepositional phrases. At first the AI was able to use a preposition only to answer a where-question such as "where are you" and the Ai would respond "I AM IN THE COMPUTER". Now we need to implement a general ability of the AI to think with prepositional phrases loosely tied to nouns or verbs or adjectives or adverbs. The quasi-neuronal associative $seq tag may soon be re-purposed to lead not only from, say, nouns to verbs but also from nouns to prepositions. However a preposition is arrived at, it is time to implement the activation and retrieval of a whole prepositional phrase whenever the preposition itself is activated.
We begin experimenting by going into the MindBoot sequence and entering a $seq tag of "638=IN" for the verb "800=AM" in the knowledge-base sentence "I AM IN THE COMPUTER". The plan is to insert into EnVerbPhrase() some code to pass activation to the "638=IN" preposition when the AI thinks the innate idea "I AM IN...." So we insert some active code to capture the $seq tag and some diagnostic code to let us know what is happening. Ooh, mind-design is emotionally fun and intellectually exciting! The first thing captured is not a preposition but the "537=PERSON" noun when the AI is thinking, "I AM A PERSON". Next our fishing expedition lands a "638=IN" preposition when the AI issues the output "I AM" while trying to say "I AM IN THE COMPUTER".
Once the $seq tag has been captured, the AI software needs to determine if the captured item is a preposition. A search is in order. We search backwards in time for an @Psy concept-number matching the $seq tag and if we find a match we check its $pos tag for a "6=prep" match, upon which we assign the concept-number to the $prep variable in case we decide to send the designated preposition into the EnPrep() module for inclusion in thinking.
We go back into the code for assigning the $seq tag and in the same line of code we set the $tselp variable falsely and temporarily equal to the $verblock time, so that we may increment the $tselp variable until it becomes true. We insert some code that increments the phony $tselp time by unitary one and uses it to "split" each succeeding conceptual @Psy array row into its fourteen constituent elements, including "$k" which we check for a match with the designated $prep variable. We make several copies of the search-snippet, and it easily finds the $prep engram within just a few time-points of the verb-engram, but now we need to convert the series of search-snippets into a self-terminating loop that will terminate, Arnold, upon finding the prepositional engram in memory. But we have forgotten how to code such a loop in Strawberry Perl Five, so we go into another room of the Mentifex AI Lab and we fetch the books Perl by Example (Quigley) and PERL Black Book (Holzner) to seek some help. We find some sample code for an until loop on page 193 of Quigley. We do not initialize the scalar $tselp at zero, because we are searching for an English preposition quite near to the already-known time-point. For the sake of safety, we insert a line of "last" escape-code in the event that the incrementing $tselp value exceeds the $cns value. The resulting until loop works just fine and it locates the nearby English preposition for us.
Next we insert a warranted call to SpreadAct() into the EnVerbPhrase() module just after the point where Speech() has been called to speak the verb. We wish to set up a routine for spreading activation throughout a prepositional phrase not only after a verb but also after a noun or an adjective (e.g. "young at heart" or an adverb (e.g. "ostensibly at random"). In SpreadAct() we send the $aud tag associated with the located preposition directly into Speech() and the ghost.pl AI starts saying not just "I AM" but "I AM IN". We need to insert more code for finishing the prepositional phrase. By the way, these improvements or mental enhancements are perhaps making the AI Mind capable of much more sophisticated thinking than heretofore. The AI is using words without really knowing what the words mean in terms of sensory perception -- for which robot embodiment is necessary -- but the AI may nevertheless develop self-awareness on top of its innate concept of self or ego. Knowing how to use prepositions, the AI may become curious and ask the human users for all sorts of exploratory information.
Now in SpreadAct() we throw in a call to EnArticle(), even though we have not yet coded in the elocution of the object of the preposition. The AI says "I AM IN A" without stating the object of the preposition. Let us create a new $tselo variable for time of selection of object so that we may use SpreadAct() to zero in on the object and send it into the Speech()module. Finally the ghost.pl AI Mind says "I AM IN A COMPUTER".