AskUser module of the

English and Russian bilingual AI in Perl

Mens Latina in Latin -- MindForth for Robots

1. Cognitive architecture Diagram of the AskUser Mind-Module

The asking of a simple question requires an auxiliary verb.

   /^^^^^^^^^\Generation of "Does John read books?"/^^^^^^^^^\
  /   EYE     \  Auxiliary +Subject +Verb +Object /   EAR     \
 /             \    | | |    ___________         /             \
|   _______     |   | | |   / Sentence  \       |               |
|  /"book" \    |   | | |   \___________/-------|-------------\ |
| / percept \---|---|-|-+     |        \        |             | |
| \ engram  /   |  r|s|b|     |        _\____   |             | |
|  \_______/    |  e|t|o|     |       /EnVerb\  |             | |
|               |  a|u|o|     |      ( Phrase ) |             | |
|               |  d|d|k|     |      /\______/  |             | |
|   visual      |   |e|s|     |     /    / |    |  auditory   | |
|               |   |n| |  ___|__  /    /  |    |             | |
|   memory      |   |t| | /EnNoun\/   _/_  |    |  memory     | |
|               |   |s| |( Phrase )  /Aux\ |    |             | |
|   channel     |   | | | \______/   \___/ |    |  channel    | |
|               |   | | |     |        \   |    |     ____    | |
|               |   | | |     |         \  |    |    /    \   | |
|   _______     |   | | |     |         _\_|_   |   /"does"\  | |
|  /fresh  \    |   |_|_|    _|___     / En  \  |  / "John" \ | |
| / image   \   |  /     \  / En  \   / Verbs \-|-/  "read"  \| |
| \ engram  /---|--\ Psi /-/ Nouns \  \_______/ | \  "books" /  |
|  \_______/    |   \___/  \_______/------------|--\________/   |

2. Purpose of the AI4U Textbook AskUser Mind-Module

The AskUser mind-module has several purposes. One is to ask the human user a question seeking confirmation or negation of a logical InFerence made by the InFerence module. Another purpose is to let the Volition module decide to ask various questions in pursuit of conducting a conversation with the human user.

3. Algorithm of the AI4U Textbook AskUser Module

Whereas the SpreadAct module causes the AI to spread so much activation to a sequence of concepts that they surface in the output of the AI as a response to a query submitted by a human user, the AskUser module is engineered to ask specific questions of a human user in specific situations.

3.A. Ask a yes-or-no question to validate or reject a silent inference.

When the InFerence module makes a silent inference on the basis of input data, various parameters such as the subject of the inference, the verb involved, and the direct object of the inferred verb, are fed as variables to the AskUser module so that the AI may ask a human user if the inference is true. When the user answers "yes" or "no" or "maybe" or no answer at all, the KbRetro module retroactively adjusts the inferred idea in the knowledge base (KB) so that the AI may either use or disregard the idea in the future.

If you tell a mentifex-class AI Mind a general fact, such as "Women have a child" or "Boys play games" and you then input a specific fact such as "Mary is a woman" or "John is a boy", the AI will make a silent inference and then use the AskUser mind-module to ask for confirmation or refutation of the inference.

You can try it out with by using Internet Explorer to input "Mary is a woman". Then the AI will ask you, "Does Mary 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 your answer.

3.B. Ask a question out of AI curiosity.

Some versions of the AI Mind, MindForth in particular, are being coded to ask "Who are you?" if there has been no contact with the outside world after an arbitrary interval as specified by the AI coder or AI mind maintainer. Although this question needs to be reworked so that it arises spontaneously as an initiative undertaken at the behest of the Volition module for free will in robots, the question is important because any previous user may have departed from the scene and the AI Mind may need to become aware that it is dealing with a different user than before.

MindForth is the first AI Mind to implement the ability of the AskUser module to ask a who-question like "Who are you?" based upon a kind of artificial curiosity caused by an arbitrarily long period without any human input. The isolation flag is incremented one-by-one for any thought-cycle with no human input until a threshold level decreed by the AI mind maintainer sets the whoq flag to a unitary positive one, which prepares the AI to ask a question but does not yet actually ask the question. When human input causes the isolation flag to be reset to zero, the MindForth Volition module calls AskUser to start a conversation with "WHO ARE YOU". As long as the human user remains in conversation with the artificial intelligence, brief periods of no human input will not re-trigger the question of "WHO ARE YOU", because presumably a realistically long threshold has been set by the AI coder or mind-maintainer. It is important that the Volition module ask the question, so that psychological priorities may influence not only what question is asked, but indeed whether any question at all is asked. It is also significant that the questions asked by the AskUser module facilitate the man-machine dialog or conversation which is the hallmark of a true artificial intelligence.

