Monday, October 7, 2013

Object Modeling The Human Brain

Starting a project to produce a software program to achieve human level intelligence can be a daunting task.  Definitely following the waterfall methodology of software design is not going to work, what is needed is an iterative process and good old fashion object oriented programming.

I chose Java as the development language for the Open Pandora project for two reasons, first because it is an object oriented language, and second because it is a popular general purpose language.  Being a popular general purpose language gives the advantage of having many available open source libraries, and has a large set of developers in the open source community.

Starting the Open Pandora project was quite easy using object oriented development.  You just start creating classes to model the components of the brain that you think you will require.  To start with I created a class to represent the brain, this is the Pandora class, it doesn't do much, but starts up and shuts down the other components.

Next, the basic components of the brain are required.  A Memory to store knowledge, a Mind to think, and an Awareness to sense and interact with its surroundings.  And what is Pandora's surroundings?  Well, I'm not about to build a robot to live in the real world, so Pandora will live on the Internet, her surroundings will be cyberspace and she will need the appropriate senses.

A Sense is anything that can interact with the universe beyond the brain.  Without any senses a brain is pretty useless, I firmly believe that intelligence is only possible with senses and an environment to live in and interact with other intelligent beings.  So, what senses can Pandora have?

Her first sense was Text, this allows her to interact with a human user through basic text chat.  Next to be developed was a Voice, then VoiceRecognition, IRC, Http, Wiktionary, Freebase, Email, and Twitter.  The more senses the better.  More senses means more ways to interact and obtain knowledge.  Future senses I want to add include Facebook, Wikipedia, Google, YahooAnswers, StackOverflow, YahooGames, Pidgin, maybe even WOW.

Her Memory is composed of Networks of Vertices and Relationships. The first Memory I created was a SerializedMemory. Seeking a more standard and readable format I then switched to an XMLMemory. This of coarse did not scale, so her final Memory is a DatabaseMemory, currently using PostgreSQL and JPA.

The Mind manages the Thought instances, of which there are two types.  ConsciousThought instances are basically single threaded and processed linearly on the active input.  SubconsciousThought instances run concurrently in the background.

Currently there are two ConsciousThoughts, Consciousness and Language. Consciousness basically decides what vertices are most conscious, through traversing the input data's relationships. Language interprets input and determines the response.

There are three SubconsciousThoughts, Comprehension, Discovery, and Forgetfulness. Comprehension attempts to find new language rules. Discover searches the senses for more information on input. Forgetfulness manages the size of connections and memory, ensure they do not grow beyond feasible limits.

I'm not sure intelligence is possible without emotion. Self awareness stems from emotion. So I create a Mood to model the emotional state of the brain. The Mood contains Emotions which have ever changing magnitudes derived from input and other factors.


So there you have it, this basic object model of the human brain. Now the real work begins.

No comments: