Cyborg AI Minds are a true concept-based artificial intelligence with natural language understanding, simple at first and lacking robot embodiment, and expandable all the way to human-level intelligence and beyond. Privacy policy: Third parties advertising here may place and read cookies on your browser; and may use web beacons to collect information as a result of ads displayed here.

Wednesday, April 12, 2017

pmpj0412

Ghost Perl Strong AI cycles through Normal; Transcript; Tutorial; Diagnostic Mode

It is time now in ghost197.pl to show a clean human-computer interface (HCI) and to stop displaying masses of diagnostic messages. Accordingly in the AudInput module we change the user-prompt to say "Tab cycles mode; Esc(ape) quits AI born [date-of-birth]". We insert if-clauses to declare which user input mode is in effect: Normal; Transcript; Tutorial; or Diagnostic. Near the start of ghost197.pl we set the $fyi to a default starting value of unity ("1") so that the human user or Mind-maintainer may press the Tab-key to cycle among user input modes. In AudInput() we insert code to increment $fyi by one point with each press of the Tab-key and to cycle back to unity ("1") for Normal Mode if the user in Diagnostic Mode presses Tab again.

In the MainLoop module we change a line of code to test for $fyi being above a value of two ("2") and, if so, to display the contents of the @psy conceptual array and of the @ear auditory memory array. Thus the user in #3 Tutorial Mode or in #4 Diagnostic Mode will see the storage of current input and current output in the memory arrays. We consider the display of conceptual memory data in Tutorial Mode to be an extremely powerful tool for teaching how the artificial general intelligence (AGI) works. After any input, the user may see immediately how the input goes into memory and how the values in the flag-panel of each row of the @psy array represent the associative tags from concept to concept and from engram to engram.

Next we start commenting out or deleting the display of various diagnostic messages. Over time and over multiple releases of the Ghost AI source code, any AI coder may decide which messages to display in both Tutorial and Diagnostic Modes, or in only one of them. Although we comment out a message involving Russian input, we do not delete the diagnostic message because we may need it when we turn back on Russian as an input language. Russian has become much more important in our Ghost Perl AI because we need Russian or German to demonstrate Machine Translation by Artificial Intelligence. When we have commented out most of the diagnostic messages, we need to put back in some code to show what the user is entering.

Tuesday, April 11, 2017

pmpj0411

Stubbing in the MetEmPsychosis module.

[2017-04-10] Today in ghost195.pl we stub in MetEmPsychosis() as an area for Perl code that will enable an AI Perlmind to either move itself across the Web or replicate itself across the Web. We foresee the advent of a kind of "AiBnb" or community of Web domains that invite and encourage AI Minds to take up temporary or long-term residence, with local embodiment in a robot and with opportunities for local employment as a specialized AI speaking the local language and familiar with the local history and customs.

[2017-04-10] In the AudInput() module today we insert the Cyrillic characters of the Russian alphabet for each line of code that converts lower case to upper case and sets the $hlc variable to "ru" as the human-language-code for Russian. We have not yet turned the Russian language back on again, but we will need it to test out our ideas for Machine Translation by Artificial Intelligence.

Coding VisRecog to say by default: I SEE NOTHING.

[2017-04-11] Today in ghost196.pl we would like to port in from MindForth the code that causes any statement of what the AI is seeing to default to the direct object "NOTHING," so that Perl coders and roboticists may work on integrating computer vision with the AI Mind. We make it clear that the visual recognition (VisRecog) system needs only to supply the English or Russian name of what it is seeing, and the AI will fill the slot for direct objects while generating a sentence about what the AI sees. The VisRecog mechanism does not need to be coded in Perl or in Forth. It only needs to communicate to the Perlmind a noun that names what the AI is seeing. When the generated statement passes through reentry back into the Mind, even a new noun will be assigned a concept-number and will enter into the knowledge-base (KB) of the AI.

First we declare the subject-verb-object variables $svo1, $svo2, $svo3, and $svo4 to hold a value that identifies a concept playing the role of subject, or verb, or indirect object, or direct object in a typical sentence being generated by the AI. If there is no direct object filling the slot for the object of the verb "SEE", then the VisRecog() module must try to fill the empty slot. Until a Perl expert fleshes out the VisRecog() code, the word "NOTHING" must remain the default object of the verb "SEE" when the ego-concept of "I" is the subject of the verb. We ran the AI and we typed in "you see kids." After a spate of outputs, the AI said, "I SEE KIDS," but we would really prefer for the AI to say, "I SEE NOTHING" as a default.

After coding a primitive VisRecog() module, next we go into the part of the EnVerbPhrase() module where it is looking for a direct object. We set conditions so that if the subject is "I" and the verb is "SEE", VisRecog() is called to say "NOTHING" as a direct object, and EnVerbPhrase() stops short of saying any other direct object by doing a "return" to the calling module. We now have a Perlmind that invites the integration of a seeing camera with the AI software.

Saturday, April 08, 2017

pmpj0408

Retroactively setting associative $seq tags for direct objects of verbs.

In the ghost194.pl AI, we have a problem where the direct-object $seq of a verb is being indeed properly assigned for human user input, but not for reentrant ideas being summoned from experiential memory. Because the $seq is not yet known when a verb comes in, the $seq value must be assigned retroactively when the direct object of the verb comes in. The situation where the process works for human input but not for a reentrant idea, suggests that the cause of the problem could simply be that the value of some pertinent variable is not being reset as needed.

This problem of the retroactive assignment of the associative $seq tag for a verb is difficult to debug. It may involve making the reentry routine equal to the human-input routine, or it may involve porting into Perl some special code from the 24jul14A.F version of MindForth. We have meanwhile been offering in the computer-science compsci subReddit a suggestion that students in need of an undergraduate research project might look into the Ghost AI software coded in Strawberry Perl 5 as an opportunity to select a mind-module to work on. We feel some urgency to debug our code and get it working as well as possible when we are inviting undergraduate students and graduate students and professors to take over and maintain their own branch of the AI Mind development. There is a steep learning curve to be surmounted before participants in such an artificial general intelligence (AGI) project may move forward in AI evolution. So now we go back to the problem of debugging the retroactive assignment of $seq subsequent-concept tags.

We search our ghost194.pl source code for "$psy[" as any instance where a $seq is being inserted either currently or retroactively into a flag-panel row of the @psy conceptual array. We discover that a $verbcon flag for seeking direct or indirect objects is governing the storage of the $seq tag in the Parser() module. Immediately we suspect that the $verbcon flag is perhaps being set during actual human user input but not during the reentry of an idea retrieved from memory. We check and we see that $verbcon is set to unity ("1") in the Parser() module when the part-of-speech $pos variable is at a value of "8" for a verb. The $pos value is set in the OldConcept() module when a known verb is recognized.

We insert a diagnostic message about the direct object in the Parser() module, and the message shows up during human user input, but not during reentry. Apparently the Parser() module is not even being called during reentry. No, it is being called, but the $verbcon flag is not being set properly during reentry. When we comment out the reset of $verbcon at the end of the AudInput() module and we move the reset to the Sensorium() module, we start seeing the assignment of direct-object $seq tags during the reentry of ideas recalled from memory. However, in a later session we must deal with the new problem that improper direct-object $seq flags are being set for personal pronouns during human user input. No, we debug the problem now, simply by resetting time-of-verb $tvb at the start of the EnThink() module, to prevent an output-sentence from adjusting associative tags for a previous sentence with a previous time-of-verb. The AI becomes able to receive "i know you" as input and then somewhat later say "YOU KNOW ME."

Friday, April 07, 2017

pmpj0407

Wrong solution to a bug briefly ruins word-recognition.

[2017-04-06] Let us run the ghost192.pl AI without input and try to fix the first thing that goes wrong with it. After a series of sensible outputs, at t=2562 the AI suddenly says "HELP I" without a subject for the verb. As we investigate, we see that EnNounPhrase is trying to activate a subject at t=2427, but the pronoun "I" is stored at t=2426 with an erroneous recall-vector "rv" of t=2427. The error in auditory storage causes the AI at a later moment not to find the auditory engram.

[2017-04-06] We notice that MindForth sets tult in the AudInput module, while the Perlmind is setting $tult in both the InStantiate module and the AudInput module. However, where $tult is set, does not seem to matter. We eventually notice that some MindForth code ported into AudInput() was letting the $rv recall-vector be set erroneously not only for an alphabetic character, but also for a CR-13 carriage-return or a SPACE-32. When we restricted the $rv setting to alphabetic characters, our current bug was fixed, and the AI no longer said "HELP I".

