Natural Language Environment

October 1, 2014

What is Brainhat?

Brainhat is a computing environment that is programmed in natural language—particularly English. Program statements are propositions (facts) and inference templates (executables). Taken together, they motivate goal-oriented conversations or actions.

Brainhat can interact with you and with other Brainhats. It can manage outside processes, learn and remember. Over the years, we've interfaced with robotics, VoiceXML, HTML, IM, email and speech recognition for dictation and telephony. Multiple interfaces can be active simultaneously.

The project is in the midst of a long development cycle, with some nice capabilities on the way. In the meantime, I'm keeping the site alive and providing code updates every once in a while.

Here's a short illustration of Brainhat at work. The vocabulary and English grammar are known to the program in advance. You can see user inputs (>>), followed by Brainhat responses. The first few statements are inference templates. Then we exercise a chain of inferences by providing a proposition: "luigi is near the princess." At the end of the code sample, Brainhat answers "why?" to reveal the nature of its conclusions.

 

>> if thing1 is near thing2 then thing2 is near thing1
    
if thing1 is near thing2 then thing2 is near thing1.
>> if a man sees the princess then he is happy
    
if a man sees the princess then he is glad.
>> if a man is near the princess then a man can see the princess
    
if a man is near the princess then he sees the princess
>> luigi is near the princess
    
luigi is near the princess. luigi sees the princess. he is glad.
>> why?
    
he is glad because luigi sees the princess.
>> why?
    
luigi sees the princess because luigi is near the princess.

 
Internally, the captured knowledge is organized as trees, similar to sentence diagrams. These can be manipulated, stored, recalled and generalized as processing proceeds. Interestingly, once the tree is created, the words are no longer needed; the structure stands for captured knowledge in the absense of language.

There is quite a bit more to Brainhat; we've been working on it for many years. At some point, the documentation will catch up. Look around the site. Experiment if you wish. Write!

Kevin Dowd, dowd@atlantic.com