18 Aug 2010 mentifex   » (Master)

MindForth Programming Journal (MFPJ)

Tues.17.AUG.2010 -- Using Gender to Trigger Who- Queries

Today we would like to see if the AI can ask a who-query rather than a default what-query, if the gender of a noun in question is known to be masculine or feminine. In English, as opposed to German or Russian, a non-neuter gender indicates that an entity is a "who" and not simply a "what".

When we rename 11aug10A.F as 17aug10A.F and run the Forthmind , entering just the word "god" causes the following exchange.

Robot: GOD WHAT IS GOD GOD
Human:
Next in the AskUser module we insert a diagnostic message to reveal any value held in the "mfn" gender variable.
Robot: GOD
AskU: mfn = 0 WHAT IS GOD GOD

Robot: GOD WHAT IS GOD GOD
Human:
Apparently any value that may have been held in "mfn" for "GOD" has been reset to zero by the time the AskUser module is called. We should be able to run a ".psi" report and check for sure. Oops! We chose the wrong report. We run the ".en" report.

324 100 0 1 1 100 5 100 322  to GOD
329 101 0 0 0 101 2 101 326  to HERE
333 102 0 0 1 102 5 102 331  to MAN
339 103 0 0 0 103 5 103 335  to MEDIA
346 104 0 0 0 104 5 104 341  to PERSON
352 105 0 0 0 105 2 105 348  to THERE
357 106 0 0 0 106 7 106 354  to WHOM
363 107 0 0 2 107 5 107 359  to WOMAN
367 56 0 0 0 56 7 50 365  to YOU
371 67 0 0 0 67 8 58 369  to ARE
380 108 0 0 0 108 5 108 376  to MAGIC
383 58 0 0 0 58 8 58 382  to BE
389 100 0 0 1 100 5 100 386  to GOD
393 100 0 0 1 100 5 100 390  to GOD
398 54 0 0 3 54 7 54 394  to WHAT
401 66 0 2 0 66 8 58 399  to IS
405 100 0 0 1 100 5 100 402  to GOD
409 100 0 0 1 100 5 100 406  to GOD
t nen act num mfn fex pos fin aud
The above ".en" report on the English lexical array is encouraging, because it shows that the word "GOD" retains its "mfn" value of one (1) for masculine each time that the word "GOD" is used. However, the software may be blanking out the "mfn" value in advance of the AskUser module. We need to run a search on "mfn" in the Forth code to see in what situations the "mfn" value is reset to zero.

Hmm, "mfn" is reset to zero after storage in the InStantiate module. In order not to disturb the extremely fundamental InStantiate functionality, we should perhaps create "mfnflag" as a variable to pass the gender information from InStantiate to the AskUser module.

Tues.17.AUG.2010 -- Post-Upload Upshot

We did create and use "mfnflag" to get the AI to ask "Who" when a noun had a male or female gender, but not without some difficulty. We were coding under time- pressure, and the new "mfnflag" kept losing its value somewhere between its initial setting in the InStantiate module and its utilization in the WhoBe module, but we could not at first detect that the value of the "mfnflag" was being changed -- probably by the occurrence of a zero-gender word like "WHO" itself. Our fix was to protect the "mfnflag" value within an IF-THEN clause in the Instantiate module, so that the positive value of "1" for male or "2" for female would persist until dealt with in the WhoBe module. Unfortunately, such a quick fix may be less than ideal for many normal situations.

It is typical of our AI coding that we latch onto even a sub-optimal algorithm that proves our point, so that we can get the functionality up and running. We were in such a hurry that we tested the AI only by entering the word "god" and seeing our desired response of "GOD WHO IS GOD" and not "GOD WHAT IS GOD". Maybe right now we will test the AI to see if it reaches the fourth call to ReJuvenate and then properly asks, "GOD WHO IS GOD".

We tested the 17aug10A.F AI and we let it run through the four activand concepts of KbTraversal. When it activated the concept of God, it said first "GOD WHO IS" and then "GOD WHO IS GOD", so there are still some bugs to be worked out. The AI also said, "I WHO IS AM I", which is a step backwards in functionality. On the whole, however, the AI is approaching self-referential thought.

We will need to firm up strongly the concept of self or "I", <making it so robust that chains of thought do not derail when the AI is thinking about itself. We may need to have a routine that intercepts the name of the AI Mind (typically "ANDRU") and substitutes the pronoun "I" or "ME" instead. We may also need a routine to accept vocative calls of "ANDRU" without regarding the word "ANDRU" as a suggested topic for a new thought. In fact, software conversion of the name "ANDRU" to an activation of the concept of self or "I" may serve both these purposes at once: prevention of reference to self as "ANDRU", and acceptance of the input name "ANDRU" as merely an attention-getter, giving the AI an opportunity to say something like "YES" or "I AM HERE".


Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!