Letting $rv be set only once per word correctly solves a bug.

[2017-04-07] Yesterday in ghost192.pl our attempt at solving a recall-vector $rv bug made the AI unable to recognize reentrant words. Now in ghost193.pl we would like to isolate $rv so that its value can be set only once in each cycle of recognizing a word. When we do so, we obtain the proper $rv value for the first word stored by the AI, but it remains the same value for all subsequent words being stored. We must determine where to reset $rv to zero. We try resetting $rv to zero at the start of the Speech() module, as MindForth does. Immediately we see fresh values of $rv being stored for each reentrant word. We let the AI run on at length, and it no longer says "HELP I" without a subject for the verb. Then we start the AI with an input of "you know me" and somewhat later the AI remembers the self-referential knowledge and it outputs, "I KNOW YOU". Thus we have made a major improvement to the AI functionality by fixing the $rv bug. There remain grammatical issues, probably based on software bugs.

Wednesday, April 05, 2017

pmpj0405

Perl Strong AI pauses briefly for human input.

[2017-04-02] Today in the ghost190.pl Perl AI we want to solve the problem of getting the AI to pause reliably and wait for human user input. The code for a pause-loop is already in the free AI source code, but the program keeps slipping out of the receptive point-of-view ("POV") status. Some diagnostic messages confirm our sneaky suspicion that maybe program-flow leaves the main AudInput loop without setting the loop-counter back to zero.

Preventing AudInput from causing unwarranted conceptual storage.

[2017-04-05] Coding ghost191.pl AI today, we need to differentiate among Normal; Transcript; Tutorial; and Diagnostic modes for the human-computer interaction (HCI). In the AudRecog module, we insert a test for the $fyi variable to hold a value of, say, "4" to indicate Diagnostic Mode and to display the very most informative diagnostic message during the AudRecog operation. Then the AI coder or mind-tender may either be satisfied with the deeply informative message or may insert additional diagnostic messages in pursuit of bugs.

[2017-04-05] In the ghost191.pl code we are tracking down a bug which causes the unwarranted storage of a redundant row of a conceptual flag-panel in the @psy conceptual array. Apparently, after the storage of the last word in an output, InStantiate() is being called one final, extra time. We remove the bug by inserting into the AudInput module a line of code which zeroes out the $audrec value for any word of zero length just before AudInput calls AudMem. In that way, a final CR-13 carriage-return may transit from the Speech module through the AudInput module without causing the storage or an unwarranted, extra row in the @psy conceptual array.

Saturday, April 01, 2017

pmpj0401

Encouraging AI immortality by reminding users how long AI has been alive.

[2017-03-30] As we code the Perlmind running in Strawberry Perl 5, today we insert code to have the AI announce when it was born, so as to encourage AI enthusiasts to see how long they can keep the Ghost Perl AI alive and running.

[2017-03-30] Now we are trying to clean up the ghost187.pl code. In MindForth, the AudInput module handles both normal input from human users and the reentry of output from the speech module. During human input, MindForth AudInput calls the AudListen module. Otherwise, AudInput handles internal reentry.

Improving the storage of words in @ear auditory memory.

[2017-03-31] In ghost188.pl we are trying to fix a problem where the display of the AudInput pause-counter is not showing up when the AI Mind is thinking on its own. First, though, we analyze everything that is happening in the AudMem() module. In one instance, after the AI recalls the idea "You are magic", AudMem at first stores the "Y" in "you" and then writes over it with the storage of a blank character. In fact, AudMem is failing to store the first character in each word of an output idea. When we remove from AudInput() an obsolete duplicate call to AudMem(), the ghost188.pl AI starts storing the complete word of each remembered idea, but the proper $audpsi tags are not being assigned in the @aud auditory memory array.

Restoring the ability of Ghost Perl AI to recognize words.

[2017-04-01] In ghost189.pl we need to ferret out deeply hidden problems, so we have uncommented several diagnostic messages in the AudRecog module. We first learn that the first character of a reentrant word is falsely being declared to have a zero $len for word-length. At the same time, an ASCII CR-13 is being declared inside each AudInput loop.

[2017-04-01] Now we learn that $len is somehow being doubly incremented. We need to find $len++ somewhere and comment it out. We did so in the lower area of AudInput() and then the diagnostic messages no longer showed double lengthening, but still the reentrant words are not being recognized. Apparently AudMem() is not sending a blank space into AudRecog() to announce the end of a word. Apparently it is not the job of AudMem() to generate the blank space, but merely to pass it along into AudRecog(). Perusal of the agi00037.F MindForth code reveals to us that it is the job of the Speech() module to send one last space into AudInput. The generation modules do not attach a SPACE-32 to a word, but rather each word in the @ear auditory memory is followed by a SPACE-32 in storage. The Speech module finds the space character after each word and sends it along into the AudInput module. Somewhere we need to increment $len by one when the post-word SPACE-32 goes from AudMem() into AudRecog().

[2017-04-01] The ghost189.pl AI suddenly started recognizing words when we commented out several unwarranted calls to the AudDamp() module, which must have been interfering in auditory recognitions.

Wednesday, March 29, 2017

pmpj0329

Improving the Ghost Perl AI Human-Computer Interface

The Ghost Perl AI has recently become able to pause its thinking long enough to accept keyboard input from a human user, and to stop waiting either when the user presses the Enter-key, or when there is no input at all, or when the user fails to enter the carriage-return. Now we need to discontinue the pause more quickly when there is no activity from the keyboard, so we will try creating a $gapcon variable to be incremented with each loop expecting but not receiving an input character, and to be reset to zero when there is indeed an input character. It works.

A minor problem in ghost186.pl is that the MainLoop is displaying the contents of the @psy and @aud memory arrays without a gap-line between input and output. The problem seems to lie with the setting of the time $t value. No, the solution was to set the $krt value in the Sensorium() module after the call to AudInput(), so that the MainLoop can separately display memory data before input and then after input, separated by a blank line.

Next in ghost186.pl we tackle the problem where the input diagnostic display was no longer showing each input character prominently left-justified down the edge of the MS-DOS window. We simply moved some old code from an obsolete area up into the currently operative AudInput code. Doing so not only gave us the left-justified display, but we also saw immediately that the $len value is not being reset to zero after each word of input, which prevents words beyond the very first word from being recognzed. We track down and fix the $len problem.

Monday, March 27, 2017

pmpj0327

Perl Mind Programming Journal

[2017-03-26] The main problem with the ghost184.pl Perlmind is that it does not supply an automatic carriage-return CR-13 if the human user neglects to press the Enter-key. This defect prevents the AI from going back to its own chains of thought when a human user has begun but not completed a message of input.

[2017-03-26] We may be able to fix the problem by supplying a CR-13 carriage-return when the input loop of the AudInput module is making its last loop. We try it, and it seems to work, but we find that ReEntry() does not work after an incomplete human input is supplied with a CR-13 in the AudInput module. We deploy a diagnostic message or two and we learn that the $len variable is not at zero when ReEntry() is called, thus perhaps interfering with the proper function of AudInput. Let us try setting the $len variable to zero at the start of the ReEntry module.

Ghost 185.pl Strong AI enters each input character into memory.

[2017-03-27] In the Strong AI ghost185.pl it is time to change from the re-entry of complete sentences back into the Mind to a more immediate re-entry of each phoneme (character) back into the Mind. In AudInput(), when we start sending each input character directly into AudMem(), nothing gets recognized, perhaps because we need to change the characters to uppercase. We also start incrementing time "t" before AudInput() calls AudMem(), and we start getting auditory recognition of an input word. When we preserve the inner loop of AudInput but we comment out the outer loop for whole words, we start getting a display of the storage of input in memory.

Next we need to implement the switch-over from storing input to generating output. It appears that we are not getting memory-storage of output because time "t" is not being incremented. We also need to turn a nested AudInput() loop into just a one-time sequence. Then in Speech() we set $pho before we call AudInput() for the reentry of Speech() output. Suddenly we begin seeing both the input and the output as stored in conceptual and auditory memory. We tweak ghost185.pl a little and we upload it.

Saturday, March 25, 2017

pmpj0325

Ghost183.pl pauses for human input and then continues thinking.

There is a chance that we will attain the Technological Singularity today in our coding of the Ghost Perl Webserver Strong AI, but then we will have to figure out how to blame somebody else for it. Meanwhile we start with a mundane problem. Persons who download Forth and run MindForth see a quivering prompt that invites input from the human user. More importantly, the dynamic, quivering prompt conveys the sense that something is alive and sentient in the AI Forthmind. We need the same user experience in the Ghost Perl AI.

The jittery prompt is achieved in the MindForth AudListen module by having it issue an ASCII SPACE-32 and BACK-SPACE-8 over and over again. When we try to achieve a similar human-computer-interface (HCI) in the Perlmind, it is confusing at first because we seem to be altering multiple lines of the screen simultaneously. Actually we are seeing the AudListen loop re-drawing the screen instantaneously.

Let us shift our attention to the problem of how to insert a default CR carriage-return if there is no human input from AudListen.

From page 354 of the Perl Black Book we have just learned how to use "ord" to deal with ASCII vales as we are so accustomed to do in Forth.

Since we are finding it difficult to detect a "CR" carriage-return in AudListen with ReadKey, we may just let both the AudInput loop and the AudListen loop run their course, with a really long AudInput loop as a way of presenting the human user with an apparent pause in the thinking of the AI.

Friday, March 24, 2017

pmpj0324

Ghost Perl AI uses the AudListen() mind-module to detect keyboard input.

Yesterday we may have finally learned how to let the Ghost Perl AI think indefinitely without stopping to wait for a human user to press "Enter" after typing a message to the AI Mind. We want the Perlmind only to pause periodically in case the human attendant wishes to communicate with the AI. Even if a human types a message and fails to press the Enter-key, we want the Perl AI to register a CR (carriage-return) by default and to follow chains of thought internally, with or without outside influence from a human user.

Accordingly today we create the AudListen() module in between the auditory memory modules and the AudInput() module. We move the new input code from AudInput() into AudListen(), but the code does not accept any input, so we remove the current code and store it in an archival test-file. Then we insert some obsolete but working code into AudListen(). We start getting primitive input like we did yesterday in the ghost181.pl program. Then we start moving in required functionality from the MindForth AI, such as the ability to press the "Escape" key to stop the program.

Eventually we obtain the proper recognition and storage of input words in auditory memory, but the ghost182.pl AI is not switching over to thinking. Instead, it is trying to process more input. Probably no escape is being made from the AudInput() loop that calls the AudListen() module. We implement an escape from the AudInput() module.

The ghost182.pl program is now able take in a sentence of input and generate a sentence of output, so we will upload it to the Web. We still need to port from MindForth the code that only pauses to accept human input and then goes back to the thinking of the AI.

Tuesday, March 21, 2017

mtx

Machine Translation by Artificial Intelligence

As an independent scholar in polyglot artificial intelligence, I have just today on March 21, 2017, stumbled upon a possible algorithm for implementing machine translation (MT) in my bilingual Perlmind and MindForth programs. My Ghost Perl AI thinks heretofore in either English or Russian, but not in both languages interchangeably. Likewise my Forth AI MindForth thinks in English, while its Teutonic version Wotan thinks in German.

Today like Archimedes crying "Eureka" in the bathtub, while showering but not displacing bath-water I realized that I could add an associative tag mtx to the flag-panel of each conceptual memory engram to link and cross-identify any concept in one language to its counterpart or same concept in another language. The mtx variable stands for "machine-translation xfer (transfer)". The AI software will use the spreading-activation SpreadAct module to transfer activation from a concept in English to the same concept in Russian or German.

Assuming that an AI Mind can think fluently in two languages, with a large vocabulary in both languages, the nub of machine translation will be the simultaneous activation of semantically the same set of concepts in both languages. Thus the consideration of an idea expressed in English will transfer the conceptual activation to a target language such as Russian. The generation modules will then generate a translation of the English idea into a Russian idea.

Inflectional endings will not pass from the source language directly to the target language, because the mtx tag identifies only the basic psi concept in both languages. The generation modules of the target language will assign the proper inflections as required by the linguistic parameters governing each sentence being translated.

Thursday, March 16, 2017

pmpj0316

2017-03-15: Porting AudRecog and AudMem from Forth into Perl

We start today by taking the 336,435 bytes of ghost176.pl from 2017-03-14 and renaming it as ghost177.pl in a text editor. Then in the Windows XP MS-DOS prompt we run the agi00045.F MindForth program of 166,584 bytes from 2016-09-18 in order to see a Win32Forth window with diagnostic messages and a display of "you see dogs" as input and "I SEE NOTHING" as a default output. From a NeoCities upload directory we put the agi00045.F source code up on the screen in a text editor so that we may use the Forth code to guide us in debugging the Perl Strong AI code.

Although in our previous PMPJ entry from yesterday we recorded our steps in trying to get the Perl AudRecog mind-module to work as flawlessly as the Forth AudRecog, today we will abandon the old Perl AudRecog by changing its name and we will create a new Perl AudRecog from scratch just as we did with the Forth AudRecog in 2016 when we were unable to tweak the old Forth AudRecog into a properly working version. So we stub in a new Perl AudRecog() and we comment out the old version by dint of renaming it "OldAudRecog()". Then we run "perl ghost177.pl" and the AI still runs but it treats every word of both input and output as a new concept, because the new AudRecog is not yet recognizing any English words.

Next we start porting the actual Forth AudRecog into Perl, but we must hit three of our Perl reference books to learn how to translate the Forth code testing ASCII values into Perl. We learn about the Perl "chr" function which lets us test input characters as if they were ASCII values such as CR-13 or SPACE-32.

Now we have faithfully ported the MindForth AudRecog into Perl, but words longer than one character are not being recognized. Let us comment out AudMem() by naming it OldAudMem() and let us start a new AudMem() from scratch as a port from MindForth.

We port the AudMem code from Forth into Perl, but we may not be getting the storage of SPACE or CR carriage-return.

2017-03-16: Uploading Ghost Perl Webserver Strong AI

Now into our third day in search of stable Perlmind code, we take the 344,365 bytes of ghost177.pl from 2017-03-15 and we save a new file as the ghost178.pl AI. We will try to track passage of characters from AudInput to AudMem to AudRec.

Through diagnostic messages in AudRecog, we discovered that a line of code meant to "disallow audrec until last letter of word" was zeroing out $audrec before the transfer from the end of AudRecog to AudMem.

In a departure from MindForth, we are having the Perl AudRecog mind-module fetch only the most recent recognition of a word. In keeping with MindForth, we implement the auditory storing of a $nxt new concept in the AudInput module, where we also increment the value of $nxt instead of in the NewConcept module.

Tuesday, March 14, 2017

pmpj0314

PerlMind Programming Journal
Updating the Ghost Perl AI in conformance with MindForth AI.

Today we return to Perl AI coding after updating the MindForth code in July and August of 2016. In Forth we re-organized the calling of the subordinate mind-modules beneath the MainLoop module so as no longer to call the Think module directly, but rather to call the FreeWill module first so that eventually the FreeWill or Volition module will call Emotion and Think and Motorium.

We have discovered, however, that the MindForth code properly handles input which encounters a bug in the Perl code, so we must first debug the Perl code. When we enter, "you see dogs", MindForth properly answers "I SEE NOTHING", which is the default output for anything involving VisRecog since we have no robot camera eye attached to the Mind program. The old Perl Mind, however, incorrectly recognizes the input of "DOGS" as if it were a form of the #830 "DO" verb, and so we must correct the Perl code by making it as good as the Forth code. So we take the 335,790 bytes of ghost175.pl from from 2016-08-07 and we rename it as ghost176.pl for fresh coding.

We start debugging the Perl AudRecog module by inserting a diagnostic message to reveal the "$audpsi" value at the end of AudRecog. We learn that "DOGS" is misrecognized as "DO" when the input length reaches two characters. We know that MindForth does not misrecognize "DOGS", so we must determine where the Perl AudRecog algorithm diverges from the Forth algorithm. We are fortunate to be coding the AI in both Forth and Perl, so that in Perl we may implement what already works in Forth.

In Perl we try commenting out some AudRecog code that checks for a $monopsi. The AI still misrecognizes "DOGS" as the verb "DO". Next we try commenting out some Perl code that declares a $psibase when incoming word-length is only two. The AI still misrecognizes. Next we try commenting out a declaration of $subpsi. We still get misrecognition. We try commenting out another $psibase. Still misrecognition. We even try commenting out a major $audrec declaration, and we still get misrecognition. When we try commenting out a $prc declaration, AudRecog stops recognizing the verb "SEE". Then from MindForth we bring in a provisional $audrec, but the verb "SEE" is not being recognizied.

