JavaScript AI Mind Programming Journal
AI4U Blog -- Sat.23.AUG.2008


1. Outposts of Artificial Intelligence en Route to AI Mind Installations

[ ] Address the issue of grammatical number in noun and verb concepts.
[ ] Use differential activation in audRecog to recognize word-stems.
[ ] Prime the JSAI to traverse its KB and ask questions about gaps.
[ ] Make Tutorial mode show slosh-over concepts about to be selected.
[ ] Program the JSAI to think on its own at start of running the AI.
[ ] Induce Stephen Reed to build TexAI on the MindForth AI engine.
[ ] Achieve proper balance of determinants of conceptual activation.

[16may2008] In reEntry() implement the "upnext" MWA code from MindForth.
[17may2008] From the verbClear() module fashion a verbClip() module.
[ 16aug2008] Bring JSAI audRecog up to par with MindForth audRecog.
[ 19aug2008] Enable audRecog to recognize plural forms of singular nouns.
[ 22aug2008] Add a "num" (number) flag to the flag-panel of the psi array.
[ 23aug2008] Create an Article module to be called by the nounPhrase module.


2. Sat.23.AUG.2008 - AN ARTICLE MODULE FOR "A" AND "THE"

Yesterday we inserted a grammatical "num(ber)" variable into
the associative-tag flag-panel of the psi array for concepts.
With merely the new tag present, there was no new functionality
in the JavaScript AI Mind. Now that the "num" tag is available
to us, however, we may exploit its presence by creating an
Article() module that will try to say "a" or "the" for nouns
in the singular and will try to say "the" but not "a" for
nouns in the plural. Previously we could not implement articles
if we did not have a control-flag like "num" to determine
which article should be thought or spoken.

We should not only create the Article() module but also
http://mentifex.virtualentity.com/article.html as a webpage
to document the new mind-module. We may even have to create
a new ASCII diagram to illustrate the function of articles
in the thinking of the artificial Mind. Luckily, about ten
years ago, the creator of the very first weblog ever --
Jorn Barger of Robot Wisdom fame -- communicated to
Mentifex here how to use the HTML "PRE" tag to make
ASCII diagrams line up properly and retain their format.
Jorn Barger also created an AI Timeline. He is described at
http://en.wikipedia.org/wiki/Jorn_Barger on the Web.
Since Jorn Barger has not yet received the MacArthur grant that
he deserves, people should donate to his weblog and leave him
a stipend in their will. The world needs people like Jorn Barger.

We had better create the module first and then its webpage.
The first question is where to insert it in the free AI
source code. In JavaScript the location of a module does
not matter, but the location can be a show-stopper in the
Forth programming language. Therefore we will decide the
location with respect to MindForth, and then use the same
location in the JSAI.

As we peruse the MindForth source code, we realize that
the Article() module should probably come just before
the nounPhrase() module, which will be invoking it.
So let's open up the JavaScript AI source code and
create an Article() module. Okay, we stubbed in the
new module and the software still runs. Now we need to
flesh out the module with the ability to do something.
Let's give Article() the ability to say "THE" as a
typical output.

Since the definite article "THE" is psi concept number
seven (7) in these primitive AI Minds, we can borrow
some code from the JSAI negSVO() module, which looks
backwards in the English lexical array until it finds
the most recent instance of using the word "NOT" in
the generation of a sentence of negation. We will modify
the code snippet to look for "THE" instead of "NOT".
Here is the new code.
  for (i = t; i>midway; i--) {  // Look backwards for 7="the".
    enLexicon[i].enExam();  // Inspect the English nodes.
    if (en0 == 7) {   // If the #7 concept "the" is found...
      motjuste = 7;   // "nen" concept #7 for "the";
      aud = en5;  // Auditory recall-vector for "the".
      break;      // Finding one engram is enough.
    }  // End of search for #7 "the".
  }  // End of loop finding the word "the".
  Speech();  // Speak or display the word "the".
Now we have tested the JSAI program and it still runs,
which suggests that we have not broken the AI Mind by
inserting the Article code into it. But now we must
test for new functionality by inserting a call to the
Article() module inside the nounPhrase module.
Oh gee, where are we going to put the call?
The nounPhrase module needs to have already selected
the noun that it is literally thinking about.
We can not just call up an article at the start
of nounPhrase, because the selected noun is going to
have a "num(ber)" flag that helps to determine which
article to select, and whether there should even be
an article. We don't want the pronoun "us" to be
expressed as "the us". So we want to insert the
article-call after the selection of the noun but
before the SPEECH of the noun. Okay, we are
putting in the article-call almost immediately
prior to the SPEECH-call that speaks the noun.
Let's cross our fingers and see what happens
when we run the AI.

