AudRecog auditory recognition module of the

English and Russian bilingual ghost.pl AI in Perl

Mens Latina in Latin -- MindForth for Robots


1. Cognitive architecture Diagram of AudRecog Auditory Recognition Mind-Module

   /^^^^^^^^^\  Auditory Recognition of "c-a-t-s"  /^^^^^^^^^\
  /    EYE    \ REACTIVATED                       /   EAR     \
 /             \ CONCEPTS                        /"CATS"=input \
|   _______     |   | | |    SEMANTIC MEMORY    |               |
|  /old    \!!!!|!!!| | |                       |  C     match! |
| / image   \---|-----+ |             ___       |  -A    match! |
| \ fetch   /   |   |c| |            /   \      |    R    stop  |
|  \_______/    |   |a| |           /     \     |     S   drop  |
|               |   |t| |          / Old-  \    |               |
|  visual       |   |s| |         ( Concept )   |  C     match! |
|               |  e| | |          \       /    |  -A    match! |
|  memory       |  a| | |          /\     /!!!!!|!!!!T   match! |
|               |  t| | |   ______/  \___/------|-----S  recog! |
|  reactivation |   | |f|  /      \             |               |
|               |   | |i| ( Parser )            |  C     match! |
|  channel      |   | |s|  \______/             |  -A    match! |
|   _______     |   | |h|      |                |  --T   match! |
|  /old    \    |   |_|_|     _V_________       |  ---S   busy  |
| / image   \   |  /     \   /           \      |      U  drop  |
| \ store   /---|--\ Psi /--( InStantiate )     |       P drop  |
|  \_______/    |   \___/    \___________/      |               |


2. Purpose of the AI4U Textbook AudRecog Auditory Recognition Module

The AudRecog() module uses quasi-neuronal activation to recognize words by matching up a chain of activated phonemes until the end of a word of input is reached and a matching word in auditory memory is either found, resulting in a call to the OldConcept mind-module, or not found, resulting in a call to the NewConcept mind-module.

The ghost.pl AI Mind in Perl uses an AudRecog() algorithm much simpler in construction than the older algorithm used in the older AI Minds. Since the introduction of the Perl AI, the @aud auditory array no longer uses the beg flag to hold on to the beginning of a word in memory, or the ctu continuation-flag to indicate whether a word continues from one phonemic character to the next. Instead, the ghost.pl AI and the newer versions of the MindForth AI dynamically ascertain whether a phonemic character is the beginning of a word in memory, and whether a phonemic character is the final character of a word stored in the auditory memory.

AudRecog() must eventually make the switch from keyboard entry of characters as if they were phonemes and morphemes, to actual acoustic input of sound-wave phonemes and morphemes.


3. Algorithm of the AI4U Textbook AudRecog Auditory Recognition Module

AudMem() calls AudRecog() to process each character of dynamic input from the keyboard or from the Speech() module during re-entry of output back into the AI Mind. For the first character of an input word, AudRecog() finds every initial instance of the same first character starting a word stored in memory as far back as the $midway time-point, which may be set to zero in early versions of the first working artificial intelligence.

As each additional character comes in, AudRecog() activates the next-in-line character in the thus-far matching stored word, for the sake of continuing the match-up with the next incoming character. The next incoming character continues the next-in-line activation only if the found character not only matches the input character but also carries the arbitrary activation ordained in the software by the AI Mind Maintainer. In that way, some partial recognitions die out and do not result in a final match, as soon as one stored character fails to match the input stream.

As the match-up process approaches the end of a word stored in the @ear auditory memory channel, enough of the stored word as to constitute a stem of an inflected word should have an $audpsi concept-number at the end of the row holding the final stem-character, such as the letter "K" in the stored plural word "BOOKS". Then the final letter itself will also have the $audpsi concept-number, so that either the stem or the full word for a concept may be recognized. As part of the same process for word-recognition, the AudMem() module stores not only the $audpsi concept-number at the end of a word being stored, but also at the end of an array-row holding the character calculated to be the end of the stem of a word.


4. Code of AudRecog() from the ghost299.pl AI Mind in Perl


