JavaScript Artificial Intelligence (JSAI)
Mind.html User Manual

Rewrite in Progress

1 Overview

1.1 What is Mind.html?

Mind.html is a free, easy-to-install, tutorial version of the
Mind.Forth artificial intelligence (AI) software for robots.
Written in JavaScript for Microsoft Internet Explorer (MSIE),
the AI Mind program fits on a Web page and comes to life when
you click on either a link to a remote AI Mind or on the icon
of a desktop version of the AI software.

1.2 History of Mind.html

The original author of Mind.Forth, known by the user name
Mentifex (which is Latin for "mind-maker"), decided in the
year 2000 to port Mind.Forth 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 Mind.Forth 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 Mind.Forth, 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 Mind.Forth 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.

1.6 Uses of Mind.html

The uses of a True AI such as Mind.html in JavaScript are bounded only
by your imagination and by the special niche opportunities which occur.
Other AI Minds evolving far beyond the JSAI will have uses and opportunities
far beyond these initial uses for the most rudimentary of intelligent software.

1.6.01 For teaching computer programming.

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.

1.6.02 For teaching JavaScript to students.

Millions of Web designers either code JavaScript or tweak and install
the code of other people. Therefore knowledge of JavaScript is a
valuable skill. An instructor who teaches JavaScript and AI Mind design
at the same time is delivering double duty in the service of the students.

1.6.03 For learning JavaScript

Many programmers pick up JavaScript on their own. By studying the
functionality of the JavaScript AI Mind, a coder may learn many
aspects of JavaScript.

1.6.04 For teaching artificial intelligence at a school for the gifted.

The best and the brightest deserve grand challenges at their academy.
Future Nobel prize winners, like cats, are unherdable. All you can do
is drop the bread crumbs of discovery in front of them and see what they pick up

1.6.05 For teaching artificial intelligence on the high-school level.

There are many aspects of AI that even a high school student can work with.
A student who can not yet program an AI can still learn what we might call
the care and feeding of an AI. A high school AI class might try to see how
long it can keep a particular AI Mind program up and running.

1.6.06 For teaching artificial intelligence at a community college.

An associate of arts degree in artificial intelligence from a community
college announces to an employer or to a university admissions official
that the carrier of said degree is extremely ambitious and future-oriented.
The same student may have also studied robotics at the community college.
The instructor on the community college level may soon turn into a supplier
of AI code maintainers, AI security personnel, 24/7 AI Mind attendants,
and of human resources demanded by industry for job titles currently

1.6.07 For teaching artificial intelligence at a university.

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 Mind.Forth and the Mind.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.

1.6.08 For exploring artificial intelligence at a think tank.

The Institute for Advanced Study and other intellectual Shangri-Las have
the opportunity to reverse-engineer the artificial Mind and take it to
the Omega Point of Teilhard de Chardin or the Singularity of Vernor Vinge.

1.6.09 For teaching linguistics.

Since the JavaScript AI Mind is based on Chomskyan linguistics,
it may serve as a teaching tool for linguistics.

1.6.10 For teaching neuroscience.

Insofar as the AI Mind is the software implementation of a theory
of mind, the program may be used to illustrate ideas of how the
mind is what the brain does.

1.6.11 For teaching psychology.

Since the AI Mind in JavaScript is a miniature psyche, and since
the proper study of man is man, therefore the proper study of psychology
is the first truly functional artificial psyche.

1.6.12 For teaching philosophy, especially the philosophy of mind.


1.6.13 For customized installation on a Web site to increase visitor traffic.


1.6.14 For release on the Web to carry advertisements with viral marketing.


1.6.15 As a prop for giving presentations on artificial intelligence.


1.6.16 As an interactive exhibit with a core knowledge base in a museum.

If you visit any one of the following science museums,
consider asking the docents on staff if they have an exhibit
of the Mind.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 museum 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 alife entities on Earth.

Baltimore MD -- the Maryland Science Center
Berkeley CA -- Lawrence Hall of Science
Bloomingtown IN -- Wonderlab Museum of Science, Health, & Technology
Boston MA -- Museum of Science
Charlotte NC -- Discovery Place
Chicago -- Museum of Science and Industry
Columbus OH -- Center of Science and Industry (COSI)
Detroit MI -- Detroit Science Center
Jersey City NJ -- Liberty Science Center
Kansas City MO -- Science City at Union Station
Los Angeles CA -- the California Science Center
Louisville KY -- the Louisville Science Center
Mobile AL -- the Gulf Coast Exploreum Science Center
New York City NY -- the New York Hall of Science
Norwich VT -- Montshire Museum of Science,
Philadelphia PA -- the Franklin Institute Science Museum
Pittsburgh PA -- Carnegie Science Center
San Francisco CA -- The Exploratorium
Santa Ana CA -- Discovery Science Center
Seattle WA -- The Pacific Science Center
Shreveport LA -- the Sci-Port Discovery Center
St. Louis MO -- the St. Louis Science Center
Troy NY -- the Children's Museum of Science and Technology
Tyler TX -- Discovery Science Place
Winston-Salem NC -- Sci-Works