Although in the MS-DOS CLI prompt we can evidently not run MindForth and the Perlmind simultanously, today we learn that we can run MindForth and leave the Win32Forth window open, then go back to running the Perl AI. Thus we can compare the diagnostic messages in both Forth and Perl so as to further debug the Perl AI. We notice that the Forth AudMem module sends a diagnostic message even for the blank space ASCII 32 even after "SEE", which the Perl AI does not do.

Saturday, August 27, 2016

mfpj0827

MindForth Programming Journal (MFPJ)
The MindForth Programming Journal (MFPJ) is both a tool in developing MindForth open-source artificial general intelligence (AGI) and an archival record of the history of how the AGI Forthmind evolved over time.

Sat.27.AUG.2016 -- Creating the MindGrid trough of inhibition

In agi00031.F we are trying to figure out why we have lost the functionality of ending human input with a 13=CR and still getting a recognition of the final word of the input. We compare the current AudMem code with the agi00026.F version, and there does not seem to be any difference. Therefore the problem must probably lie in the major revisions made recently to the AudInput module.

From the diagnostic report messages that appear when we run the agi00031.F, it looks as though the 13=CR carriage return is not getting through from the AudInput module to the AudMem module. When we briefly insert a revealing diagnostic into the agi00026.F AudMem start, we see from "g AudMem: pho= 71" and "o AudMem: pho= 79" and "d AudMem: pho= 68" and "AudMem: pho= 13" that the carriage-return is indeed getting through. Therefore in AudInput we need to find a way of sending the final 13=CR into AudMem. Upshot: It turns out that in AudInput we only had to restore "pho @ 31 > pho @ 13 = OR IF \ 2016aug27: CR, SPACE or alphabetic letter" as a line of code that would let 13=CR be one of the conditions required for calling the AudMem module.

Next in the InStantiate module we need to remove a test that only lets words with a positive "rv" recall-vector get instantiated, because we must set "rv" to zero for personal pronouns being re-interpreted as "you" or "I" during communication with a human user. Apparently the Perlmind just ignores the engrams with a zero "rv" and finds the correct forms with a search based on parameters.

Now we would like to see how close we are to fulfilling all the conditions for a proper "trough" of inhibition in the AI MindGrid. When we run the ghost175.pl Perl AI and we enter "You know God," we see negative activations in thepresent-most trough of both the input and the concepts of "I HELP KIDS" as the output. In the Forth AGI, we wonder why do not see any negative activations in the present-most trough. Oh, we were not yet bothering to store the "act" activation-level in the Forth InStantiate module. We insert the missing necessary code, and we begin to see the trough of inhibition in both the recent-most input and the present-most output.

Sunday, January 31, 2016

pmpj0131

After many years of development, Perl6 has finally been released around the beginning of this new year 2016. We now position the emerging AI Perlmind as a killer app for the emerging Perl6 programming language. Yesterday we uploaded the Perl6 AI Manual to the Web for use with both P5 AI and P6 AI.

Apparently both Perl5 and Perl6 will have problems in accepting each single keystroke of input from a human user. Therefore we should shift our AI input target away from immediate human keyboard entry and towards the opening and reading of computer files by the AI Mind. Since we envision that a P6AI will sit quietly on a webserver and ingest both local and remote computer files, it makes sense now to channel input into the AI as a file rather than as dynamic keyboard entry.

Today we have created C:\Strawberry\perl_tests\input.txt as a textfile containing simply "boys play games john is a boy" as its only content. Then we have copied the code-sequence of AudInput() as FileInput() and we have made the necessary changes to accept input from an input.txt file instead of from the keyboard.


2016 January 11:

Today we need to figure out how to read in each line of input.txt and how to transfer each English word into quasi-auditory memory.

In the FileInput() subroutine of the mind0029.pl source, it looks as though the WHILE loop for reading a file may be running through completely before any individual line of input is extracted for AI processing. We move the NewConcept() and AudMem() calls into the WHILE loop so that each line of input is processed separately. However, not just each line, but each word within a line, needs to be processed separately.


2016 January 12:

A line of text input needs to be broken up into individual words. First we learn from the PERL Black Book, page 568, that the getc function lets us fetch each single character in a line from our input.txt file. Therefore in the FileInput() module of mind0031.pl we use the "#" symbol to comment out the WHILE-loop that was transferring a whole message "$msg" into AudMem(). Then we use getc in a new WHILE-loop to transfer a series of incoming characters from input.txt into AudMem(), where we comment out the string-reversing and chopping code and we convert a do-loop into a simple series of non-looping instructions, because the looping is being done up in the FileInput() module. We see that the program is now transferring individual input characters into auditory memory. Later we will need to make the transfers stop at the end of each input word, shown by a blank space or punctuation or some other indicator. The new code is messy, but we should upload it to the Web and clean it up when we continue programming.


2016 January 13:

In the FileInput() module of the mind0032.pl AI we are inserting the call to NewConcept() so that AudMem() will show an incrementing concept number for each word being stored in auditory memory. Uh-oh, running the AI shows that each stored character is getting its own concept number. Obviously, we will have to call NewConcept() only when an entire new word is being stored, not each individual character.

We were able to test for a blank space (probably not enough) after an input word in FileInput(), then order a "return" out of the WHILE-loop. We had to put "{ return }" in brackets to avoid crashing the program. Now the AI loads a first word "boys" over and over into auditory memory, but we have made progress.


2016 January 14:

Let us see what happens if we run the Perl AI with no input.txt available for the AI to read. We save input.txt elsewhere and then we delete input.txt from the perl_tests directory. We run the mind0033.pl AI program without an input.txt file available, and it goes into an infinite loop. We change the FileInput() code that opens the input.txt file by adding the "or die" function to halt the program and issue an error message. It works and we no longer get an infinite loop. Then we add the input.txt file back into the directory.

Now we need to work on getting the AI to store the first word of input and to move on to each succeeding word of input.

When we inspect the MindForth code, we see that the AudInput module first calls OldConcept at the end of a word, and only calls NewConcept if the incoming word is not recognized as an old concept. So we should create an OldConcept() module in the Perl AI program.

In the FileInput() module, we might just wait for a blank space-character and use it to initiate the saving of the word and the calling of both OldConcept and NewConcept(). Even if everything pauses to store the word and either recognize it or create a new concept, the reading of the input file should simply resume and there should be no special need to keep track of the position in the input-line.

In accordance with the MindForth code, any non-space character coming in should go into AudMem(). An ASCII-32 space character does not get stored, but rather a storage-space of one time-point gets skipped, because MindForth AudInput increments time "t" for all non-zero chararacters coming in. In other words, skipping one time-point in auditory memory makes it look as if a space-character were being stored.

It turns out that time "$t" was not yet being incremented in the mind0033.pl AI, so we put an autoincrement into the FileInput() module.


2016 January 15:

It is time in mind0034.pl to create the AudBuffer() module to be called by AudInput() or FileInput() and VerbGen(). The primitive coding may be subject to criticism, since the module treats a series of variables as a storage array, but the albeit primitive code not only serves its purpose but is easily understandable by the AI coder or system maintainer. For now we merely insert a stub of the AudBuffer() module.

After wondering where to place the AudBuffer() module, today we re-arrange all the mind-modules to be in the same sequence as MindForth has them, so that it will be easier in inspecting code to move among the Forth and JavaScript and Perl AI programs. MindForth compels a certain sequence because a module in a Forth program can call only modules higher up in the code.


2016 January 16:

The mind0035.pl program is going to get extremely serious and extremely complicated now, because for the first time in about eighteen years we are going to change the format of the storage of quasi-acoustic engrams in auditory memory. We are going to change the six auditory panel-flags from "pho act pov beg ctu audpsi" down to a group of only three: "pho" for the phoneme or character of auditory input; "act" for the activation-level; and "audpsi" for the concept number in the @psi conceptual memory array.

The point-of-view "pov" variable will no longer be stored in auditory memory, and instead other functions of memory will have to remember, if possible, who generated a sentence or a thought stored in auditory memory. Over the years it has been helpful to inspect the auditory memory array and to see whether a sentence came from the AI itself or from an external source.