sub AudRecog() {  # http://ai.neocities.org/AudRecog.html
  if ($len > 0 && $finlen == 0 && $pho eq chr(32)) { $finlen = $len }  # 2017-12-26
  if ($pho ne chr(13)&& $pho ne chr(32) && $pho ne "\N{U+0}") { # 2017-12-24: 
    if ($audrec  > 0) {  # 2017-03-16: if positive $audrec before end of word...
      if ($pho ne chr(83)) {  # 2017-03-15: keep audrec if current pho is 83=S  
        if ($audrec > 0) { $prc = $audrec }  # 2018-09-16: preserve non-final $audrec
        $audrec = 0;  # 2017-03-16: zero out non-final audrec.
      }  # 2017-03-15: end of test for final "S" as inflectional ending.
    }  # 2017-03-15: end of test for $audrec before word-end
  }  # 2017-03-15: end of test for an alphabetic character
  if ($pho eq chr(32) || $pho eq chr(13) || $pho eq "\N{U+0}") {  # 2017-126 
    if ($fyi > 0) {  # 2017-12-26: show message
    # print " AudR after audrec= $audrec finds CR-13 or SP-32 \n";  # 2017-12-26
    } # 2017-04-05: end of test for fyi=4 Diagnostic Mode.
    if ($audrec > 0) {  # 2017-03-15: if positive audrec before 32=SPACE...
      $audpsi = $audrec;  # 2017-03-15: recognized item becomes storage item.
    }  # 2017-03-15: end of test for a positive audrec before 32=SPACE
  }  # 2017-03-15: end of test for a positive audrec before 32=SPACE
  for (my $i=$spt; $i>$midway; $i--) {  # 2017-03-15: search backwards in time.
    if ($pho ne chr(32)) {  # 2017-03-15: disregard 32=SPACE pho until end of input. 
      my @aud=split(',',$ear[$i]);  # 2017-03-15: separate @ear rows into parts.
      if ($pho ne $aud[0]) { $ear[$i] = "$aud[0],0,$aud[2]" }  #2017-03-15: de-activate
      if ($pho eq $aud[0])  { # 2017-03-15: If incoming pho matches stored aud0;
        if ($aud[1]==0) { # 2017-03-15: if matching engram has no activation;
          my @prv=split(',',$ear[$i-1]);  # 2017-03-15: "@prv" for "previous" row.
          if ($prv[0] eq chr(13) || $prv[0] eq chr(32) || $prv[0] eq "\N{U+0}") { # 2017-12-24:
            if ($audrun < 2) { # 2017-03-15: "if comparing start of a word"
              my @nxr=split(',',$ear[($i+1)]);  # 2017-03-15: for next-in-line char
              if ($nxr[0] ne chr(13) && $nxr[0] ne chr(32)) {  # 2017-12-24
                $ear[$i+1] = "$nxr[0],8,$nxr[2]"; # 2017-03-15: "activate N-I-L charcter"
              }  # 2017-03-15: end of test for continuation of stored comparand. 
              my @aud=split(',',$ear[($i)]);  # 2017-03-15: for current char
              if ($aud[2] > 0)  {  # 2017-03-15: if concept number present
                $prc = $aud[2];  # 2017-12-26: provisional recognition
              }  # 2017-03-15: end of test for potential monopsi ultimate-tag
            }  # 2017-03-15: "end of test for audrun=1 start of word"
          }  # 2017-03-15: "end of test for a beg(inning) non-active aud0" 
        }  # 2017-03-15: "end of test for matching aud0 with no activation"
        my @aud=split(',',$ear[$i]);  # 2017-03-15: break apart @ear auditory array.
        if ($aud[1] > 0) {  # 2017-03-15: "If matching aud0 has activation"
          my @nxr=split(',',$ear[($i+1)]);  # 2017-03-15: for next-in-line char
          if ($nxr[0] eq $pho) {  # 2017-12-26: TEST
            $ear[$i+1] = "$nxr[0],8,$nxr[2]"; # 2017-12-26: "activate N-I-L character"
          }  # 2017-12-26: end of match-test
          if ($nxr[0] eq chr(13) || $nxr[0] eq chr(32) || $nxr[0] eq "\N{U+0}") { # 2017-12-26
            if ($aud[2] > 0) {  # 2017-03-15: check for an audpsi tag
              $prc = $aud[2]; # 2017-10-20: provisional recognition of a stem 
            }  # 2017-03-15: end of test for an available audpsi.
          }  # 2017-03-15: end of test for next-in-line non-alphabetic character.
          if ($aud[2] > 0) { $prc = $aud[2] }  # 2018-09-16: provisional recognition.
          if ($fyi > 0) {  # 2017-12-26: show message only during Diagnostic Mode    
          }  # 2017-04-05: end of test for fyi=4 Diagnostic Mode.
          if ($pho eq chr(32) || $pho eq chr(13) || $pho eq "\N{U+0}") { # 2017-12-26
            if ($audrec > 0) {  # 2017-03-15: if an audrec has been found...
              $audpsi = $audrec;  # 2017-03-15: send audpsi into AudMem
            } # 2017-03-15: end of test for a positive audrec
          }  # 2017-03-15: end of test for SPACE-32 or CR-13
          if ($pho ne chr(32)&& $pho ne chr(13)&& $pho ne "\N{U+0}") { # 2017-12-26
            my @nxr=split(',',$ear[($i+1)]);  # 2017-03-15: for next-in-line char
            if ($nxr[0] ne chr(32) && $nxr[0] ne "\N{U+0}" && $finlen==0) { # 2017-12-26
              $ear[$i+1] = "$nxr[0],8,$nxr[2]"; # 2017-03-15: "activate N-I-L character"
            }  # 2017-03-15: since next engram is a letter...
          }  # 2017-03-15: end of test for 32-SPACE after input word.
        }  # 2017-03-15: "End of test for matching aud0 with activation."
      }  # 2017-03-15: "End of test for a character matching 'pho'."
    }  # 2017-03-15: end of test for alphabet letter 
  }  # 2017-03-15: End of backwards search through auditory memory. 
  if ($audrec > 0) { $audpsi = $audrec }  # 2017-12-26: TEST 
  if ($prc > 0) {    # 2017-10-20: 
    $audrec = $prc;  # 2017-10-20: from Dushka RuAi; prov. recog;
    if ($audrec > 0) { $audpsi = $audrec }  # 2018-09-16: for passage to AudMem()
  }  # 2017-10-20
  $audrun++;   # 2017-03-15: audrun is only a counter, not a factor.
}  # 2017-03-15: End of AudRecog(); return to AudMem()


