KbRetro module of the

First Working AGI Mind in JavaScript

MindForth for robots -- ghost.pl for webservers


1. Diagram of the KbRetro Mind-Module


   /^^^^^^^^^\  KbRetro handles yes-or-no answers  /^^^^^^^^^\
  /   EYE     \  QUERY-IDEA      _________        /   EAR     \
 /             \   |A| | | |    / KbRetro \      /             \
|   _______     |  |N| | | |   /           \    |  Y            |
|  /old    \    |  |N| | | |  /   affirm    \   |   E           |
| / image   \   |  |A| | | |  | query-idea  |---|----S          |
| \ fetch   /   |  | | | | |  |             |   |               |
|  \_______/    | d| |N|h| |  |   attach    |   |  N            |
|               | o| |O|a| |  |   250=NOT   |---|---O           |
|  visual       | e| |T|v| |  |   flag      |   |               |
|               | s| | |e| |  |             |   |  M            |
|  memory       |  | | | | |  |   remove    |   |   A           |
|               |  | | | |c|  | associative |   |    Y          |
|  reactivation |  | | | |h|  |   tags      |   |     B         |
|               |  | | | |i|  |   from      |---|------E        |
|  channel      |  | | | |l|  |   query     |   |               |
|   _______     |  | | | |d|  |   idea      |---|-(no response) |
|  /old    \    |  |_|_|_|_|_  \___________/    |               |
| / image   \   | /   Psy    \                  |               |
| \ store   /---|-\ Concepts /                  |               |
|  \_______/    |  \________/                   |               |


2. Purpose

The KbRetro module retroactively "zaps" the knowledge-base (KB) of the AI Mind where a silent inference must wait for confirmation or negation by a human user.


3. Function

From its MindBoot() sequence, a mentifex-class AI Mind may know a general fact such as, "Women have a child," which would serve as a premise for a logical inference about any particular woman. You could also teach the AI Mind any number of other general facts such as, "Boys play games" or "Birds have wings." Once the AI knows the general fact, at some future time you may input a specific fact such as "Anna is a woman" or "John is a boy", and the AI will not only make a silent inference but also use the AskUser mind-module to ask for confirmation or refutation of the inference.

Netizens may try it out with http://ai.neocities.org/FirstWorkingAGI.html by using Internet Explorer to input "anna is a woman". Then the AI may ask you, "Does Anna have a child?" There are four possible answers anticipated by the AI software: Yes; No; maybe; or no answer at all. Then the KbRetro() module adjusts the knowledge base (KB) with the answer. If the answer is "Yes", the KbRetro() module sets a positive value on the tru(th) flag for the inference being confirmed as true.


Details for AI Mind Maintainers

If you click on the JavaScript checkbox for the Diagnostic user-mode and you enter "anna is a woman", you should see a portion of the conceptual "psy" array and the auditory "aud" array displaying both your input in the AI knowledge-base (KB) and the formation of a silent inference among concepts:

Concepts with associative tags for Natural Language Understanding:
krt tru psi hlc act mtx jux pos dba num mfn pre iob seq tkb rv
696.                                         696. 0
697.                                         697. A 0
698.                                         698. N 0
699.                                         699. N 0
700. 0 502 1 0 0 0 5 1 1 2 800 703 697       700. A 0 502
701.                                         701. 0
702.                                         702. I 0
703. 0 800 1 -34 0 0 8 4 1 2 0 502 726 702   703. S 0 800
704.                                         704. 0
705. 0 101 1 -36 0 0 1 0 1 2 0 0 0 0 705     705. A 0 101
706.                                         706. 0
707.                                         707. W 0
708.                                         708. O 0
709.                                         709. M 0
710.                                         710. A 0
711. 0 515 1 -38 0 0 5 0 1 2 0 0 707         711. N 0 515
712.                                         712. 0
713.                                         713. 0
714. 502 40 5 1 810 715                      714.
715. 810 8 502 525 716                       715.
716. 525 32 618                              716.
717.                                         717.
718.                                         718. D 0
719.                                         719. O 0
720.                                         720. E 0
721. 0 830 1 -40 0 0 8 0 1 2 0 0 0 0 718     721. S 0 830
722.                                         722. 0
723.                                         723. A 0
724.                                         724. N 0
725.                                         725. N 0
726. 0 502 1 -42 0 0 5 1 1 2 810 731 723     726. A 0 502
727.                                         727. 0
728.                                         728. H 0
729.                                         729. A 0
730.                                         730. V 0
731. 0 810 1 -44 0 0 8 4 0 2 0 525 737 728   731. E 0 810
732.                                         732. 0
733.                                         733. C 0
734.                                         724. H 0
735.                                         735. I 0
736.                                         736. L 0
737. 0 525 1 -46 0 0 5 4 0 2 810 0 733       737. D 0 525
738.                                         738. 0

