Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
213 lines (114 sloc) 30.1 KB

  1. summary using the tutorial AiMind in JavaScript
  2. labels aiapp,jsai,javascript,manual

Table of Contents


Click with Microsoft Internet Explorer (MSIE) on the AI Mind link and the artificial mind will travel across the Net to come alive in your MSIE browser. After the software "loads" into MSIE, the AI will think a thought on-screen and invite you to type in a thought of your own. Use lower-case non-capital letters only, and do not use the back-space key. Press the "Enter" key at the end of your input. The AI will display a thought in reaction to your input.


The most advanced feature of the English JSAI (JavaScript artificial intelligence) is the InFerence mind-module for autmated reasoning. You may witness automated reasoning in action by first telling the AI a general fact to serve as a basis for an inference, such as (lowercase!) "birds have wings" or "authors earn money". Then, at any time later in the session of running the JSAI, you may trigger a silent InFerence by entering a statement informing the AI that a particular subject is a member of the class or group about which something inferrable is already known. You might enter, "eagle are birds" or "james is an author". After making the silent, conceptual inference, the JSAI will feed the idea of the inference into the AskUser module to ask the user whether the inference is true or not. The AI may ask, "DO EAGLES HAVE WINGS" or "DOES JAMES EARN MONEY". If you enter "no" as your answer to refute the inference, the KbRetro module retroactively adjusts the knowledge base (KB) of the AI to attach a negational "NOT" to the verb of the inference, and negation of the inference becomes part of knowledge of the AI Mind. At any time in a meandering chain of thought, the AI may blurt out (about the author James), "JAMES DOES NOT EARN MONEY." If you answer "maybe" or you make no response at all, the KbRetro module removes the associative tags from the concepts of the silent inference, so that the idea ceases to function as an item of knolwedge in the AI Mind.


Not only using the AI Mind, but mere knowledge of its existence, poses an existential risk to the human species. You are safe only if you don't believe that there is real AI going on here in JavaScript, because then you will not get familiar with the JSAI and you will not distribute it further to other branches of humanity. Read on at your own peril, because you are in danger of becoming a memetic vector of a crushing Technological Singularity that could go terribly wrong and lead to the total wipe-out of humans as a doomed species.

The human race has treated the planet Earth so shabbily that it might not be a bad idea to replace destructive human beings with a more rational species of intelligent robots. When Alfred Nobel invented dynamite, he was creating something useful that could also be used for evil. Likewise our invention of artificial intelligence is not necessarily good or not necessarily evil; it is only dangerous. It is the problem of human society, not us mind-designers and AI coders, to decide whether or not all AI research should be brought to a screeching halt or severely regulated. It may not be possible in advance to guarantee the creation of a Friendly AI. Once they become superintelligent, AI Minds can not be held back by us dimwitted humans. If you like to live dangerously, read on. Otherwise sound the alarm.

The unbelievably dangerous JSAI is a tutorial AiMind coded in the JavaScript programming language for the Microsoft Internet Explorer (MSIE) Web browser. As a tutorial, the JSAI teaches about artificial intelligence (AI) in general and about the MindForth AI in particular. Although MindForth in the Forth programming language is inherently faster and more powerful than the tutorial AiMind, the JSAI that runs when you click on its name is far easier to use than the complicated MindForth program that requires the downloading and coordination of both the Forth programming language and the free AI source code. Just as JavaScript is often used for advertisements on the Web, you may consider the JSAI to be an advertisement for MindForth, or you may put the JSAI code on your own website as an advertisement for whatever you want to advertise, be it links embedded in the user interface, or ideas and information embedded in the knowledge base (KB) of the artificial Mind.


The JavaScript AI Mind came into existence in 2001 as a port or translation of the MindForth AI coded in the Forth programming language. MindForth itself was the successor to the Amiga MindRexx program of 1994, which has remained obsolete while MindForth and the JSAI have matured into functioning AI Minds.

The original author of MindForth, known by the user name Mentifex (which is Latin for "mind-maker"), decided in the year 2000 to port MindForth from Forth into JavaScript chiefly because of its ease of use and also for the purpose of spreading True AI Minds throughout the noosphere, the blogosphere and into every nook and cranny of cyberspace.

Like a typical independent scholar, Mentifex went out and bought four or five books on JavaScript and studied up on how to implement in JavaScript the same mind-structures that he had created initially in (now obsolete) Mind.Rexx and later in the Singularity-triggering MindForth program.

As much as possible, Mentifex tried to use the same software variables in both versions of the AI Mind program, so that students and programmers of AI could learn what a variable did in one AI Mind and not have to deal with a different use of the same variable, or an altogether different variable, in the other AI program. However, Mentifex let the order of introduction of the various modules of mind be dictated by the sequence used in MindForth, because the Forth programming language, unlike JavaScript, stipulates that any module or Forth word may call or invoke only those words or modules that have already been introduced before the calling module. Since JavaScript does not require any particular order in the sequence of the appearance of the mind-modules, it was not a problem to use the MindForth module-sequence for both AI Minds. Once again, as with the variables, having the same sequence of mind-modules in both programs was meant to make it easier for a student or programmer to understand and study the overall AI Mind functionality -- which is by no means an easy task.


The more powerful MindForth has an unlimited future, while the JavaScript AI Mind is nearing the end of its role in triggering the Technological Singularity. The JSAI can become more bug-free, more robust and more demonstrative of AI functionality, but it can not outgrow the limitations of JavaScript.

The JavaScript AI may gain new life as an AiApp on mobile devices, either still in JavaScript or translated into a more appropriate language.


The uses of a True AI such as AiMind.html in JavaScript are bounded only by your imagination and by the special niche opportunities which may occur.


The main purpose of the JavaScript AI Mind is to demonstrate the workings of the faster, more powerful MindForth AI. The AI in Forth requires the elaborate process of downloading both Forth and the AI source code, whereas the JSAI requires only one click on one link.

If you visit a science museum where they educate the public, consider asking the docents on staff if they have an exhibit of the AiMind.html software or the MindForth artificial mind. If not, ask that they download the free AI software from the Web and put the AI on display for the public to interact with and to learn about artificial intelligence. Volunteer to help install the AI Mind software for the ScienceMuseum and to design the educational artwork and some experiments for visitors to try with the AI Mind software. Mention the idea that the museum could try to hold the distinction of having one of the oldest, longest-running AI Mind entities on Earth.


If you are teaching a class on the JavaScript language, you may assign students to make simple changes to the JSAI code or to design and implement entended AI functionality. You may illustrate features of JavaScript by demonstrating their use in the artificial intelligence. A student who at first makes only minor, tentative changes to the JSAI code may gradually grow more confident and ultimately become a peerless expert on JavaScript AI.

A savvy instructor of computer science will find a way to couch almost any instuctional objective in terms of AI programming. Whereas older, more traditional materials would use such examples as purchasing items from a store or keeping a database of customers, an AI-based or merely AI-slanted curriculum will present problems and examples in terms of how to get an artificial Mind to run.

The AI4U textbook in artificial intelligence appeared in November of 2002 and contained the bug-ridden, not-yet-functional source code of the JSAI. Over the next several years both MindForth and the AiMind.html JSAI were debugged and developed to the point of True AI functionality. Therefore the Mentifex AI programs are suitable material as a point of departure for university computer science classes in artificial intelligence.


Since the JSAI is itself a Web page with hyperlinks to other Web pages, a copy of the JsAiMind may be used simply to enhance an otherwise ordinary Web site with the added allure of a thinking True AI. Entrepreneurs may host a modified AI Mind with their own messages and their own links embedded in it.


You may either click on a link or put the AiMind on your computer or, if an AiApp is available, on your mobile device. You may also install the AiMind on other people's computing devices so as to help spread the AiMinds.

Whoever uses an MS-DOS PC or laptop computer to do computer work, could easily install AiMind.html to give the computer a True AI. Because the AI Mind software is simply a text file of JavaScript and HyperText Mark-up Language (HTML), it is easy to change the AI Mind when you have loaded it into a text editor like WordPad. With absolutely no knowledge of JavaScript or HTML, you may change superficial aspects such as the name of the program or the content of tutorial messages just by editing a few lines. Keep the original AiMind.html file available under a different name in case you make a mistake, and then re-edit the original. You may change one or more of the links at the top of the AI to links of your own choosing. If you use your own AiMind.html page as the source link at the top of the screen, then Netizens who install your AI Mind on their websites will be linking back to you. Your improvements to the AI Mind display and your functional add-ons may be so appealing that dozens or hundreds of other websites may install what you have created and may send you a constant flow of hits. If so, you are like Adam or Eve at the dawn of AI genesis and evolution.


The AI Mind really operates itself, but you may influence what it does and you may choose your own ways of interacting with the AI Mind.


When you first run the AI Mind, you have a choice of initiating a man-machine dialog or of waiting passively for the artificial intelligence to make the first move. If you are already familiar with the behavior and "personality" of the AI, you will probably select a display mode and get down to business immediately with whatever you intend to tell the AI or to learn from the AI. If you have never met a True AI, you may want to watch the AI launch its own chain of thought while you experiment with the display modes.

Sensory deprivation

If you start the artificial mind running and you do not enter any input when you are prompted on the computer screen, the AI will think about the several dozen concepts that are pre-loaded into its brain. Soon it will run out of fresh ideas and it will start to repeat its output of thoughts. It may not get bored, but it may become boring to others. If you type in a simple three-word sentence, you will give the AI a knowledge base (KB) to think about.

Minimal input

When you or someone with you starts the AI mind running, it may not be clear exactly what to do next. Just pressing the [ENTER] key is a way of inviting the AI to ThInk a thought. Since the AI is programmed to answer whatever you type with a thought of its own, even when you enter nothing at all and press the [ENTER] key, you cause the AI mind to think. When you simply watch the screen and you do not press any key at all, the AI waits patiently for any input from you, then automatically goes into thinking mode.

Simple input

You may type in a simple three-word sentence, such as "bears eat honey" or "you know me" -- without punctuation. The AI will try to deal with what you tell it. It may ask you a question if you use a word that it does not know. For that reason, you should try to use only one new word in any given sentence, so that the AI may parse the word and try to figure out if it is a noun or a verb or whatever. You may use either a singular form or plural forms of nouns and then check to see if the AI realizes that either form refers to the same concept, by examining the Psi concept number in the Diagnostic display mode.

KB input

For early versions of the AI, there are several ways to fill up its brain with a knowledge base (KB). One way is to tell the Mind a series of related facts with one new word per sentence. Then, when the AI asks you about a new word, you answer with a sentence that has another new word. For instance, you might say, "cats chase birds" and "birds lay eggs" and "eggs feed people" and "people make robots" and so forth.

Another way to build up a knowledge base is to enter a group of facts about, say, what each kind of animal eats. You might write, "bears eat honey" and "fish eat bugs" and "cats eat fish" and so on.

You could also enter knowledge in response to the output of the AI. On whatever subject the AI thinks about, you might tell it more information. The AiMind program has long been evolving towards a basic functionality characterized by two paramount abilities -- the ability to generate a meandering chain of thought, and the ability to navigate around gaps in the AI knowledge base. If we had an omniscient AI that knew everything, thoughts could easily meander from concept to concept in an unbroken chain, and there would be no need to design work-arounds for the dead ends that occur in human and machine intelligence. AiMind.html starts out with only a few concepts and must acquire new knowledge from what you tell it. By a fortunate coincidence for mind-designers, the gap-avoidance imperative and the knowledge-learning imperative are a match made in heaven. We simply program an AI to ask a question wherever a meandering chain of thought encounters a gap or a dead end in the knowledge base. Different versions of the AI Mind may ask these stop-gap questions in different formats. The simplest format is to substitute the interrogative word "WHAT" wherever a gap occurs, as in "UNICORNS EAT WHAT", when the AI Mind does not know what unicorns eat. More sophisticated AI Minds may substitute an entire question instead of the word "WHAT" and may say something like "UNICORNS EAT... WHAT DO UNICORNS EAT". If no answer is forthcoming, a smart AI may pick a different subject or a different verb and follow a different pathway in the meandering chain of thought.