5. Variables for the AudRecog Auditory Recognition Mind-Module

$audpsi -- concept number of word in @ear auditory memory array.

$audrec -- auditory recognition concept-number.

$audrun -- in the AudRecog() module, which increments audrun, it is a counter of how many times the incrementing module has been called. If the audrun count is at unitary one or below two, then the initial character at the start of a word is being processed. audrun is reset to one in the AudInput() and FileInput() modules.

$finlen -- (obsolete) fin(al) len(gth) or end-of-word for AudRecog.

$fyi -- (for your information) 2 = Tutorial mode; 3 = Diagnostic mode

$len -- length, for avoiding input non-words. The len variable increments with each additional character during AudInput, and is reset to zero at the end of OldConcept and NewConcept.

$midway -- dynamically adjustable time-limit for searching backwards in the experiential memory of the AI.

$pho -- a "phoneme" or character of auditory input.

$prc -- provisional recognition in AudRecog()


6. Troubleshooting and Robotic Psychosurgery

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

A team of AI Mind Maintainers may debug the AudRecog() module by first inserting, and later commenting out, diagnostic messages to inform the AI coder what is happening inside the AudRecog() module at various stages of its operation, and what values are carried by variables used within the AudRecog() module.


7. Future Development

AudRecog() must eventually be made to work with acoustic phonemes for speech recognition, instead of keyboard characters representing phonemes.

  • Roadmap to Artificial Intelligence


    8. Resources for the AI4U Textbook AudRecog 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 https://ai.neocities.org/AudRecog
    for the background of your viral TikTok video.

    II. In a corner of the screenshot show yourself talking about the AudRecog 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
    https://www.tiktok.com/@sullenjoy/video/7224139331558985003


    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.

  • http://ai.neocities.org/mindforth.txt -- MindForth Robot AI in English.

  • http://ai.neocities.org/DeKi.txt -- Forth Robot AI in German.

  • http://ai.neocities.org/perlmind.txt -- ghost.pl Robot AI thinks in English and in Russian.

  • http://ai.neocities.org/Ghost.html -- JavaScript Robot AI Mind thinks in English.

  • http://ai.neocities.org/mens.html -- JavaScript Robot AI Mind thinks in Latin.

  • http://ai.neocities.org/Dushka.html -- JavaScript Robot AI Mind thinks in Russian.

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

    AI4U -- https://www.iuniverse.com/BookStore/BookDetails/137162-AI4U

    AI4U (paperback) -- http://www.amazon.com/dp/0595259227

    AI4U (hardbound) -- http://www.amazon.com/dp/0595654371

    The Art of the Meme (Kindle eBook) -- http://www.amazon.com/dp/B007ZI66FS

    Artificial Intelligence in Ancient Latin (paperback) -- https://www.amazon.com/dp/B08NRQ3HVW

    Artificial Intelligence in Ancient Latin (Kindle eBook) -- https://www.amazon.com/dp/B08NGMK3PN

  • https://redditfavorites.com/products/artificial-intelligence-in-ancient-latin

    Artificial Intelligence in German (Kindle eBook) -- http://www.amazon.com/dp/B00GX2B8F0

    InFerence at Amazon USA (Kindle eBook) -- http://www.amazon.com/dp/B00FKJY1WY

    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.

  • https://www.ebay.com
  • https://galaxycon.com/search?q=Mentifex

    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