The silent inference at time-points 714-716 above is purely conceptual and has no auditory engrams or auditory words associated with it. It contains the concepts 502=ANNA, 810=HAVE and 525=CHILD. Each concept in the silent inference does not yet have its full complement of associative tags in the flag-panel. The AskUser() module asks the user "DOES ANNA HAVE CHILD" in order to confirm or negate the inference. If the user enters "NO" as an answer, the KbRetro() module retroactively adjusts the knowledge base to negate the silent inference.

713.                                         713. 0
714. 0 502 ? -22 0 0 5 1 0 0 0 0 810 715 0   714.
715. 0 810 ? 82 0 250 8 0 0 0 0 525 716 0    715.
716. 0 525 ? 82 0 0 5 4 0 0 810 0 0 0 0      716.
717.                                         717.
Notice that the 810=HAVE verb now has a 250=NOT tag to negate the silent inference, and the AI typically states the negated idea, "ANNA DOES NOT HAVE A CHILD." KbRetro() has retroactively gone into the conceptual knowledge-base to change the state of knowledge about the 502=ANNA concept. The other associative tags are also filled in.


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

sub KbRetro() {  # http://ai.neocities.org/KbRetro.html 
# print "KbR: VL= $verblock negjux= $negjux jux= $jux \n"; # 2018-07-06: TEST
  if ($kbzap == 432 || $kbzap == 404) {  # 2018-06-26: if 432=YES or 404=NO...
    if ($kbzap == 404) {  # 2018-06-26: 404=NO; 
      my @k=split(',',$psy[$tkbn]);  # 2018-07-01: adjust noun of silent inference;
      $psy[$tkbn]="8,$k[1],en,$k[3],$k[4],$k[5],$k[6],$k[7],"  # 2018-07-01
      . "$k[8],$k[9],$k[10],$k[11],$k[12],$k[13],$k[14]";  # 2018-07-01
      @k=split(',',$psy[$tkbv]);  # 2018-07-01: at time of KB-verb adjustment;
#     $psy[$tkbv]="0,$quverb,en,64,$k[4],250,8,$k[7],"  # 2018-07-01
      $psy[$tkbv]="0,$quverb,en,32,$k[4],250,8,$k[7],"  # 2018-07-05: TEST
      . "0,0,$qusub,$k[11],$quobj,$tkbo,$k[14]";  # 2018-06-28
    }  # 2018-06-26: end of test for a no-answer.
    if ($kbzap == 432) { # 2018-06-26: 432=YES; 
      my @k=split(',',$psy[$tkbn]);  # 2018-07-01: adjust noun of silent inference;
      $psy[$tkbn]="8,$k[1],en,$k[3],$k[4],$k[5],$k[6],$k[7],"  # 2018-07-01
      . "$k[8],$k[9],$k[10],$k[11],$k[12],$k[13],$k[14]";  # 2018-07-01
      @k=split(',',$psy[$tkbv]);  # 2018-06-26: at time of KB-verb adjustment;
#     $psy[$tkbv]="0,$quverb,en,64,$k[4],$k[5],8,$k[7],"  # 2018-07-01
      $psy[$tkbv]="0,$quverb,en,32,$k[4],$k[5],8,$k[7],"  # 2018-07-05: TEST
      . "0,0,$qusub,$k[11],$quobj,$tkbo,$k[14]";  # 2018-06-28
    }  # 2018-06-26: end of test for a yes-answer.
  } else {  # 2018-06-26: if neither yes nor no answer comes in...
    my @k=split(',',$psy[$tkbn]);  # 2018-06-26: remove pre and seq tags from noun; 
    $psy[$tkbn]="$k[0],$k[1],en,$k[3],$k[5],$k[6],$k[7],"  # 2018-06-28
    . "$k[8],$k[9],0,$k[11],0,0,$k[14]";  # 2018-06-26: no pre, seq or tkb.
    @k=split(',',$psy[$tkbv]);  # 2018-06-26: remove pre and seq tags from verb; 
#   $psy[$tkbv]="$k[0],$k[1],en,$k[3],$k[4]$k[5],$k[6],$k[7],"  # 2018-06-28
    $psy[$tkbv]="$k[0],$k[1],en,$k[3],$k[4],$k[5],$k[6],$k[7]," # 2018-07-06
    . "$k[8],$k[9],0,$k[11],0,0,$k[14]";  # 2018-06-26: no pre, seq or tkb.
  }  # 2018-06-26: end of test for either yes or no.  
  $quobj = 0;  # 2018-06-26: reset for safety.
  $tkbn = 0;   # 2018-06-26: reset for safety; 
  $tkbv = 0;   # 2018-06-26: reset for safety; 
}  # 2018-06-26: KbRetro() returns to EnThink()