3.C. Cycle through a delay-loop while the AI waits for a human response.

Normally the AI Mind will perform one mental operation after another without any delay, but a delay-loop serves the purpose of giving the human user time to respond to the artificial intelligence after the AI asks the user a question.

4. Code of AskUser() from AI source code in Perl

sub AskUser() {  #
  $moot = 1;  # 2019-10-23: prevent associative tagging during question TEST; TRUNCATE
  $pov = 1;  # 2018-06-26: 1=internal; 2=external;  
  $tsj = 0;  # 2019-10-23: zero out any input time-of-subject
  $quobjaud = 0;  # 2018-06-26: safety measure; 
  if ($ynverb == 0) {  # 2018-06-26: ask y/n question only once; 
    $ynverb = $quverb;  # 2018-06-26: isolate at start; 
    $moot = 1;  # 2018-06-26: prevent storing of "tkb" and "seq"; 
    $auxverb = 818;  # 2018-12-10: 818=DO as auxiliary verb; 
    $prsn = 3;  # 2018-10-08: assumption; otherwise track value thru code.
    EnAuxVerb();  # 2018-12-10: Say 818=DO or DOES; 
    $auxverb = 0;  # 2018-06-26: reset for safety; 
    $moot = 0;  # 2018-06-26: reset after use;
    for (my $i=$inft; $i>$midway; $i--) {  # 2019-10-21: find the query-subject
      my @k=split(',',$psy[$i]);  # 2018-06-26: examine @psy array;
      if ($k[1] == $qusub) {  # 2018-06-26: if query-subject found; 
        $aud = $k[20];  # 2019-08-01: assign auditory recall-tag; 
        last;  # 2018-06-26: exit the loop after first find; 
      }  # 2018-06-26: end of test for query-subject; 
    }  # 2018-06-26: end of loop in search of quobj. 
    Speech();  # 2019-10-21: speak query-subject starting at "aud" value; 
    if ($quverb == 0) { $quverb = 818 }  # 2018-12-10: 818=DO default; 
  # for (my $i=$inft; $i>$midway; $i--) {  # 2019-10-13: skip silent inference; 
  #   my @k=split(',',$psy[$i]);  # 2019-10-13: examine @psy array;
  #   if ($k[1] == $quverb) {  # 2019-10-13: even if not infinitive
  #     $aud = $k[20];  # 2019-10-13: assign most recent recall-tag; 
  #     last;  # 2019-10-13: exit the loop after first find; 
  #   }  # 2019-10-13: end of test for any instance of the $quverb.
  # }  # 2019-10-13: end of search for quverb in case infinitive is not found.
    $moot = 1;  # 2019-10-21: prevent storage of associative tags with query-verb.
    for (my $i=$inft; $i>$midway; $i--) {  # 2019-10-21: find the query-verb
      my @k=split(',',$psy[$i]);  # 2018-06-26: examine @psy array;
      if ($k[1] == $quverb && $k[7] == 0) {  # 2018-10-08: infinitive dba=0
        $aud = $k[20];  # 2019-08-01: assign most recent recall-tag; 
        last;  # 2018-06-26: exit the loop after first find; 
      }  # 2018-06-26: end of test for $quverb.
    }  # 2018-06-26: end of loop in search of yes-or-no ("yn") quverb; 
    $verbprsn = 0;  # 2018-06-26:  Store the verb as an infinitive form; 
    $audnum = 0;    # 2018-06-26:  infinitive without num(ber); 
    $holdnum = 0;   # 2018-06-26:  infinitive without num(ber); 
    $infincon = 1;  # 2018-06-26:  set flag to positive one; 
    $nphrnum = 0;   # 2018-06-26: for no influence on infinitive; 
    $numsubj = 0;   # 2018-06-26:  for no influence on infinitive; 
    $putnum = 0;    # 2018-06-26:  for insisting on zero num infinitive; 
    $dba = 0;       # 2019-10-21: for storage of infinitive form. TEST; TRUNCATE IF ACCEPTED
    $moot = 1;  # 2019-10-23: prevent storage of associative tags with query-verb.
    Speech();      # 2018-06-26:  speak the verb starting at "aud" value; 
    $moot = 0;  # 2019-10-21: end of $moot stoppage of forming associative tags for verb.
    if ($quobj == 0) { $quobj = 711 }  # 2018-06-26: 711=ANYTHING default; 
    for (my $i=$inft; $i>$midway; $i--) {  # 2018-06-26: skip silent inference; 
      my @k=split(',',$psy[$i]);  # 2018-06-26: examine psy concedptual array;
      if ($k[1] == $quobj) {  # 2018-06-26: if query-object found; 
        if ($k[7]==4) {  # 2018-06-26: dba=4 accusative? 
          $quobjaud = $k[20];  # 2019-08-01: hold thru EnArticle(); 
          $usx=0;  # 2018-09-19: Suppress "THE" in the EnArticle() module. 
          $us1=0;$us2=0;$us3=0;$us4=0;$us5=0;$us6=0;$us7=0; # 2018-09-19
          EnArticle();  # 2018-06-26: insert "A" or "THE" article.
          $aud = $quobjaud;   # 2018-06-26: restore after EnArticle; 
          last;  # 2018-06-26: exit the loop after first grammatical find; 
        }  # 2018-06-26: end of test for accusative dba=4.
      }  # 2018-06-26: end of test for $quobj.
    }  # 2018-06-26: end of loop in search of quobj; 
    $dirobj = 1;  # 2018-06-26: So OldConcept will set "dba" = 4 (accusative) 
    Speech();     # 2018-06-26: say object word starting at "aud" value; 
    $dirobj = 0;  # 2018-06-26: Reset for safety after asking question; 
    $yncon = 0;   # 2018-06-26: assuming question has been asked; 
    $kbcon = 1;   # 2018-06-26: because waiting for answer; 
    $ynverb = 0;  # 2018-06-26: zero out; prevent repeat of query; 
  }  # 2018-06-26: end of test of ynverb; 
  if ($subjpsi==701) { $prsn=1; }  # 2018-06-26:  1st person "I"; 
  if ($subjpsi==731) { $prsn=1; }  # 2018-06-26:  1st person "WE"; 
  if ($subjpsi==707) { $prsn=2; }  # 2018-06-26:  2nd person YOU; 
  if ($subjpsi==713) { $prsn=3; }  # 2018-06-26:  3rd person HE; 
  if ($subjpsi==719) { $prsn=3; }  # 2018-06-26:  3rd person SHE; 
  if ($subjpsi==725) { $prsn=3; }  # 2018-06-26:  3rd person IT; 
  if ($subjpsi==743) { $prsn=3; }  # 2018-06-26:  3rd person THEY; 
  $numsubj = 0;  # 2018-06-26: reset for safety; 
  $qusnum = 0;   # 2018-06-26: reset for safety; 
  $qusub = 0;    # 2018-06-26: reset for safety; 
  $recon = 0;    # 2018-06-26: remove incentive for asking a question.
  $bias = 5;     # 2018-06-26: restore expectation of a noun; 
  my $rsvp = 0;  # 2018-06-2016: counter for response-delay;
  until ($rsvp == 100000) {  # 2018-06-26: upper limit on count;
    $rsvp++;  # 2018-06-26: Increment $rsvp counter
  }  # 2018-06-26: end of loop waitng for user-response.
  $pov = 2;  # 2018-06-26: 1=internal; 2=external; 
}  # 2019-10-13: AskUser() returns to EnThink()