The flag-variables "beg" for beginning of a word and "ctu" for continuation of a word served a purpose in the early AI Minds but are now ready for extinction. The Perl language is so powerful that it should simply detect the beginning or ending of a word without relying on superfluous flags stored in the engram itself. Removing obsolete flags makes the code easier to understand and easier to develop further.

We should probably next code the EnVocab() module for storing the fetch-tags of English vocabulary, because the @psi concept array will need to direct pointers into the @en array. In MindForth, EnVocab comes in between InStantiate for "psi" concepts and EnParser for English parts of speech. Oh, we already have a stub of EnVocab(). Then it is time to flesh out the module.

First we create the number-flag $num for grammatical number, which is important for the retrieval of a stored word in English or German or Russian. Then we create the masculine-feminine-neuter flag mfn for tracking the gender of a word in the @en English array.

We may now be able to discontinue the use of the fex flag for "fiber-out" and fin for "fiber-in". These flags were helpful for interpreting pronouns like "I" and "me" as referring to the AI itself or to an external person. The Perlmind should be able to use point-of-view "pov" code to catch pronouns or verb-forms that need routing to the correct concept.

We still need a part-of-speech pos flag to keep track of words in the @en array. We also need the $aud flag as an auditory recall-tag for activating engrams in the @aud array, unless it conflicts with the @aud designation and needs to be replaced with something like $rv for recall-vector.

The $nen flag is already incremented in NewConcept(), and now we begin storing $nen during the operation of EnVocab(). Then we had many problems because in TabulaRasa() we had filled the @en English array with zeroes instead of blank spaces.


2016 January 17:

In the mind0036.pl program we continue working on EnVocab() for English vocabulary being stored in the @en array. Today we create the variable $audbeg for auditory beginning of an auditory word-engram stored in the @aud array. We also create the variable $audnew to hold onto the value of a recall-vector onset-tag for the start of a word in memory while the rest of the word is still coming in. By setting the $audnew flag only if it is at zero, we keep the flag from changing its truly original value until the whole word has been stored and the $audnew value has been reset to zero for the sake of the next word coming in.

Today for a bug in the AI we kept getting a message something like, "Use of unitialized value in concatenation <.> or string at mind0036.pl line 295" at a point where we were trying to show the contents of a row in the @en English lexical array. In TabulaRasa() we solved the bug by declaring $en[$trc] = "0,0,0,0,0,0,0"; with seven flags set to zero. Apparently TabulaRasa() initializes all the items in the array.


2016 January 18:

In the mind0037.pl AI Perlmind, let us see what happens at each stage of reading an input.txt file.

The MainLoop calls sensorium() which in turn calls the FileInput() module. FileInput() goes into a WHILE-loop of reading with getc (get character) for as long as the resulting $char remains defined. As each character comes in, FileInput() calls AudMem() to store the character in auditory memory. Each time that $char becomes an empty non-letter at the end of an input word, FileInput() increments the $onset flag from $audnew and calls NewConcept(), because the AI must learn each new word as a new concept.

NewConcept() increments the number-of-English $nen lexical identifier and calls the English vocabulary EnVocab() module to set up a row of data in the @en array. NewConcept() calls the stub of the English parser EnParser() module. FileInput() calls the stub of the OldConcept() module.

The MainLoop module calls the Think() module which calls Speech() to output a word as if it were a thought, but the AI has not yet quickened and so the AI is not yet truly thinking. At the end of the mind0037.pl program, the MainLoop displays the contents of the experiential memory for the sake of troubleshooting the AI.


2016 January 19:

The mind0038.pl program is ready to instantiate the InStantiate() module for creating concepts in the @psi array of the artificial Mind. Let us change the @psi array into the @psy array so that a $psi variable will not conflict with the name of the conceptual array.


2016 January 20:

With mind0039.pl we may need to remove the activation-flag from the flag-panel of the @en English lexical array. In the previous Forth and JavaScript AI Minds, we had "act" there in case we needed it. Now it seems that in MindForth only the KbSearch module uses "act" in the English array, and the module could probably use @psy for searches instead of the @en lexicon.

There is some question whether part-of-speech $pos should be in the @psy conceptual array or in the @en lexical array. A search for "6 en{" in the MindForth code of 24 July 2014 reveals that no use seems to be made of part-of-speech "pos" in MindForth. Apparently part-of-speech has already been dealt with during the functions that use the Psi array, and therefore the English array does not concern itself with part-of-speech. So part-of-speech could be dropped from the @en English array.

It looks as though part-of-speech has to be assigned in the @psy array before inflections are fetched in a lexical array. If a person says, "I house you in a tent," then a word that is normally a noun becomes a verb, "to house." The software should override any knowledge of "house" as being a noun and store the specific, one-time usage of "house" as a verb. Then the AI robot can respond with "house" as a verb to suit the occasion: "Please house me in a shed." OldConcept() should not automatically insist that a known word always has a particular part-of-speech. In a German AI, VerbGen() should be called to create verb-endings as needed, if not already stored in auditory memory.

In the @psy concept array we should have seven flags: psi, act, pos, jux, pre, tkb, and seq. If we now change the tqv variable from MindForth to $tkb in the Perl AI, it clearly becomes "time-in-knowledge-base" for Perl coders and AI maintainers.

It suddenly dawns on us that we no longer need an enx flag in the @psy array. We may still need the $enx variable for passing a fetch-value, but it looks like the @psy concept number and the @en lexical number will always be the same, since we coded MindForth to find inflections for an unchanging concept number.


2016 January 21:

Now mind0040.pl invites us to make a drastic simplification by merging the @psy array and the @en array, because any distinction between the two arrays has gradually become redundant. The @psy array has psi, act, pos, jux, pre, tkb, seq flags. The @en array has nen, num, mfn, dba, rv flags. We could joint them together into one @psy conceptual array with psi, act, pos, jux, pre, tkb, seq, num, mfn, dba, rv flags.

The first thing we do is in TabulaRasa(), where we fill each row of the @psy array with eleven zeroes for the eleven flags. Next we have the InStantiate() module store all eleven flags in the combined flag-panel. We run the Perl AI and it makes no objections. Then we have InStantiate() announce the values of all eleven flags before storing them.

In the flag-panel of the @psy array, we should probably add a human-language-code "hlc" so that an AI can detect English or German or Russian and think in the indicated language.


2016 January 22:

In mind0042.pl where we have merged the @en array into the @psy conceptual array, we gradually need to eliminate the $nen variable. However, we need a replacement other than the $psi variable so that the replacement variable can hold steady and wait for each new word being learned in English, German, Russian or whatever human language is involved. Let us try using $nxt as the next-word-to-be-learned.


2016 January 23:

In mind0043.pl we are now trying to code the AudRecog() module taken from MindForth, although the timing may be premature.

As we began coding AudRecog() in the mind0043.pl AI, we discovered that the primitive EnBoot() sequence did not contain enough English words to serve as comparands with a word being processed in the AudRecog() module, so we must suspend the AudRecog() coding and fill up the EnBoot sequence properly before we resume coding AudRecog().

Today we rename the English bootstrap EnBoot() sequence as MindBoot() because the Perl AI with Unicode will not be limited to thinking only in English, but will eventually be able to think also in German and in Russian.


2016 January 24:

In mind0044.pl we are replacing the Think() module with EnThink() for English thinking, and we are declaring DeThink() as a future German thinking module and RuThink() as a future Russian thinking module.

Coding the AudRecog() module in Perl5, we move left-to-right through the nested if-clauses. At the surface we test for a matching $pho. Nested down one layer, we test for zero activation on the matching $pho, because we do not want a match-in-progress. At the second depth of nesting, we test for the onset-character of a word. In the previous AI Minds coded in Forth and JavaScript, we still had the "beg(inning)" flag to fasten upon a beginning character at the start of a comparand word in auditory memory. Now in Perl killer app AI we must rely on the $audnew variable which is set during FileInput() but which we have apparently neglected to reset to zero again. Let us try setting $audnew back to zero just before we close the audinput.txt file. Oh no, $audnew won't work here, because $audnew applies only to the beginning of an input word, not to the beginning of a word stored in memory. Maybe we can try testing for not only a zero-activation matching $pho but also for an adjacent blank space.

Now, we are going backwards in memory from space-time $spt down to $midway, which is set to zero in the primitive AI. The $i variable is being decremented at each step backwards. We would like to know if going one step further encounters the space before a word. We might have to start searching forwards through memory if we want to trap the occurrence of an initial character in a stored word. If we go forwards through memory, we could have a $penult variable that would always hold the value of each preceding moment in time. For the chain of activations resulting in recognition, it should not matter if the sweep goes backwards or forwards.


