Summon a Robot AI Mind into your presence with MSIE.

The Listen Mind-Module


1. OVERVIEW AND BRAIN-MIND DIAGRAM

  /^^^^^^^^^^^\                        _____      /^^^^^^^^^^^\
 /visual memory\    | | |             /New- \    / Listen()    \
|   _______     |   | | |    _____   (Concept)--|-------------\ |
|  /old    \    |   | | |   /Old- \   \_____/   |  audRecog() | |
| / image   \---|-----+ |  (Concept)----|-------|----------\  | |
| \ recog   /   |  a|C|f|   \_____/-----|-------|-------\  |  | |
|  \_______/    |  b|O|i|        |______|       |  c    |  |  | |
|               |  s|N|b|       /Parser()\      |   a   |  |  | |
|               |  t|C|e|       \________/      |    t  |  |  | |
|               |  r|E|r|   ________|______     |     s-/  |  | |
|               |  a|P|s|  /               \    |  e       |  | |
|               |  c|T| | (  Instantiate()  )   |   a      |  | |
|   _______     |  t| | |  \_______________/    |    t-----/  | |
|  /new    \    |   |_|_|  / _____      _____   |  f          | |
| / percept \   |  /     \/ / En  \    / En  \  |   i         | |
| \ engram  /---|--\ Psi /-/ Nouns \--/ Verbs \ |    s        | |
|  \_______/    |   \___/  \_______/  \_______/ |     h-------/ |

diagrams.html shows a Theory of Mind.

The Listen module enables an intelligent robot to simulate
hearing in humans. There are two important considerations here
for programmers who wish to port the AI to other languages, or
to enhance the sufficient but minimal complexity of the AI Mind.


2. TO LISTEN IS TO BE EVENT-DRIVEN

In the language that you choose for re-implementing the structures
of the Robot AI Mind, it is quite essential that you find a way to
poll the keyboard for human input without stopping the AI program,
that is, without forcing the aLife routine to stop thinking while
passively waiting for the input which may or may not be coming.
Your AI program will need to include either a feature of letting the
user interrupt the robot thought processes, or a subroutine which
waits for an arbitrarily brief time to see if anyone is communicating.

The second consideration is that robot AI programs must eventually
improve the AI algorithm and use speech recognition to capture and
record the actual phonemes of human speech.


The diagram ai4u_157.html is a flowchart of Mind.


3. JavaScript artificial intelligence source code of 12 August 2002
// Listen() is called automatically when the user
// types a character into the HTML FORM INPUT area.
function Listen() {  // ATM 2aug2002; or your ID & date.
  quiet = false;  // So that aLife() will not yet call Think().
  fyi = "Calling the Listen module; when done press [ENTER]";
  Voice(); // Display the Voice:brain fyi message.
  inert = 0; // Upon input, retreat from calling Ego().
  pov = "*"; // symbol to display "external" point-of-view
  document.onkeypress = function (evt) {
    c = event.keyCode;
    if (c == 27) Shutdown(); // on [ESCAPE] key...
    // Let user input bring a dead AI back to life.
    if (c != 27) { // If a key other than [ESCAPE] is pressed...
      if (life == false) { // ... and if the AI has been "killed"...
        life = true; // give the AI another chance to live.
        fyi = ("AI alive again.");
      } // end of inner if-clause
    } // end of outer if-clause
    pho = String.fromCharCode(c);
    if (hardcopy == true) { // if Transcript is checked "on"
      inbuffer += pho; // Build up a line of user input.  
    } // end of if-clause testing for Transcript mode.
    ++t; // immediate increment of time right now
    if (eot == 13) {
      beg = 1;  // Reset the beg(inning?) flag to 1=true.
      c = 32; // as if SPACE-BAR "32" were pressed
    } // end of if-clause checking for carriage-return
    if (c == 32) Audition();
    beg = 1; // word beg(inning?) 1=true as default setting.
    ctu = 1; // a default changed only by Audition().
    // Uppercase for convenience in comparisons:
    pho = pho.toUpperCase();
    onset = (spt + 1);
    if (onset == t) beg = 1; // ...if a word is beginning...
    else beg = 0; // i.e., not a word-beginning
    // Only call audSTM if input is higher than SPACE-BAR 32:
    if (c > 32) {
      len = (len + 1); // keep track of length of word
      audSTM(); // which obtains "psi" from audRecog()
    } // end of if-clause checking for alphabet characters
    c = " "; // Reset for safety, e.g., blank audNodes.
    pho = " "; // Reset for safety, e.g., blank audNodes.
    return true;  // The work of the module is done.
  } // End of "document.onkeypress"
} // End of Listen() for each character of user input.