5. Variables for the AskUser Module of the AI Mind

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

$audnum -- grammatical num(ber) variable potentially of use for locating an infinitive verb-form with zero as a grammatical num(ber).

$auxverb -- auxiliary verb such as "DOES" or "HAS".

$bias -- expected part-of-speech for any parsing module.

$dirobj -- flag indicates seeking for a direct object.

$holdnum -- transfers number from subject to verb.

$infincon -- infinitive condition flag

$kbcon -- flag for KbRetro to wait for a yes-or-no answer.

$moot -- as in legally moot -- is a flag to prevent the formation of associative tags during mental operations which are not truly a part of cognition, such as the processing of an input query, the formation of a silent InFerence, or the creation of an output query.

$nphrnum -- grammatical number of noun-phrase.

$numsubj -- for number of subject.

$pov -- point-of-view: 1=self; 2=dual; 3=alien. When pov=1, the word "you" is somebody in the external word. When pov=2, the word "you" refers to the self-concept "I" in the AI. When pov=3, the word "you" is interpreted as part of a conversation by a third-party or as a word in a text, not referring to the self-concept of either the AI or of someone talking to the AI.

$putnum -- putative num(ber) for subject-verb agreement.

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

$quobjaud -- auditory recall-tag for AskUser module

$qusnum -- query-subject number – for the AskUser module to ask a question seeking yes-or-no confirmation of a logical inference made by the AI Mind.

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