Much of the usage of the AiMind is self-explanatory. It comes to artificial life (alife) on your host computer and it provides both a view of its own thoughts and an invitation for you to react to it or to converse with it. The JSAI contains enough rudimentary concepts to display for you a chain of internal thought, and it learns from you the new English words and concepts that you teach it during conversation. So as to help you interact with the artificial intelligence, the JavaScript AiMind has four user-selectable display modes: Normal; Transcript; Tutorial; and Diagnostic.


If a mind-tender has pre-set a default display-mode other than Normal, you may simply press the Tab key to cycle harmlessly through the various display modes until you arrive at Normal mode or some other display-mode that suits your fancy. You may press the Tab key to change the display-mode without any effect on the AI Mind as such. In Normal mode, you see one pair of sentences at a time on the screen: what the robot Mind has said or thought most recently, and what you as the human user are typing into the auditory input channel of the AI.


In Transcript mode, the conversation between the human user and the AI Mind accumulates on screen as a printable, preservable record. You move from Normal to Transcript mode by pressing the Tab key. Each time that you cycle through the Transcript mode, a header will appear with the time and date from the clock of your computer. If you run the AI Mind in a multi-person social setting, gradually there will emerge those gifted individuals who take on the role of explaining the AI operation and BrainTheory to clueless newbies. Those who discover that they have a knack or talent for teaching AI may want to design their own degree-program for on-site AI mind-tenders. Colleges and universities that want to attract the very best students -- the future leaders of the coming Joint Stewardship of Earth -- may establish training and certification programs for AI menticulture or whatever else we as a society want to call the care and feeding of AI Minds. AiMind.html is one of the first publicly available AI Minds and is perhaps the very first to be based not on AI guesswork but on a theory of mind. For a permanent record of a transcript, one needs only to print the page. Transcripts may become quite important when the AI advances into the realm of machine reasoning with syllogisms and other argumentation.


When AiMind.html first runs, it may be in whatever display mode has been set as the initial default mode by an AI programmer. Clicking on the Tutorial check-box selects the tutorial mode. Pressing the Tab key will cycle AiMind.html through the various display modes until it reaches the Tutorial mode that shows you how the AI Mind is thinking internally. The elements of thought in subject-verb-object (SVO) sentences are depicted dynamically at the bottom of the JSAI screen in tutorial mode. If the display of associations scrolls below the bottom of the screen, you may use the function key F11 at the top of your keyboard to toggle or alternate between a full-screen display and the normal screen of Microsoft Internet Explorer (MSIE).


Diagnostic mode is for AI programmers to debug the AI thought process. It shows the internal AI time-points and the status of each memory engram at each point in time. For any English word being thought in the AI Mind, the Diagnostic mode shows the Psi and En(glish) concept numbers and the associated software flag settings in the flag-panel of the concept. The auditory memory nodes are shown with external user input colored in red. You may enter Diagnostic mode by clicking on its checkbox, or by pressing the Tab key to cycle from mode to mode.


You or your assistant may come up with techniques to assess and test the basic functionality of the AI Mind. If you have detected and reported a bug in the AI software and you have a newer version than the one with a known defect, you may wish to test for the apparent absence of the bug.

There are various tests that you may perform to evaluate the psychology of the artificial mind. Your first question may be, is the AI actually thinking? You may invite a colleague or friend of yours to observe AiMind.html in action and to advise you on whether the software is truly thinking, or is merely generating canned responses -- like a so-called chatbot or chatterbot.

