EnPrep English-preposition module of the

first working Artificial Intelligence

ghost.pl for webservers -- MindForth for robots


1. Diagram of the EnPrep Mind-Module


   /^^^^^^^^\   EnPrep Inserts an English Preposition   /^^^^\ 
  /   EYE    \            ___________________          / EAR  \ 
 /            \          /  EnThink module   \        /        \ 
|              |  | |    \___________________/       | auditory | 
|   _______    |  | |          |                     | memory   | 
|  / old   \   |  | |     _____V_____________        | channel  | 
| / image   \--|----+    /  Indicative       \       |          |
| \ engram  /  | a|c|f   \___________________/       |          | 
|  \_______/   | b|o|i     |              |          |          | 
|              | s|n|b    _V_            _V_         |          | 
|   visual     | t|c|e   /En-\          /En-\        | "GHOST"  | 
|              | r|e|r  /Noun-\        /Verb-\       |          | 
|   memory     | a|p|s (Phrase )      (Phrase )      | "LIVES"  | 
|              | c|t|   \_____/        \_____/       |          | 
|   channel    | t| |       \____________/           |          |
|              |  | |       /EnNounPhrase\           |          | 
|    ______    |  | |       \ "computer" /           | "IN"     | 
|   /      \   |  | |        \__________/            |          | 
|  /  new   \  |  | |         |       |              | "THE"    | 
| /  image   \ |  |_|_    ____V___   _V_________     |          | 
| \  engram  / | /     \ / EnPrep \ / EnArticle \    |"COMPUTER"| 
|  \        /  | \ Psy / \  "in"  / \  "the"    /    |          | 
|   \______/   |  \___/   \______/   \_________/     |          |


2. Purpose

EnPrep forms a prepositional phrase by inserting an English preposition, plus or minus an article, in front of a noun or pronoun.


3. Function

The AI Mind Maintainer may ordain that any activated noun, not serving as the subject or object of a verb, may be included in a nascent thought as the object of a sufficiently activated preposition. Thus a question like "Where does Ghost live?" might be answered with "Ghost lives in the computer."


4. Code of EnPrep() from ghost.pl First Working AGI in Perl

sub EnPrep() {  # http://ai.neocities.org/EnPrep.html
  for (my $i=$t; $i>$midway; $i--) {  # 2018-11-01: search backwards in time.
    my @k=split(',',$psy[$i]);  # 2018-11-01: inspect @psy knowledge-nodes.
    if ($k[6] == 6 && $k[10] == $qv2psi) {  # 2018-11-01:
      $tselp = $i;  # 2018-11-01: time of selection of preposition
      $prep = $k[1];  # 2018-11-01: for _any_ preposition
      $objprep = $k[12];  # 2018-11-01: turn "seq" into object-of-preposition
    }  # 2018-11-01: end of test for _any_ preposition linked to "quverb".
  }  # 2018-11-01: 2018-10-28: end of backwards loop.
  for (my $i=$tpu; $i>$midway; $i--) {  # 2018-11-01: search @Psy array
    my @k=split(',',$psy[$i]);  # 2018-11-01: inspect @psy knowledge-nodes.
    if ($k[1] == $prep) {  # 2018-11-01: if preposition is found;
      $aud = $k[14];  # 2018-11-01: one auditory engram is enough.
      last;  # 2018-11-01: one auditory engram is enough.
    }  # 2018-11-01: End of search for preposition
  }  # 2018-11-01: 2018-11-01: end of loop searching for preposition
  Speech();  # 2018-11-01: speak the preposition.
  EnArticle();  # 2018-11-01: say "A" or "THE" before object of [preposition.
  for (my $i=$tpu; $i>$midway; $i--) {  # 2018-11-01: search @Psy array
    my @k=split(',',$psy[$i]);  # 2018-11-01: inspect @psy knowledge-nodes.
    if ($k[1] == $objprep) {  # 2018-11-01: if object of preposition is found;
      $aud = $k[14];  # 2018-11-01: one auditory engram is enough.
      last;  # 2018-11-01: one auditory engram is enough.
    }  # 2018-11-01: End of search for object of preposition
  }  # 2018-11-01: 2018-11-01: end of loop searching for object of preposition
  Speech();  # 2018-11-01: speak the object of preposition
  $prepgen = 0;  # 2018-11-01: reset to avoid carry-over.
  $wherecon = 0;  # 2018-11-01: reset to avoid carry-over.
}  # 2016mar30: EnPrep() returns to a thought-generation module.


5. Troubleshooting and Robotic Psychosurgery

5.1.a. Symptom: (Something goes wrong.)
5.1.b. Solution: (AI Mind Maintainer devises solution.)


6. Variables for First Working Artificial General Intelligence

$aud -- in the Speech() module is an associative tag leading to the typically most recent engram of a word stored in the @ear array of the auditory memory channel.

$objprep -- object of a preposition to be found and spoken by the EnPrep module.

$prep -- a preposition used in the EnPrep mind-module for English prepositions.

$prepcon -- prepositional condition-flag for parsing.

$prepgen -- urgency to generate a prepositional phrase.

$seq -- subSEQuent @psy concept in an idea. As the AI Minds evolve, the associative seq tag may take on a new role as pointing from a noun or verb or adjective or adverb to an associated preposition.

$tselp -- time of selection of preposition - is used in the EnPrep English-preposition module to make sure by calculation that a verb being sought as used with a preposition is in close temporal proximity to the preposition, so that a query may be answered correctly with a response that mentions the query-subject qv1psi and the query-verb qv2psi and the selected preposition at the beginning of a prepositional phrase.

$wherecon -- flag for condition of answering a where-query.


7. Future Development

The AI Minds with the concept-based, first working artificial intelligence will evolve beyond simple subject-verb-object (SVO) thought-structures into mentalities which may include a prepositional phrase in association with any noun or verb or adjective or adverb. The seq flag may be used to attach a prepositional phrase to a previous word.


8. Resources


Please see

http://github.com/kernc/mindforth/blob/master/wiki/EnPrep.wiki


9. AiTree of First Working AGI Mind-Modules


Return to top; or to
javascript subreddit for AI Mind discussion;
Forth subreddit for MindForth discussion;
Perl subreddit for ghost.pl AI Mind Maintainers.