5. Troubleshooting and Robotic Psychosurgery

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


6. Variables

$kbzap -- ZAP the knowledge base -- is a variable that holds the oldpsi word "YES" or "NO" when the InFerence() module has caused the AskUser() module to seek confirmation or denial of a silent inference from a human user engaged in a conceptual conversation with the AI Mind. KbRetro() uses the YES-value kbzap to confirm an inference, or the NO-value of kbzap to negate an inference.

$quobj -- query object – holds onto the psi identifier of a word chosen by the InFerence() module to be the direct object of a query created by the AskUser() module.

$qusub -- query subject – is a transfer-vehicle of the subject-identifier from any module prompting a question into the specific module that will ask the question.

$quverb -- query verb – is set in the InFerence() module with the identifier of a verb concept serving as part of an InFerence being made about user input. Then the AskUser() module transforms the quverb identifier into the yes-or-no-verb identifier ynverb so that AskUser() can use the query-verb to ask a question expecting a yes-or-no answer.

$tkbn -- time-in-knowledge-base-noun -- is set in the InFerence() module as the concept-array time-point of the subject-noun in a yes-or-no question to be asked of the human user by AskUser() to confirm or negate an InFerence being made by the logical InFerence module.

$tkbo -- time-in-knowledge-base-object -- is set in the InFerence() module as the concept-array time-point of the direct-object-noun in a silent InFerence to be confirmed or negated retroactively by the KbRetro() module after a human user has responded to a question posed by the AskUser() module. May be similar to tdo in the EnParser() module, but tkbo is the last of three consecutive time-points in the silent InFerence created by the InFerence() module for automated reasoning.

$tkbv -- time-in-knowledge-base-verb -- is the time-point of a verb-concept in an AskUser() question for a human user to confirm or deny the truth of a logical InFerence made by the AI.


7. Future Development


8. Resources

Please see

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

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

http://groups.google.com/group/comp.ai.nat-lang

http://groups.google.com/group/sci.logic


Wikipedia
* http://en.wikipedia.org/wiki/Modularity_of_Mind
* http://en.wikipedia.org/wiki/Language_module
* http://en.wikipedia.org/wiki/Double_negative
* http://en.wikipedia.org/wiki/Double_negative_elimination
* http://en.wikipedia.org/wiki/Negation
* http://en.wikipedia.org/wiki/Negation_normal_form
* http://en.wikipedia.org/wiki/Logic
* http://en.wikipedia.org/wiki/First-order_logic
* http://en.wikipedia.org/wiki/If_and_only_if
* http://en.wikipedia.org/wiki/Logical_conjunction
* http://en.wikipedia.org/wiki/Logical_disjunction
* http://en.wikipedia.org/wiki/Reasoning
* http://en.wikipedia.org/wiki/Automated_reasoning
* http://en.wikipedia.org/wiki/Syllogism
* http://en.wikipedia.org/wiki/Category:Computational_linguistics


9. AiTree of First Working AGI Mind-Modules


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