$recon -- incentive for reconaissance by asking a question.

$rsvp -- to hold an arbitrary value for a delay in thinking to wait for user input.

$verbprsn -- verb-person -- reverting to zero for infinitive forms.

$yncon -- yes-or-no condition – is a status flag that a module like InFerence() can set to a positive one in order to trigger the calling of the AskUser() module by the English EnThink() module.

$ynverb -- yes-or-no-verb – identifier of a verb to be used in AskUser() for the asking of a question expecting a yes-or-no answer.

6. Troubleshooting and Debugging for AI Mind Maintainers

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

6.2.a. Symptom: AI asks confirmation question lacking a verb.
6.2.b. Solution: The AI Mind needs to have the query-verb in the MindBoot sequence as an infinitive form with a dba=0 indicating that the verb is not in first person or second person or third person.

7. Future Development of the AskUser AI Mind-Module

The name of the module should perhaps be changed from "AskUser" to "Inerrogative" as a verb-mood along with "Indicative" and "Imperative."

  • Roadmap to Artificial Intelligence

    8. Resources for the AskUser module

    9. Spread the News on TikTok and Other Venues

    Are you on TikTok? Are you eager to be a ThoughtLeader and Influencer?
    Create a TikTok video in the following easy steps.

    I. Capture a screenshot of
    for the background of your viral TikTok video.

    II. In a corner of the screenshot show yourself talking about the AskUser module.

    III. Upload the video to TikTok with a caption including all-important hash-tags which will force governments and corporations to evaluate your work because of FOMO -- Fear Of Missing Out:
    #AI #ИИ #brain #мозг #ArtificialIntelligence #ИскусственныйИнтеллект #consciousness #сознание #Dushka #Душка #psychology #психология #subconscious #подсознание
    #AGI #AiMind #Alexa #ChatAGI #chatbot #ChatGPT #cognition #cyborg #Eureka #evolution #FOMO #FreeWill #futurism #GOFAI #HAL #immortality #JAIC #JavaScript #linguistics #metempsychosis #Mentifex #mindmaker #mindgrid #ML #neuroscience #NLP #NLU #OpenAI #OpenCog #philosophy #robotics #Singularity #Siri #Skynet #StrongAI #transhumanism #Turing #TuringTest #volition

    A sample video is at

    10. AiTree of Mind-Modules for Natural Language Understanding

    Nota Bene: This webpage is subject to change without notice. Any Netizen may copy, host or monetize this webpage to earn a stream of income by means of an affiliate program where the links to Amazon or other booksellers have code embedded which generates a payment to the person whose link brings a paying customer to the website of the bookseller.

    This page was created by an independent scholar in artificial intelligence who created the following True AI Minds with sentience and with limited consciousness.

  • -- MindForth Robot AI in English.

  • -- Forth Robot AI in German.

  • -- Robot AI thinks in English and in Russian.

  • -- JavaScript Robot AI Mind thinks in English.

  • -- JavaScript Robot AI Mind thinks in Latin.

  • -- JavaScript Robot AI Mind thinks in Russian.

    The following books describe the free, open-source True AI Minds.

    AI4U --

    AI4U (paperback) --

    AI4U (hardbound) --

    The Art of the Meme (Kindle eBook) --

    Artificial Intelligence in Ancient Latin (paperback) --

    Artificial Intelligence in Ancient Latin (Kindle eBook) --


    Artificial Intelligence in German (Kindle eBook) --

    InFerence at Amazon USA (Kindle eBook) --

    563 Mentifex Autograph Postcards were mailed in 2022 primarily to autograph collector customers at used bookstores to press the issue of whether or not the Mentifex oeuvre and therefore the autograph is valuable. These artwork-postcards with collectible stamps may be bought and sold at various on-line venues.


    See AI 101 AI 102 AI 103 year-long community college course curriculum for AI in English.
    See Classics Course in Latin AI for Community Colleges or Universities.
    See College Course in Russian AI for Community Colleges or Universities.
    Collect one signed Mentifex Autograph Postcard from 563 in circulation.
    See Attn: Autograph Collectors about collecting Mentifex Autograph Postcards.

    Return to top; or to
    Image of AI4U found at a book store
    The collectible AI4U book belongs in every AI Library as an early main publication of Mentifex AI.

    Website Counter