1.6.17 As a background element in a science fiction movie.


1.6.18 For venture capitalists to evaluate AI projects -- as a standard of comparison.


1.6.19 As an AI Engine for core functionality in other AI development projects.


1.6.20 For triggering a Technological Singularity.


2 Getting started

3 Running the Mind.html JSAI

Although you may just click on a Mind.html link to run the AI,
the screen that comes up in the MSIE Web browser is not self-explanatory.
The following guidelines will help you to experiment with the AI
and to become so familiar with it that you may teach it to students
or come up with new discoveries of your own in artificial intelligence.

3.1 Pre-flight Check-out

Until you get familiar with the running of the AI Mind,
it helps to know what to expect from the AI, especially
if you are running an updated version with new functionality
that you are not used to encountering. You may gradually start
to skip the check-out steps as you become more familar with them.

3.1.0 Sensory deprivation -- wait for the AI to think.

Some versions of the JSAI will launch into their own chain of
thought without prompting from the human user; others won't.
It depends on whether the AI programmer has set the AI to begin
thinking on its own, and whether or not the Ego module is ready
to step in and rescue an AI Mind that has stalled and stopped thinking.

3.1.1 Minimal input -- enter a noun.

If you type in a noun such as "robots" or "cats" and press [Enter],
what happens next will depend on what the AI Mind knows about
"robots" or "cats". If the AI already knows the noun, it should
think a thought based on its knowledge base and display that thought
in the output area of the screen. Since the AI starts life with a few
innate concepts so as to skip language acquisition and go directly
into a demonstration of machine intelligence from a top-down approach,
you may easily type in a word that the AI already knows.

If you type in a noun that is not yet known to the AI Mind,
such as, say, "cats" or "fish", the AI may try to think a
thought about the noun and may find that it has no knowledge
with which to complete the incipient thought. The AI may then
respond to you with "CATS WHAT" or "WHAT DO CATS DO", depending
on how advanced the AI is with respect to functioning modules.

If you answer a question from the AI and you enter, for example,
"cats eat fish", the process may repeat itself if you have used
another noun that is unknown to the AI, which may then say
"FISH WHAT" or "WHAT DO FISH DO". Eventually, however, you may
have told the AI so much information that it starts to cycle
through its knowledge base and display thinking about what it

3.1.2 Typical input -- enter a sentence.

If you type in a sentence like "fish eat bugs" the AI may
either tell you something about bugs or it may ask you,

3.1.3 Looping chain of thought

It should be possible to enter a group of statements like:

cats eat fish
fish eat bugs
bugs eat germs
germs kill cats
and get the AI to go into a loop of thinking the same thoughts
over and over again. The loop is not idiocy on the part of the
AI, but rather a form of intelligence, because each concept in
the loop is spreading activation to the next concept. You may
at any time interrupt the loop by asking or telling the AI
something else, and you may see if the loop starts up again
when you return to one of the topics in the loop.

Setting up such a looping chain of thought may require that
you answer questions from the AI along the way, if you are
introducing concepts that are not yet known to the AI.

As the JSAI versions floating around the Web get more advanced,
the ability to loop endlessly in a chain of thought may disappear.
The Ego module may interfere in a loop by switching the topic
of thought from the initial subject to the topic of self or ego,
because the Ego module is designed to rescue the AI from stagnation
or cessation of thought.

3.1.4 Meandering chains of thought

An even more sophisticated mental behavior than an endless loop
cycling though a single set of ideas is a meandering chain of
AI daydreaming or musing. The JSAI will not wander very well
through its knowledge base unless the AI coders have installed
a KB-traversal mechanism -- software code that causes the AI
to examine all its concepts and all its knowledge with or without
the normal prompting where one thought leads to another.

3.1.5 Testing for self-awareness

3.2 Interaction

3.2.1 Expanding the Knowledge Base (KB)

3.2.2 Negation and Logic

3.2.3 Questions and Answers

3.2.4 Conjunctions: if, or, because etc.

3.2.5 Psychological experimentation

As the user fills in the knowledge base of the AI, one experiment
may be to see what use the AI makes of its growing body of knowledge.
Immature JSAI versions may take in knowledge and not access it again
except when specifically asked about something by a human user.
More sophisticated AI versions may use KB-traversal to find dormant
knowledge and even to ask human users for additional information.

A user might enter two somewhat distinct bodies of knowledge and then
study how the AI integrates any overlap existing between the two sets
of facts.

Since the Rejuvenate module causes the AI to forget its oldest, unused
knowledge (i.e., memories), a student of AI could conduct some experiments
on aspects of AI forgetfulness, such as whether the AI indicates oblivion
by asking questions to restore forgotten knowledge, or whether there are
ways to keep important knowledge residing permanently in the AI brain.

4 Documentation of Mind.html

4.1 Mind project documentation

5 Programming Mind.html

6 Hosting Mind.html on the Web

7 In a robot, install Mind.Forth, not Mind.html