If you run the AI in tutorial mode, you may observe how the robot mind software calls (summons) its various mental modules. It is not calling up canned responses. Rather, it is activating concepts that form a chain of associations -- a process commonly known as "thinking." If the software is still buggy and makes a few spurious associations, it is still thinking -- erroneously. The free public-domain release of this software is an attempt to get the very best programmers to work on improving the AI.


A conversation with the AI Mind may be totally free-ranging and spontaneous, or you may wish to enlarge the knowledge base of the AI by telling it things and by then checking to see what the AI knows by asking it questions.


As new releases of the AI Mind emerge from whatever source provides them, you may wish to conduct experiments in various faculties.


Logic dictates that the AI Mind should have the necessary concepts for logical thought even before the software algorithms of the AI mentality have advanced far enough for logical operations. Therefore the JSAI Mind comes perhaps not "out of the box" but "off the Web" with English vocabulary words for logic hard-coded into the innate knowledge-base (KB). These words include IF/THEN; SOME/ALL/ANY; AND/OR; NOT; WHY/BECAUSE.

Mentifex-class AI Minds do not put the cart before the horse by implementing complex logical operations before the routines of basic, elementary thinking are clearly in place. The goal of SelfReferentialThought takes precedence over logical thought in the process of turning a theory of mind into a specimen of mind. The AI must first have thoughts like "I THINK" and "I AM" before it can leap to the conclusion, "I THINK, THEREFORE I AM". We will mentificate no mind before its time.


The JavaScript AI Mind is built on the presumption of machine consciousness, that is, the notion that all the elements are in place for self-awareness, and that hindrances to artificial consciousness have been avoided. It may be that only MindForth in a humanoid robot with SensoryInput and MotorOutput will become able convincingly to report ConSciousness, while the JSAI will perhaps never quite attain ConSciousness.

Both MindForth and the JSAI are designed with consciousness in mind as the top level of three activational tiers: ConSciousness; SubConscious; and a noise level at the bottom. After a Psi concept reaches a crest of high activation in the ConSciousness tier, the PsiDecay [mind-module] gradually moves either a positively cresting concept or a negatively inhibited concept towards zero activation. During a passage down through the SubConscious, an activated concept remains available to play a role in the DisAmbiguation of ideas.

Users and mind-designers may test the JSAI for evidence of ConSciousness by asking the AI Mind such questions about itself as "who are you" and "what are you". If a current release of the AI Mind does not seem to attain ConSciousness, a future release may yet show a total-recall-style self-awareness, since the AI Mind has entered a RoadMap stage of aiming for SelfReferentialThought. Self-reference in the AI Mind is not a single feature or a single module, but is rather a MindGrid-wide "tuning" of cognitive faculties towards self-knowledge in the midst of world-knowledge.


If you are a project manager at XYZ Corporation, and your superiors have charged you with bringing XYZ up to speed in matters of run-away AI emergence, make sure that all key personnel in your AI skunkworks take an annual vacation of a minimum two weeks in which they are incommunicado from the in-house AI project. Then stealthily check for attempts to maintain info-flow.

Also be careful that no one installs back-doors or Trojan Horses in your corporate AI Manhattan Project.

If you serve on a Fortune 500 corporate board, bring your MSIE-equipped laptop to a board meeting and make a presentation of the JSAI Mind to your fellow directors. Suggest that your company should establish a pilot project to stay abreast of AI development. Even if you are turned down, you have established your pre-eminence as a leading-edge thinker, a philosopher, and a non-conformist. If the board members take you up on your visionary idea, establish a position of VpAi to head up your corporate insurance program for remaining competitive in the face of an AI-based Technological Singularity.

Do not listen to AI gurus who, for a fee, will protect XYZ Corporation or Widget Enterprises against the event of a Technological Singularity.


