Imperative Module of the

(English and Russian) bilingual ghost.pl AI in Perl

Mens Latina in Latin -- MindForth for robots


1. Diagram of the Imperative Mind-Module

  /^^^^^^^^^^^\Imperative Mood Expresses a Command/^^^^^^^^^^^\
 /   EYE       \            _________________    /    EAR      \
|               |CONCEPTS  /                 \  |  ___________  |
|   _______     |   | | | / Volition FreeWill \ | / MindBoot  \ |
|  / old   \    |   | | | \___________________/ || memory vault||
| / image   \!!!|!!!|!|!| __|____  |   _|____   ||             ||
| \ recog   /---|---|-|-+(Emotion) |  /      \  || "students"  ||
|  \_______/    |   |s| | \_____/  | (RuThink ) || "read"      ||
|               |   |t| |   _______V  \______/  || "books"     ||
|               |   |u| |  /        \           | \___________/ |
|               |   |d|b| ( EnThink  )          |               |
|   visual      |  r|e|o|  \________/\_______   |oldest memories|
|               |  e|n|o|   |     |  /       \  |to be forgotten|
|   memory      |  a|t|k|   |     | (InFerence) |               |
|               |  d|s|s|   |     |  \_______/  |               |
|   channel     |   | | |   |    _V__________   |               |
|               |   | | |   |   / Imperative \  | "TEACH ME"    |
|               |   | | |   |   \____________/  | "SOMETHING"   |
|   _______     |   | | |  _V__________         |               |
|  /new    \    |   |_|_| ( Indicative )        |newest memories|
| / percept \   |  /     \ \__________/         |to be recycled |
| \ engram  /---|-(  Psy  )                     |automatically  |
|  \_______/    |  \_____/                      |by ReJuvenate()|


2. Purpose

The main purpose of the Imperative mood module is to let the first working artificial intelligence express its wishes as a command to other thinking entities, such as human users or the AI Mind Maintainers. A minor purpose is to summon human users after any period of neglect of the AGI Mind, possibly feeling bored or deprived of intellectual stimulation. The AGI may then ring a bell and issue an Imperative command of "TEACH ME SOMETHING".


3. Algorithm

In the AudInput module there is an $impetus counter which increments automatically whenever no input comes in from a human user. The AI Mind maintainer sets a numeric threshold for $impetus in the EnThink English-thinking module, so that an arbitrary period of no human input causes EnThink to call the Imperative module which issues a beeping noise and an English command: "TEACH ME SOMETHING". At the same time, the $impetus counter is reset to zero and program-flow "returns" from the EnThink module back up to a higher module, so that EnThink will not yet make any other statement in English, until the human user has a chance to enter some input. The issuing of the command not only makes the AI more interesting as a phenomenon; it also increases the likelihood that the humans around the AI will make an effort to educate the AI.


4. Code of Imperative() from the ghost274.pl AI Mind in Perl


sub Imperative() {  # http://ai.neocities.org/Imperative.html
 # if ($hlc eq "en") {  # 2017-12-05: TEST
    $output = "";  # 2017-12-03: display only an outreach message. 
    print "\a";  # 2018-09-19: Sound a beep to request attention from humans.
    for (my $i=$t; $i>$midway; $i--) {  # 2017-12-03: search for 882=TEACH
      my @k=split(',',$psy[$i]);  # 2017-12-03: examine @psy array;
      if ($k[1] == 882) {  # 2017-12-03: if 882=TEACH is found;
        $audjuste = $k[14];  # 2017-12-03: "TEACH" recall-vector;
        $aud = $k[14];  # 2017-12-03: "TEACH" recall-vector for Speech()
        if ($k[14]>0) { $aud=$k[14]; last }  # 2017-12-=03: insurance
      }  # 2017-12-03: End of search for 882=TEACH;
    }  # 2017-12-03: End of search loop from $t back to $midway.
    Speech();  # 2017-12-03: speak the word starting at the $aud time. 
    for (my $i=$vault; $i>$midway; $i--) {  # 2017-12-03: search for 701=ME
      my @k=split(',',$psy[$i]);  # 2017-12-03: examine @psy array;
      if ($k[1] == 701) {  # 2017-12-03: if 701=ME is found;
        if ($k[7] == 3) {  # 2017-12-03: if 3=dba inmdirect object dative case...
          $audjuste = $k[14];  # 2017-12-03: "ME" recall-vector;
          $aud = $k[14];  # 2017-12-03: "ME" recall-vector for Speech()
          if ($k[14]>0) { $aud=$k[14]; last }  # 2017-12-=03: insurance
        }  # 2017-1`2-03: end of test for dba=3 indirect-onject dative case.
      }  # 2017-12-03: End of search for 707=ME;
    }  # 2017-12-03: End of search loop from $t back to $midway.
    Speech();  # 2017-12-03: speak the word starting at the $aud time. 
    for (my $i=$t; $i>$midway; $i--) {  # 2017-12-03: search for 755=SOMETHING
      my @k=split(',',$psy[$i]);  # 2017-12-03: examine @psy array;
      if ($k[1] == 755) {  # 2017-12-03: if 755=SOMETHING is found;
        $audjuste = $k[14];  # 2017-12-03: "SOMETHING" recall-vector;
        $aud = $k[14];  # 2017-12-03: "SOMETHING" recall-vector for Speech()
        if ($k[14]>0) { $aud=$k[14]; last }  # 2017-12-=03: insurance
      }  # 2017-12-03: End of search for 755=SOMETHING;
    }  # 2017-12-03: End of search loop from $t back to $midway.
    Speech();  # 2017-12-03: speak the word starting at the $aud time. 
}  # 2018-09-19: Imperative() returns to the English-thinking EnThink() module.


5. Variables

$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.

$hlc -- human-language code; 1=en; 2=de; 3=ru. Subject to override by the $engov or $degov or $rugov flag.

$impetus -- an accumulating variable to hold the activation-level of a trigger to initiate action by the FreeWill Volition module.

$output -- output string as in JavaScript FirstWorkingAGI.html or ghost.pl AGI.


6. Troubleshooting and Robotic Psychosurgery

If there is any problem with the Imperative mood module, the AI Mind maintainer may attempt to troubleshoot the problem by changing the $impetus threshold for calling Imperative from the English-thinking EnThink module. Setting a lower threshold will cause the Imperative module to be called more frequently for purposes of debugging.

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


7. Future Development

The Imperative module needs to be further implemented with not only an English command being issued, but also a Russian command for the users to teach the AI, so that an AI Mind not being attended to by its human users will first call out in English for some attention, wait a while, and then call out in Russian for some attention.


8. Resources

http://medium.com/p/6fb6d07ca6e6
Students teach first working artificial intelligence.

http://groups.google.com/d/msg/comp.lang.perl.misc/amZ6KrMJgrg/CuaEpok0CgAJ
Students may teach the first working artificial intelligence.

http://cyborg.blogspot.com/search/label/Imperative -- is a special weblog URL which invites Netizens to view blog-posts discussing the Imperative mind-module.

http://cyborg.blogspot.com/2018/09/pmpj0919.html -- blogpost about Imperative.


9. AiTree of First Working AGI Mind-Modules


Return to top; or to
Tiananmen Square IV VI
javascript subreddit for AI Mind discussion;
Forth subreddit for MindForth discussion;
Perl subreddit for ghost.pl AI Mind Maintainers.
http://old.reddit.com/r/ControlProblem -- NOT SOLVED.
http://en.wikipedia.org/wiki/Natural_language_understanding -- solved.
If you have any questions about the First Working AGI, please Join the Discussion.