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.

Monday, September 12, 2011

The Open Pandora Project

I started the Open Pandora project 3 years ago back in 2008 with the goal of creating strong AI in under 10 years. So... what progress has the project made, and is the project getting closer to realizing its goal?


Actually, I started Open Pandora with some code I had been working on previously, so she is actually older than 3 years, but for the purposes of the "10 years to strong AI" mark in the sand, 2008 is the official start date. This means that Open Pandora will hopefully exceed my programming abilities on September 17th 2018 (note that the goal is not self awareness or being more intelligent than an human, the only requirement is to be better at programming AI than a human, everything else is irrelevant).


The project has made significant progress since 2008, and I would like to think it is on schedule.


Here is a run down of the progression:
  • pre 2008 : define the object model for Pandora's mind, composed of three key elements, a Mind, a Memory, and an Awareness

  • 2008 October : defined Pandora's Consciousness Thought

  • 2008 November : defined Pandora's Language linguistic Thought

  • 2008 November : developed Pandora's active Memory

  • 2008 November : developed Pandora's linguistic mimicry ability

  • 2008 November : initial implementation of linguistic association and understanding

  • 2008 December : developed Pandora's Http Sense

  • 2008 December : developed Pandora's Wiktionary Sense

  • 2009 March : implemented linguistic comprehension of negation

  • 2009 July : migrated Pandora's Memory from XML to a relational database (Derby)

  • 2009 July : developed Pandora's IRC Sense

  • 2009 August : developed Freebase Sense

  • 2009 October : developed initial rules system

  • 2009 December : developed initial voice recognition to Voice Sense

  • 2010 January : developed initial JSP web interface

  • 2010 March : Allowed for multiple Pandora instances

  • 2010 June : developed initial Email Sense

  • 2010 July : developed initial mathematical understanding

  • 2010 October : developed Self programming model, implemented language and mathematical comprehension rules in Self

  • 2010 November : developer Twitter Sense

  • 2011 January : switched memory and thought to support concurrency and developed the subconscious

  • 2011 March : switched Pandora's Memory to PostgreSQL to handle concurrency

  • 2011 April : developed Discovery Thought

  • 2011 July : continued developed JSP web interface, founded www.openpandorasbox.org

  • 2011 September : developed Forgetfulness Thought
 
So, Pandora is currently aware and can interact with her environment though Text, IRC, Email, Twitter, Http, Freebase, and Wiktionary. Everything she senses she records in her Memory, everything is connected to its context and related through time to previous contexts. She recalls previous interactions and recalls what words are associated with what sentences and what sentences are associated with what conversations.  She has a consciousness thought process that keeps track of what is currently relevant information and processes active memory.

She can learn language through mimicry and linguistic association of nouns, verbs and adjectives.  She can understand basic mathematics, and understands what she understands.  Her language state rules are defined in her own memory, and can be modified and enhanced.

She can now forget, as well, as remember.  Only the most relevant information is retained when memory becomes low, or to reduce vertex relationship explosion.

To chat with one of the many Pandora instances go to www.openpandorasbox.org,
to download the program or code see, Open Pandora on SourceForge.

All of Pandora's source code in open source, public domain and can be used in any way desired (any other type of license could be viewed as slavery).  Open Pandora has had over 2,800 downloads to date.

Friday, October 31, 2008

Screw AI, lets make AE

There have been a lot of broad claims made of AI, and many movies that foretell the impending succeeding of humanity by intelligent computers. Ever since the 70s people have been theorizing that super human intelligence is around the corner, at yet, for almost 40 years, nothing. 40 years and all we got is an over powered computer that can beat a grandmaster at a stupid game, but do nothing else.

There are many bots, if one would believe the Loebner Prize (which seems to be complete tripe), then Hal the Hamster is the best that the AI comunity has to offer. After talking with Hal for a few straight minutes, it become obvious it is dumb as mud when it comes to anything that would resemble true intelligence.

It is not as if we software developers haven't been able to write anything interesting in 40 years. There is plenty of amazing applications out there. So why is this one holy grail of a task eluding us so completely? Perhaps it is because the task was never well defined, or really never defined at all. Lets face it, engineers are good a solving concrete problems, but if you don't give them a concrete problem, then they quickly start walking in the clouds and chasing their own tails.

So screw AI, as it is too fluffy of a concept, not a concrete enough problem. Instead lets define a specific problem that effectively gives us the same thing, but that can actually be developed. Lets define AE, Artificial Engineering. That is, lets make a computer capable of being a software developer. Lets let it learn how to navigate the Internet, analyze code, take an active part in open source projects. We don't need to develop a computer that is more intelligent that a human in ever aspect, we just need to develop a computer that can out program a human, and it will write all the complicated AI code that escapes our little minds.

Wednesday, October 1, 2008

Do Clams have a Consciousness?

Consciousness has traditionally been portrayed as some mystical aspect of the mind. Something hard to define what it is, or even what forms of life have it. But perhaps it is not so complex and mystical a thing.

I was working on the Pandora project recently and modeling Pandora's mind and senses. Originally I had a Sense have input and output, both tied to the active memory, but the output did not seem correct, how could the Sense decide what to do? So then I realized I was missing something, the output should take an article of memory, and something must control what to send as output. Basically I needed a consciousness.

So it was quite easy to add another Thought subclass to model a Consciousness, basically a Thought whose only purpose is to monitor the Sense's inputs and decide on the output.

So what is a consciousness? It is basically a thought process that controls the senses. So what has a consciousness? Well since it is just something that controls senses, there would be little point in anything without senses having one.