Huh? Oh, no. Its the AI from Berzerkistan. It has
gone berserk. We obtained the following exchange.
Human: cats eat fish 
Robot: THE WHAT 
We want it to say, "The cats eat the fish,"
but obviously some evil force is interfering with
the way we create our AI software. From invoking
the Diagnostic display, we can observe that the AI
is trying to insert a dummy concept (#79) between
"THE" and "WHAT". Now, the AI is indeed supposed to
say "WHAT" when it can not find a sufficiently active
verb. The problem here is, why did the AI not just
add "THE" into the conversation, before each noun?
We may have invalidated a variable by inserting
the call to the Article() module into nounPhrase().

Now we have created a new "nounaud" variable to hold
onto the valid value of "aud" during the operation of
the Article() module which sends a THE-fetch into the
Speech module. The Speech module goes into auditory
memory and pronounces any word starting in memory
at the aud-value time-point. We get better output.
Human: cats eat fish 
Robot: THE FISH WHAT 
Human: fish eat bugs 
Robot: THE FISH WHAT 
Robot: THE FISH WHAT 
Robot: THE FISH WHAT 
Human: bugs eat germs 
Robot: THE FISH WHAT 
Robot: THE FISH WHAT 
Human: germs kill cats 
Robot: THE FISH WHAT 
It's enough to make you pull your hair out.
Here we have arguably the most advanced AI
in the world -- it actually thinks -- but
getting it to accept a new mind-module is
like pulling teeth. The AI is not yet stable
enough to upload, and the coding is taking forever.

Now, why can't the AI stop thinking about FISH
when the human user tries to change the subject?
Why am I not down at the bottom of Green Lake,
diving for treasure, instead of coding an AI idiot?
Oh well, back to the salt mines.

Hmm... Here is maybe the source of the problem.
When the user tries to change the subject, the
fetch of "THE" may also be reactivating the word
that was most recently associated with "THE" --
which happens to be "FISH". Somehow we may need
to keep "THE" from forming permanent associations.


3. Sat.23.AUG.2008 - TAKING A FRESH LOOK

The problems with getting the Article() module to work
are deepseated. This new module is the first real expansion
of the AI Mind functionality since AI4U was published in 2002.
In the meantime, other modules were crafted and incorporated
into the AI, but only in order to troubleshoot and rectify
longstanding problems that were derailing the AI functionality.
The MindForth AI started working properly in early 2008,
and since then the JavaScript AI has been catching up with
and now surpassing the MindForth state of the art. However,
we may need to go back to coding MindForth in order to debug
the problems with the Article() module. MindForth AI runs
faster than the JavaScript AI, stops instantly when the user
presses Esc(ape), and has voluminous diagnostic reports which
should make it easy to debug the Article() module in MindForth.


4. Sat.23.AUG.2008 - AN ASCII DIAGRAM FOR THE ARTICLE MODULE

A new ASCII diagram, created on Sat.23.AUG.2008:
   /^^^^^^^^\ nounPhrase calls the Article module  /^^^^^^^^^\
  /   EYE    \              ____________          /   EAR     \
 /            \            /            \        /             \
|              |   | |    (  Sentence    )      | auditory      |
|   _______    |   | |     \____________/       | memory        |
|  /image  \   |   | |             |  \______   | channel       |
| / percept \--|-----+             |  / Verb \  | where         |
| \ engram  /  |  a|c|f            | ( Phrase ) | the           |
|  \_______/   |  b|o|i            |  \______/  | Article       |
|              |  s|n|b       _____V__/   |     | module        |
|   visual     |  t|c|e      /  Noun  \   |     | activates     |
|              |  r|e|r     (  Phrase  )  |     | an engram of  |
|   memory     |  a|p|s      \________/   |     | "a" or "the"  |
|              |  c|t|  ______|__  |      |     |               |
|   channel    |  t| | ( Article ) |      |     |               |
|              |   | |  \ "the" /  |      |     |               |
|    ______    |   | |   \ "a" /   |    __V__   |               |
|   /      \   |   | |    \___/    |   / En  \  |     "I"       |
|  / reentry\  |   | |     ________V_ ( Verbs )-|--- "have"     |
| /   of     \ |   |_|_   ( English  ) \_____/  |     "a"       |
| \remembered/ |  /     \  \ Nouns  /-----------|-- "dream"     |
|  \ image  /--|--\ Psi /---\      /            |               |
|   \______/   |   \___/     \____/             |               |


5. Sat.23.AUG.2008 - UPLOADING THE IMPERFECT JSAI MIND CODE

The current AI Mind code has not yet been debugged and is
not yet a stable version, but we will upload it anyway to
http://mentifex.virtualentity.com/jsaimind.html
in order to archive the code with a link to this
JavaScript AI Mind Programming Journal entry.


6. Notes

Potential topics for initial writings in journal webpages
- These JSAI journal entries are tantamount to a weblog.
---- (Mention how Jorn Barger created the very first weblog.)
- To what extent is Mentifex AI causing any AI evolution?
- People in other countries, especially India, are welcome to the AI.
- Living a Sci-Fi Life
- Living in a Fool's Paradise


7. Resources

JavaScript for Artificial Intelligence
http://mentifex.virtualentity.com/js.html

For discussion of the JSAI Mind, see the
comp.lang.javascript newsgroup on Usenet.


8. Associated pages

Modules of the AI-Complete Mind-Expansion
23.AUG.2008 -- the Article module;
03.SEP.2008 -- the kbTraversal module;
17.SEP.2008 -- the kbSearch module.
25.SEP.2008 -- the beVerb module.

http://mind.sourceforge.net/computationalization.html

http://mind.sourceforge.net/mind_faq.html

http://mentifex.virtualentity.com/actrules.html

JavaScript AI Mind Programming Journal
http://mentifex.virtualentity.com/js080815.html
http://mentifex.virtualentity.com/js080816.html
http://mentifex.virtualentity.com/js080819.html
http://mentifex.virtualentity.com/js080822.html
http://mentifex.virtualentity.com/js080823.html
http://mentifex.virtualentity.com/js080826.html
http://mentifex.virtualentity.com/js080904.html

MindForth Programming Journal
http://mentifex.virtualentity.com/fp080824.html
http://mentifex.virtualentity.com/fp080825.html
http://mentifex.virtualentity.com/fp080827.html
http://mentifex.virtualentity.com/fp080829.html
http://mentifex.virtualentity.com/fp080831.html
http://mentifex.virtualentity.com/fp080901.html
http://mentifex.virtualentity.com/fp080903.html
http://mentifex.virtualentity.com/fp080912.html
http://mentifex.virtualentity.com/fp080917.html
http://mentifex.virtualentity.com/fp080925.html
http://mentifex.virtualentity.com/fp080927.html


Return to the
top of this page or to the
main index page.