4. Mind.Forth free AI source code of 4 August 2002
\ LISTEN is attentive for the entry of a single keystroke.
:  LISTEN  \ ATM 29jul2002; or your ID & date.
  rsvp @  1  DO  \ Value may be tailored to the CPU speed.
    KEY? IF      \ If a character from a key is waiting,
      KEY pho !  \ get a pho(neme) keystroke from the user.
      0 inert !  \ No need to call EGO.
      \ 25jul2002 Eliminate "quiet", set "pov" instead?
      0 quiet !  \ Zero means that user input is in progress.
      pho @ 27 = IF  \ If ESCape key "27" is pressed...
        CR
        CR ." User Command:  halt"  0 pho !  0 rjc !
        CR ." You may enter .psi .en .aud to view memory engrams, or"
        CR ." ALIFE [ENTER] to erase all memories and restart the Mind."
        CR
        QUIT
      THEN
      pho @ EMIT   \ Display the character on-screen.

      \  Next lines convert all ASCII input to upper case:
      pho @ DUP 96 > IF
        DUP 123 < IF
          32 -
        THEN
      THEN  pho !    \ Save the uppercase value as "pho" again.

      LEAVE  \ Abandon loop upon keypress
      ELSE
      ."  "  \ Show EITHER a keystroke OR a blank.
    THEN
    8  EMIT  \  This backspace is paired with the ELSE line.
  LOOP
  t @  1 +  tov !   \ 29jul2002 To reset robotic output-display.
;  \  End of LISTEN; return to AUDITION.

variable.html explains the location and purpose of each AI variable.


5. ANALYSIS OF THE MODUS OPERANDI

The JavaScript code for Listen and the Forth code for Listen
are quite different because JavaScript is event-driven, while
Forth must actually take time out to check for human input.

When the input to Mind.Forth is actually the reentry of its output,
Mind.Forth bypasses the Listen module and feeds Speech data directly
into the Audition module, obviating the need for a Reentry module.

The AI source code (q.v.) of the Listen module records keystrokes
coming in from the human user. A more advanced AI may use speech
recognition to process and store phonemes.

The Listen function is so quintessentially passive that it
lends itself to an astronomically (think: SETI) enormous range
of situations and applications. The event to trigger the AI
may be specified so strictly and so exceptionally that the
MTBA (mean time between alerts) might stretch on for years.

Imagine being able to walk anywhere inside a large building
while an AI Mind listens attentively for the slightest word
issuing uniquely from your lips in your own unmistakable voice.
You are free to roam, while the building maintenance AI or the
guardian angel AI is on high alert through a vast audio network.

Now imagine a SETI AI that listens to the cosmos in ways unthinkable
to even the most sophisticated human being. Because only the event
of alien contact triggers the AI, no AI effort is expended.


6. LISTEN RESOURCES



* Stop the War -- Save the World -- "The Cure for 1984 is 1776"
- Open Source software needs peace and safety for future development.
- America under the war-for-oil administration became an outlaw nation.
- Hear the cry of Cindy Sheehan against the oil profiteers who killed her son.
- American soldiers who died in Iraq died for nothing, absolutely nothing.
- Open-Source software is important, but not so important as the honor of America.
- The U.S. Marine Corps has been tarnished and shamed by its illegal Iraq mission.
- Americans who do not protest against the Iraq war are guilty of killing Iraqis.
- An America that illegally invades other nations is an America doomed to destruction.
- Act to save America from the White House gangsters before it is too late.
- We have to swing public opinion around to opposition against the Iraq War.
- The most powerful tool to sway public opinion is to hammer away at the idea that
the Bushies treat their own dead American soldiers as so much dirt and trash.
- The only group that the Bushies can not shut up or kill is the parents of dead soldiers.
- The sheeple are afraid to protest, but you have no fear. Therefore you are dangerous.
- Protestors such as Danny Casolaro and Karen Silkwood have died mysteriously.
- Not only the U.S. Government but also large corporations are abusing human rights.
- Evil Google helped the illegitimate Chinese government to enslave its own people.
- Greedy Yahoo! betrayed the Chinese journalist Shi Tao into imprisonment.
- Li Zhi was betrayed by Yahoo! Jiang Lijun was betrayed by Yahoo!
- Immoral Microsoft has shut down the Chinese-language weblog of Mr. Zhao Jing.
- The Communist Chinese government murders people, and Microsoft is its helper.
- To Microsoft, money is more important than DEMOCRACY and HUMAN RIGHTS.
- Cryptome CN publishes information, documents and opinions banned by Peking and Microsoft.
- The Global Security Torture ( GST) team kidnaps victims for overseas rendition.
- If you succeed in opposing their oil-grab Abu-Ghraib war, the GST Bush people
may illegally wiretap you and try to silence you or kill you.



Return to top; or to
ai4u_faq.html Frequently Asked Questions (FAQ) about AI4U
ai4udex.html Index of the AI4U Textbook of Artificial Intelligence
aisteps.html AI Algorithm Steps - Artificial Intelligence Algorithms For Humanoid Robots
Mind.html Artificial Intelligence Seed AI in JavaScript
mind4th.html Mind.Forth Artificial Intelligence for Robots
PODsales.html Sales of the AI4U Print-On-Demand (POD) Textbook