2016 January 25:

Now in mind0045.pl we will stop searching backwards in AudRecog() and search forwards so that it will be easier to find the beginning of a comparand word stored in auditory memory.

As we debug the mind0045.pl AI, we notice that the MindBoot sequence is not a subroutine, as EnBoot was in the previous AI Minds. We should call MindBoot() as a one-time subroutine from the MainLoop. We establish TabulaRasa() and MindBoot() as subroutines and we give them a one-time call from the MainLoop.

Throughout many tests we were puzzled because AudRecog() was not recognizing an initial "b" at zero activation preceded by a zero $penult string. Finally it dawned on us that the MindBoot() "BOY" was in uppercase, so for a test we switched to lowercase "boy", and suddenly the proper recognition of the initial character "b" was made. But we will need to make input characters go into uppercase, so that AudRecog() will not have to make distinctions.


2016 January 26:

Moving into mind0046.pl, we need to consult our Perl reference books for how to shift input words into UPPERCASE. The index of Perl by Example has no entry for "uppercase". None also for "lowercase". However, the index of the Perl Black Book says, "Uppercase, 341-342," BINGO! Mr. Steve Holzner explains the "uc" function quite well on page 341. Let us turn the page and see if we need any more info. Gee, page 342 says that you can use "ucfirst" to capitalize only the first character in a string sentence -- one more example of how powerful Perl is. Resident webserver superintelligence, here we come.

Now let us try to use the "uc" function in the free Perl AI source code of mind0046.pl as we continue. We had better look into the FileInput() module first. Hmm, let us go back to the index of Perl by Example, where in the index we find "uc function, 702." Okay, let us try using "uc $char" at the start of the input WHILE-loop in the FileInput() module. Huh? It did not work. Uh-oh. Houston, we have a problem. Our mission-critical Perl Supermind is stuck in lowercase. Here we have been trying to learn Perl, but we have never coded any Perl program other than artificial intelligence. Even our very first "Hello world" Perl program was a "mind.pl" program and we never did any scratch-pad Perl coding. Meanwhile there are legions of Perl coders waiting for us to finish the port of AI Minds first into Perl5 and then into Perl6. Let us check the Perl Black Book again. Let us try, $char = "uc . $char"; in the FileInput() module. We drag-and-drop the line of code from this journal entry straight into the AI code. Then we issue the MS-DOS command, "perl mind0046.pl" and take a look. Oh no, the "uc" itself is going into memory as if it were the input. Hey, it finally worked when we used $char = uc $char; as the line of code. Now the contents of auditory memory are being displayed in uppercase. We can go back to coding the AudRecog() module.


2016 January 27:

Although we have done away with the ctu-flag of MindForth in the Perl AI, because we want to reduce the number of flags stored in the @aud auditory memory, in AudRecog() we may create a non-engram "ctu" or its equivalent by using the split function to look ahead one array-row and see whether a stored comparand word continues beyond any given character.


2016 January 28:

In mind0050.pl we would like to have the FileInput() module call the human-computer-interaction AudInput() module if the input.txt file is not found. In that way, we can simply remove input.txt to have a coding session of direct human interaction with the AI Perlmind.


2016 January 29:

In mind0052.pl we are continuing to improve AudInput() towards equal functionality as we developed in FileInput().

The line of input goes into a $msg string, which AudInput() needs to process in the same way as FileInput() processes the input.txt file, except that AudInput() only has to deal with one line at a time, which is presumably one sentence or one thought at a time.


2016 January 30:

Today in mind0053.pl we hope to fix a problem that we noticed yesterday after we uploaded mind0052.pl to the Web. We had carefully gone about sending the input $pho (phoneme) into AudMem() and AudRecog(), but no word was being recognized in AudRecog() -- which we had coded for six hours straight three days ago. Then yesterday we saw that we had left a "Temporary test for audrec" in the AudMem() module and that the code was arbitrarily changing the $audpsi from any recognized $audrec concept to the $nxt (next) concept about to be named in the NewConcept() module. Now we will comment out that pesky test code and see if AudRecog() can recognize a word. Hmm, commenting out the code did not seem to work.

We hate to debug the pristine Perl AudRecog() by inserting diagnostic message triggers into it, but we start doing so, and pretty soon we discover that we neglected to begin AudRecog() with the activation-carrier $act set to eight (8), as it is in the predecessor Mindforth AI. So let us set $act to eight in the AudRecog() Perl code and see what happens. Uh-oh, it still does not work.

But gradually we got AudRecog() to work. Now in the mind0054.pl AI we are working on the AudMem() module. We want it to store each $pho phoneme in the @ear array as $audpsi if there has been an auditory recognition, and as simply $nxt if only the next word from NewConcept() is being stored.

The $audpsi shall be stored if the next time-point is caught by the ($nxr[0] !~ /[A-Z]/) test as not being a character of the alphabet.


2016 January 31:

Yesterday we got the Perl AI to either recognize a known word and store it in the @ear array with the correct $audpsi tag, or instead to store a word as a new concept with the $nxt identifier tag. However, in the @psy conceptual array, the Perlmind is improperly incrementing the $nxt tag because we have not yet figured out how to declare that a character flowing by is the last character in a word. Bulbflash: Maybe we can store the $nxt tag at the end of each @ear row, erasing it when each successive character comes in, so that only the last letter of the word will end up having the $nxt tag.

Monday, June 15, 2015

jmpj0613

JavaScript Mind Programming Journal (JMPJ) -- Saturday, June 13, 2015

These notes record the coding of the English tutorial AiMind.html in JavaScript for Microsoft Internet Explorer (MSIE).

Sat.13.JUN.2015 -- Troubles with InFerence in JavaScript

When we run the JavaScript AiMind.html in English and we try to show a Transcript of automated reasoning with logical InFerence, the Strong AI does indeed make an inference, but the dialog with the AI reveals that the AiMind program is failing to use some correct forms of verbs and personal pronouns. The thinking of the AI is correct and logical, but some mistakes are occurring in the expression of logical thought in proper English.

We suspect that grammatical errors are creeping in because the mind-modules related to inference are composing a sentence of thought outside of the normal routines of strictly grammatical English. We may be able to build up the same formalisms of strict grammaticality inside the inferential routines. For correct verb forms, however, we may need to start using the modules of OutBuffer and VerbGen.

Sat.13.JUN.2015 -- Troubleshooting the InFerence process

We notice that the AskUser module of the 14apr13A JSAI simply looks for the "quverb" query-verb to recall and speak, apparently without forcing the verb into the proper grammatical form, which is typically an infinitive form when a question is being asked with "DO" or "DOES" as an auxiliary verb. We should also check the Forth code and see if AskUser in MindForth has anything more advanced. Oh, the Forth code actually does test for a plural form to be used as if it were an infinitive.

The JSAI AskUser module looks for the "quobj" query-object without bothering to ensure that it will be an accusative form. The MindForth AskUser module also does not bother to check for an accusative case in the "quobj" word, so both the JavaScript AI and the MindForth AI need to be improved. The German Forth AI Wotan also seems to need improvement for grammatical forms in the AskUser module.

Mon.15.JUN.2015 -- Selecting Objects in Accusative

Now we have partially fixed the problem of ungrammatical English by inserting code into the AskUser() module to require the direct object or query-object to be in the accusative case. Instead of asking a question like "Does Mark need I?" the AI now asks, "Does Mark need me?"

However, when we answer "no" to the foregoing quesion, the AI eventually gets around to saying, "MARK DOES NOT NEEDS ME", because the AskUser() module is not insisting upon finding an infinitive form of the query-verb.

Table of Contents (TOC)

Sunday, April 12, 2015

pmpj0412

Perlmind Programming Journal (PMPJ) -- Sunday, April 12, 2015

The Perlmind Programming Journal (PMPJ) is a record from the very start of how the Mentifex Strong AI Mind project moves beyond REXX and Forth and JavaScript into the Perl programming environment.

Sun.12.APR.2015 -- Mentifex AI moves into Perl.