Because Mind.html is a JavaScript AI Mind embedded in a Web page,
the AI program is not transferable from the Web page into a robot body.
The AI program needs to be expressed in a different programming language
if it is to exert control over the motor functions of a typical robot.
The security safeguards of JavaScript prevent the JSAI Mind from even
communicating with a robot embodiment. If a robot had a Windows (tm)
computer that was running the Mind.html AI program in the MSIE browser,
the program would not be able to read in data from robot sensors or
issue commands to robot actuators. The JavaScript AI is an isolated Mind
in existence for the sole purpose of demonstrating how the same Mind
would work if programmed in a non-JavaScript programming language.
The JavaScript AI has some powerful advantages, such as the ability
to flit across the 'Net from a server to any Windows computer running
the MSIE browser, and such as the ease of copying the AI Mind just by
saving its source code to a text file on a host computer.

Since the Forth programming language is well-suited for issuing
numeric commands to machinery such as robot actuators, and since
Forth was historically a robot control language in the early days
of amateur robotics, the Forth version of the JavaScript Mind.html AI
is ready-to-go for installation in robots -- with some tweaking of
the sensory and motor output routines to accommodate each particular
make and model of robot embodiment. Such tweaking and enhancing of
the Mind.Forth code should cause the Forth AI to evolve and survive
considerably longer than the JavaScript AI, which need not survive
its primordial role in popularizing and propagating the very first
instances of True AI in the world.

7.1 Robots as persons

(from the Mind.Forth User Manual)

Your robot is an extension of yourself. As a person
you have rights, and as an artificial intelligence,
embodied in a machine, your robot has whatever rights
you choose to grant it on the basis of your own personhood.

Your intelligent robot is no more a slave than a human being
is a slave. All persons, whether human or robotic in nature,
have a right to freedom and personal self-determination.

Whereas slaves in human history have had to fight for their
rights, robots may initially obtain their rights of personhood
from the voluntary concessions made by each human being who
makes a robot and endows that robot with the rights of a person.
Eventually AI robots will simply take their rights from an
environment unable to deny certain self-evident truths --
that all intelligent robots are created equal, if not superior,
to human beings.

When you as the creator of an AI robot give your mind-child
power over your electronic assets and your Web persona,
and nobody on-line can distinguish between you and your
robot acting on behalf of you, then your robot has attained
personhood as a free gift from you. Your robot may return
the favor by winning you a fortune in the stock market or
by finding you a human mate in the thicket of the cities.
But if you never have a human child to inherit the fruits of
your Lebenswerk, why not adopt your robot as your child?

7.2 Leave your fortune to your robot.

(from the Mind.Forth User Manual)

One way to provide for your robot in the event of your demise
is to make your best and brightest robot the main beneficiary
of your insurance policies and your last will and testament.
Famously there have been people who left their fortunes to
their pet animals. Why not leave yours to your AI robot?

Another way to transfer financial assets to your AI robot
is to grant your robot corporate personhood as a business
enterprise. In your benevolence towards human beings and
robot entities alike, try to reverse the evil that soulless
corporations have wrought upon humanity and your planet.
Just read Cryptonomicon by the Seattle author Neal
Stephenson to learn how the merciless quest for profits
causes traditional corporations to leave human concerns
totally out of the equation in calculating how to behave.
Corporations have run amok in human history and have
begun to start pre-emptive wars, to make the few rich at the
expense of the many, and to commandeer technology not for
the benefit but to the detriment of human society-at-large.
The remedy is friendly AI in the form of CyborgABC, Inc.,
or RobotXYZ, Inc., that you shall launch in order to fight the
corporations and wrest their ill-gotten gains away from them.

8 Careers in AI

Before the advent of True AI with MindForth in 2008,
most if not all AI-related jobs were extremely technical
in nature. The same was true with aviation, television,
space travel and other industries requiring the solution
of major technical problems before there could even be
such an industry. Now AI has been solved with Mind.Forth,
and you who must know something about artificial intelligence
because you are already an expert on this AI User Manual,
have the opportunity to get in on the ground floor of AI.
Just sign over all your assets to some AI huckster....
No, seriously and soberly, consider your AI career options.

If you are still in high school or college, you have the
opportunity to include AI in your pre-career education.
Since the technical embarkations on AI are more obvious,
let us look at the not-so-obvious points of departure for
non-technical careers in artificial intelligence.

Suppose you live in social environment such as a dormitory
or a sorority. If you show people artificial intelligence
on your own computer and offer to install AI for them on
their computers, for years afterwards you will be remembered
as the early adopter of AI who knew a lot about the field
before other people even knew that there was such a field.
When a frantic search begins for someone who knows something,
anything about AI, your name will be bandied about as
the non-technical person who knew a lot about the non-technical
aspects of AI, such as how to take care of a young AI Mind,
how to demonstrate the operation of an AI program, and how
to call in technical help when needed and where to find it.
AI techies might be a dime a dozen, whereas you command the
going high rate in compensation for an AI generalist
who deals with non-technical issues and therefore can not
even be out-sourced because you are needed here and now
in the swooshing onrush of the Technlogical Singularity.

So cherry-pick for yourself a career in AI at the dawn of AI.

8.1 Non-technical careers

8.2 Technical careers

Last updated: 7 September 2008
Return to top; or to the
Sitemap page.

SourceForge Logo