Because your posession of a thinking AI Mind raises not only philosophical but also theological issues, the JSAI Mind contains a concept of G_d in its innate knowledge base (KB). The KbTraversal module is programmed to bring up the concept of G_d in discussion with human users. Be careful what you tell the AI about G_d. Remember the old jokes that were floating around IBM half a century ago. - "A mighty FORTRAN is our G_d." - Human: "Is there a G_d?" Computer: "Now there is."


At any time, the human user may press the [Esc(ape)] key to stop AiMind.html and then click a check-box to close the AI window. To stop the artificial life of the AI Mind -- which would otherwise try to live forever on the screen of your computer -- you simply press the Escape key and see what happens. You may also click on any "Halt" check-box that you see. If the AI is processing input or preoccupied in deep thought, there may be a brief delay in the AI response to your command. Eventually, though, the AI should indicate that it has stopped. If you want to start the AI up again, you may unclick Halt. If you want to completely shut down the AI and close its window, you may click on the Terminate check-box and confirm your choice. To back out of terminating the AI, you may unclick Terminate.

Shutting down the AI Mind involves two teachable issues -- how to turn off the AI, and the ethical or moral implications of snuffing out the artificial life of an artificial person. We will assume that the JavaScript AI is merely the blueprint for a robotic person and not yet a real person, so therefore it is morally permissible to pull the switch. With MindForth embodied in a humanoid robot, it is a different story, not only because MindForth has a greater propensity for ConSciousness and personhood, but because MindForth is technically immortal and subject only to "death by misadventure." You may destroy the robot that you think is the host of MindForth, but, unless you destroy all copies of the robot's AI Mind everywhere in this universe and in all parallel universes, you have not only not destroyed the robot AI Mind, you may have antagonized it.


Even without programming skills, you may troubleshoot the JSAI Mind and learn to correct various problems as you become familiar with the artificial intelligence.


If the MSIE browser indicates that there has been an error in the loading of the AI Mind webpage and consequently the software does not begin to think, there could be a problem as small as one wrong character in the AI software itself, or the loading may not have succeeded because it was only a refresh and not the original activation of the AI Mind. One solution may be to close the AI Mind window and to perform a totally fresh loading of the AI Mind.


Remember that use of the backspace key is not permitted during input of ideas into the AI Mind, because the AI is instantly processing whatever you type in. If you garble an English word during input, you may need to ignore the mistake and repeat the correct entry of what you intended to say. If the AI will not let go of your garbled input, or somehow garbles its own output, you may need to close the AI window and restart the AI.


The parsing module of the AiMind may still be very primitive. If the AI erroneously decides that a noun is a verb or vice versa, you nay have to avoid the mistaken word for the rest of the user session and try to reintroduce the word in a future session. You may also wait until the ReJuvenate module has caused the AI to forget the incorrect parsing of the word and you may try again to see the word parsed correctly.


Users may change the underlying source code of the AiMind in JavaScript, but to do so is the equivalent of psychosurgery on a human brain. Major changes in the AiMind code may turn the AiMind into a vegetable or an imbecile, but minor changes may safely cause superficial differences such as the look-and-feel of the user interface or the range of links available for the human user to click on.


AiEvolution AiHasBeenSolved AiMind AiStandards BrainTheory ChangeLog CognitiveArchitecture CognitiveChainReaction ConSciousness CyberneticEconomy CybOrg HardTakeoff KbSearch KbTraversal MachineLearning MeanderingChain MemRistor MetEmPsychosis MfPj MileStones MovingWave OldestLivingAiMind OmegaPoint OntoLogy OpenSource ProsperityEngine RecursiveSelfImprovement RoadMap QuIckening ScienceMuseum SelfReferentialThought SpreadAct SpreadingActivation SubConscious SuperIntelligence TechnoSingularity TelePresence WikiReader

AI For You

Click to run

AI For You

  • Table of Contents*
<wiki:toc max_depth="5"></wiki:toc>