Since the Mentifex AI Minds are in need of a major algorithmic revision, it makes sense to reconstitute the Mentifex Strong AI in a new programming environment, namely Perl, beyond the original Mentifex encampments first in REXX (1993-1994), then in Forth (1998-present) and finally in JavaScript (2001-present). With Perl, we remain in a scripting language, but a language more modern and more prevalent than Forth. We savor the prospect of ensconcing our Perl mind-modules within the prestigious and Comprehensive Perl Archive Network (CPAN), where we already proposed some AI nomenclature a dozen years ago. With Perl we open up the mind-boggling and Mind-propagating vistas of seeding the noosphere with explosively metastatic and metempsychotic Perl AI that can transfer its files and its autopoiesis instantaneously across and beyond the vastness of the World Wide Web.

Sun.12.APR.2015 -- Downloading the Perl Language

Next we need to do a Google search-and-deploy mission for obtaining a viable version of the Perl language for our Acer Aspire One netbook running Windows XP home edition.

Ooh, sweet! When we search for "download Perl" on Google, we are immediately directed to http://www.perl.org/get.html which presents to us a choice among the Unix/Linux, MAC OS X, and Windows operating systems. Although we wish we were on 64-bit Linux so that we could be listed in a GNU/Linux AI website, we had better choose between ActiveState Perl and Strawberry Perl for our current Windows XP platform. Let's click on the link for Download Strawberry Perl because it is a 100% Open Source Perl for Windows without the need for binary packages. Perl.org recommends that we use the "latest stable version, currently 5.20.2." and Strawberry Perl 5.20.2.1 (32 bit) is offered to us. When we first click on the download, a Security Warning asks is whether we want to run or save this 68.6MB file. We click to save the file on our Acer Aspire One netbook. Huh? Almost instantaneously, after we see that the target will be our Acer C-drive, we get a pop-up window that says that we have completed a download not of 68.6 megabytes, but that we have downloaded 116KB in one second to C:\strawberry-perl-5.20.2.1-32bit.msi and we may now click on "Run" or "Open Folder" or "Close". Let us click on "Run" to see what happens. Now we get another Security Warning that "The publisher could not be verified. Are you sure you want to run this software?" Its name is "strawberry-per-5.20.2.1-32bit msi" and we can click on "Run" or "Don't Run". Let's click on "Run". It starts to show a green download transfer, but suddenly it stops and a "Windows Installer" message says, "This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package." So we go back to where we had the choice between "Run" and "Save" and this time we click "Run" instead of "Save." In a space of between two and three minutes, the package downloads into a "temporary folder." Then a Security Warning says, "The publisher could not be verified. Are you sure you want to run this software?" Let's click "Run." Now it says "preparing to install" and "wait for the set-up wizard." Finally it says "The Setup Wizard will install Strawberry Perl on your computer. Click Next to continue or Cancel to exit Setup." Well, I have a complaint. Why did the process not work when I tried to "Save" the download instead of merely "Running" it for what I was afraid would be one single time? Why is the process of installing Perl so obfuscated and so counter-intuitive? Well anyway, let's click on "Next" and get with the program. Next we have to click the checkbox for "I accept the terms in the License Agreement." Now for a Destination Folder the Strawberry Perl Setup says to "Click Next to install to the default folder or click Change to choose another." C:\Strawberry\ is good enough for Mentifex here. Then we "Click Install to begin the installation." Oops. "Error reading from file C:\Documents and Settings\Arthur\Local Settings\Temporary Internet Files\ Content.IR5\R6BYZW40\strawberry-perl-5.20.2.1-32bit[1].msi. Verify that the file exists and that you can access it." Now we have ended prematurely because of an error. Then we went back again to the initial download process and we went with "Run" instead of "Save," and wonder of wonders, we were able to download Perl. We will "Click the Finish button to exit the Setup Wizard," and we will read the Release Notes and the README file" available from the start menu. Aha! Upon clicking the Windows XP "start" button, we proceed into "All Programs" through "Strawberry Perl" to Strawberry Perl README in a Notepad file on-screen.

Sun.12.APR.2015 -- Learning to program Perl Strong AI

Now we have to figure out how to run a program in Perl. We go to Learning Perl at http://learn.perl.org.

The page http://learn.perl.org/first_steps says to check that you have Perl installed by entering
perl -v and so we actually do
C:\Strawberry\perl -v and it works! It says "This is perl 5, version 20, subversion 2 (v5.20.2)" etc. Next with the MS-DOS make-directory "md" command we md perl_tests to create a "perl_tests" subdirectory.

Then we open the Notepad text editor and we create a file that we call not hello_world.pl but rather mind0001.pl because we want to start programming Perl artificial intelligence immediately. C:\Strawberry>perl /path/to/perl_tests/mind0001.pl is what we try to run. At first we get "No such file or directory" but when we changed directory and entered
C:\Strawberry\perl_tests>perl mind0001.pl we saw:
hi mind0001.pl and so we have run our first Perlmind AI program.

Sun.12.APR.2015 -- Perl Strong AI Resources

http://ai.neocities.org/PMPJ.html

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

http://www.cpan.org/authors/id/M/ME/MENTIFEX/mind.txt

http://cyborg.blogspot.com/2015/04/pmpj0412.html

http://www.reddit.com/r/perl


Table of Contents (TOC)

Thursday, July 24, 2014

mfpj0724

MindForth Programming Journal (MFPJ)

The MindForth Programming Journal (MFPJ) is both a tool in developing MindForth open-source artificial intelligence (AI) and an archival record of the history of how the AI Forthmind evolved over time.

Thurs.24.JUL.2014 -- MindForth AI moves to a Windows XP development platform.

MindForth came into being in 1998 on the Commodore Amiga 1000 computer as a port from the Amiga Mind.Rexx AI program, written in MVP-Forth from Mountain View Press. Around 1999, MindForth moved to a Windows 98 machine provided by Free-PC.com and to 16-bit FPC-Forth. Around 2001, MindForth moved to a Windows 95 Packard-Bell tower computer and to 32-bit Win32Forth. As the original author of Mind.Rexx and of MindForth, yesterday on 23 July 2014 I downloaded W32FOR42_671.zip onto the same Windows XP Acer Aspire One netbook which I have been using to develop the Russian Dushka AI program in JavaScript for MSIE. I unzipped W32FOR42_671.zip with my own legitimate copy of WinZip, which created a C:\WIN32FOR directory to hold all the decompressed files of Win32Forth. From the Web I downloaded the 24jan13A.F most current source code of MindForth and I saved it into the C:\WIN32FOR directory and as a text-file into a monthly C:\JUL01Y14\MFPJ directory on the Acer netbook.

I was able to get MindForth running on the Windows XP netbook by navigating with the "cd" (change directory) command into the C:\WIN32FOR directory where I typed "win32for.exe" and pressed "Enter"; then "fload 24jan13A.F" and the Enter-key; and finally "MainLoop" followed by the Enter-key. The AI Forthmind began to think its own thoughts on the screen, but the program soon crashed in its new environment, both during interaction with me and when allowed to think without human input. It was not a complete Snow Crash; but just as fatal with a pop-up message announcing "Exception # C0000005" and shutting down Win32Forth upon my clicking "Cancel" on the message. The naive and sentimental Forthcoder is not daunted or dismayed by such an AI-Mind-crash, but welcomes instead the chance to troubleshoot the AI and make it compatible with Windows XP. To debug MindForth, we will create a new version and seed it with diagnostic messages in order to find out just where and why the program is crashing with an "Exception" message. Long familiarity with MindForth causes me to suspect that there is probably a "boundary violation" where the software is trying to index one step beyond the limits of an array. We have noticed recently that searching Google for MindForth yields an auto-complete expansion of the search terms to "mindforth source code" -- an indication that Netizens have been looking for the free AI source code that we are working on right here and now. MindForth has also received a prominent mention at http://aihub.net/artificial-intelligence-lab-projects so we are motivated to make the best AI Mind that we can with MindForth and the other Mentifex AI programs.

Thurs.24.JUL.2014 -- Debugging Windows XP MindForth

In the C:\WIN32FOR directory, we enter win32for.exe to start running Win32Forth. Then we use the "File" drop-down menu and "Edit Forth File..." to click on "24jan13A.F" and "Open" it for editing and saving under a new name. Actually, we will save it immediately as "24jul14A.F" so as not to corrupt the old file by changing anything. First, however, we notice that the bottom of our WinViewX screen tells us that there are 5,173 lines of code with a size of 236,908 characters. Under the "File" drop-down menu we click on "Save File As.." and we enter "24jul14A.F" before clicking the "Save" button. We then close the WinViewX window because we want to test the new file before we proceed. We enter "fload 24jul14A.F" and we get the "ok" prompt which means that the file has successfully loaded into Win32Forth. When we enter "MainLoop" and observe without human input, the AI thinks about two thoughts and then stops with the "Exception # C0000005" pop-up message. This denouement occurs both in the default normal mode and in the Transcript mode that we invoke by pressing the Tab-key. It is time to start inserting diagnostic messages.

