HAL – Heuristic Analysis of Language

Talk to an alien intelligence...

HAL is an application that quickly learns to converse in human languages. It does this by learning the words used, and learning the order the words (and punctuation) are used in.

You type your input (one or more complete sentences) in the “Current Input” text-box, and then hit the Enter-key. Your input needs to end with end-of-sentence punctuation.

HAL reads your input, learning the words and word-order, and tries to say something using what it has learned. If it doesn't yet know enough to say anything, it says something like “Huh?”.

If it doesn't know what to say (as above), simply input more sentences to it, and it will learn more, and be able to respond. The most common reason for it not knowing what to say, is if you use different end-of-sentence punctuation than you've ever used before. For most punctuation, a group of punctuation characters (such as “...”) is different from a single punctuation character (such as “.”).

It's not a problem if you spell words wrong. It will learn the spelling you use. Regardless how you spell words, it works better if you spell consistently.

Click on the links below for detailed information on using the two tabs (panes) of the application. This information can also be accessed by clicking on the “Help” button of the applicable pane (except in the sand-box version, which has too few privileges to access your browser).

The Conversation Pane

The Configuration Pane

History of the Application

The application was originally written (in the late 60's) in the Snobol 4 programming language. I had the idea for the simple version of the algorithm, and wrote it as a whim (where this sort of thing is fairly easy to do in Snobol), not knowing how effective it would be.

It surprised me how effective it turned out to be, and it quickly became popular in the terminal room. So I had to re-write it in more efficient languages so it didn't use up too much CPU time on the mainframe. It was originally called George.

There was an Algol version, and finally an 1100-assembly-language version, which I took with me on a beta-support trip to Norway. To my surprise, it was able to converse easily and quickly with the Norwegians, making me feel inferior to my computer program!

Later, with the advent of home computers, I wrote a version of it in 6809e assembler, and later in C.

I eventually used it as a means of learning C++, C#, Javascript, and Java.

Specifics of This Version

The version here is written as a Java Swing application, running with only 'sand-box' privileges on this particular website, using Java Web Start. This allows you to try out the application without installing it.

Where it is written in Java, it should work on any operating system supporting Java (1.6 or later), including Windows, Mac OS X, and Linux. Java Web-Start must be enabled for it to run (or install) from the web-site.

It runs with only minimal (sandbox) privileges. Because of this, a lot of functionality is disabled (the buttons are grayed-out).

If you obtain the installable version (from a signed JAR-file with a trusted signing certificate), it runs with all-permissions, and can use your computer's file-system for saving & loading files, and all of the functionality is available.