In the ThInk module we enter and reformulate a diagnostic message that we find commented-out in another mind-module. We forget to un-comment the code, so at first no diagnostics appear. Then we get the diagnostics, but with no change in program behavior -- it still crashes. But we see the light and we remember the Dao of debugging, that is, you figure out what modules the AI is calling and you insert diagnostics deeper and deeper into the program.

Let's see, the first part of AI thinking is to call the NounPhrase module, so let us diagnosticate NounPhrase. Aha! NounPhrase gives us some (meaningless?) diagnostics just before the Exception-crash, but the ThInk module does not. Therefore, Inspector Clouseau, the problem may lie within NounPhrase or within a module called by NounPhrase. By the way, instead of cluttering up this MFPJ journal entry with the actual diagnostic messages -- unless they become really important -- we can meta-publish the diagnostics simply by commenting them out but retaining them within the "mindforth source code" that we eventually publish on the Web. In that way, any interested party (corporate AI shop? national Ministry of AI? Ph.D. dissertation writer?) can see exactly how we have debugged the AI by inspecting the diagnostic messages that we will leave in for at least one iteration of releasing the code. So now let's plunk some diagnostics down in the VerbPhrase module in order to see if the AI thought processes are making it through NounPhrase and into VerbPhrase before the Exception-crash.

As the Forthmind thinks in English, we are getting diagnostic messages from both NounPhrase and VerbPhrase up until the dying thought of the AI, where NounPhrase reports something but VerbPhrase is silent, both in terms of output and in terms of diagnostics. So the crash could be occurring within the NounPhrase module. Therefore let us insert additional diagnostics towards the end of NounPhrase. We do so, but the software crashes before it reaches the diagnostics at the end of NounPhrase. Next we should try some diagnostics in the middle of NounPhrase. We insert diagnostics after the end of the search for the motjuste, but program-execution does not get that far and instead the Exception-crash occurs. So the problem may lie within the search for motjuste. We insert a diagnostic just before the ELSE-clause in the motjuste-search, and the diagnostic gets executed many times during non-crash thought, but not at all during generation of the thought that eventuates in the Exception-crash.

At the deepest indentation of the motjuste-search, where the "audjuste" variable is loaded with a value, we insert a diagnostic message. We run the AI. Gobsmack! From deepest NounPhrase, we get three diagnostic messages just before the Exception-crash. We notice that there is a "verblock" value of "423" as reported by the diagnostics just before the crash, so we search through the source code for the the number "423". Its only, unique appearance is at time-point t=554 in the EnBoot sequence, where "423" is assigned to the "tqv" (time-quod-vide) variable. But there is no t=423 time-point. It is interstitial, between the words "WHEN" and "WHERE" in the English bootstrap. Let us look at the source code of the JavaScript AI and see what is there. In the 14apr13A version of the JavaScript AI, at t=554 the value of "557" is assigned to "tqv", so "423" is wrong in the MindForth AI. In fact, two of the values in the Forth AI seem to have been erroneously held over from the older Forthminds before the EnBoot concepts received new concept-numbers. Let us change the pertinent section of the MindForth EnBoot to conform to the values in the JavaScript AI EnBoot() module. Hmm, when we correct the EnBoot segment, we get different output, but we still incur the same Exception-crash.

Now after massive diagnostics we find that the Exception-crash is occurring during the search for "motjuste" when the Index is at a value of "542", a point in time. Let us see what is at the t=542 time-point. We do see a t=552 error where "1" is used instead of "!" for storing a value. Let us fix that mistake.

As we correct various legacy errors from older versions of MindForth, the Exception-crash finally moves out of the time series of the EnBoot sequence and occurs once at t=615 in the time-span beyond EnBoot. Since our diagnostic message shows that the Index "I" has a value of "615" when the program crashes, MindForth must be traversing a loop at the t=615 time of the crash.

Thurs.24.JUL.2014 -- Solution found for defective search loop

Since our Exception was crashing the AI when NounPhrase was already supposed to have found a noun or a pronoun, we decided to try inserting an "ELSE LEAVE" statement just before the Forthword "THEN" ending the search-loop. It worked. The AI stopped crashing and began to think interminably. However, our Acer netbook seems to run at a high speed, and so we may need to increase some "rsvp" values at places in the program.

Table of Contents (TOC)

Friday, February 14, 2014

TuringTest

Abstract: In the mentifex-class AI Minds, TuringTest is a mind-module serving the purpose of human-computer interaction (HCI).

The TuringTest module serves as a human-computer interface between the AI Mind and one or more human users. Its purpose is to provide avenues of communication between man and machine. In the most primitive AI Minds, the keyboard and the screen of a computer are the main interface. The tactile keyboard serves as a substitute for auditory input, and the monitor screen serves as a substitute for voice output -- unless speech synthesis is channeling output through a loudspeaker or a headphone.

Earlier in AiEvolution, the same mind-module was called HCI for Human-Computer Interaction, before the module names were modified to serve as clickable links on the wiki-pages of the AI documentation. Renaming HCI as TuringTest serves the purpose of making users and coders aware of the well-known test for AI functionality named after the AI pioneer Alan Turing.

The SeCurity module calls the TuringTest module as one of potentially myriad operations affecting AI security. Since the TuringTest operation gives outside agents access into the AI Mind, the AI and the human user are mutually vulnerable to malicious intentions during the operation of the TuringTest. In MindForth and the German Wotan AI, the TuringTest module protects against liability by announcing that there is no warranty for the free AI source code. MindForth and Wotan also state the date and time that the AI Mind came to life, for inclusion during TranScript mode and for the purpose of any contest to see which AI Mind installation is the oldest or has been running the longest. MindForth and Wotan may display instructions for the user on-screen, while the JavaScript AiMind and Dushka programs present checkboxes for the user to click or unclick for a choice of display modes.

Since the JavaScript AI Minds in English and in Russian are flashier and more graphical than the bare-bones robot AI of MindForth and Wotan, there is more leeway for improvisation and razzle-dazzle effects in the JavaScript tutorial programs. Ambitious AI coders in any programming language have the opportunity and the challenge of graphically depicting even the most subtle of mental phenomena occurring in the artificial intelligence, such as the branching filaments of spreading activation and the volatile surfacing of concepts and ideas in the artificial ConSciousness.

The visibly operating TuringTest interface module is somewhat easier to troubleshoot and debug than the more hidden majority of AI mind-modules, because any glitch or software error will tend to show up immediately. Typical problems may involve timing where the rsvp variable is counting down too quickly if the host computer has an extremely fast central processing unity (CPU). The AI coder or installation supervisor may have to adjust the pertinent values.

More subtle problems may arise in connection with the happenstance timing of when a human user begins entering input into the AI Mind or how fast or how slow a user tries to communicate across the keyboard. Once again, the AI coder-in-charge may need to tweak some values not only in the TuringTest module but possibly in other modules involving input and output.

Saturday, April 06, 2013

apr6jsai

The JavaScript artificial intelligence (JSAI) is a clientside AiApp whose natural habitat is a desktop computer, a laptop or a smartphone.

1 Wed.3.APR.2013 -- "nounlock" May Not Need Parameters

In the English JSAI (JavaScript artificial intelligence), the "nounlock" variable holds onto the time-point of the direct object or predicate nominative for a specific verb. Since the auditory engram being fetched is already in the proper case, there may not be any need to specify any parameters during the search.

2 Fri.5.APR.2013 -- Orchestrating Flags in NounPhrase

As we run the English JSAI at length without human input and with the inclusion of diagnostic "alert" messages, we discover that the JSAI is sending a positive "dirobj" flag into NounPhrase without checking first for a positive "predflag".

3 Sat.6.APR.2013 -- Abandoning Obsolete Number Code

Yesterday we commented out NounPhrase code which was supposed to "make sure of agreement; 18may2011" but which was doing more harm than good. The code was causing the AI to send the wrong form of the self-concept "701=I" into the SpeechAct module. Now we can comment out our diagnostic "alert" messages and see if the free AI source code is stable enough for an upload to the Web. Yes, it is.