Monday, March 29, 2004

Parent-Child relation --- useless?

It seems that Parent-Child relations should not be implemented in the core of PCnous.
It seems that Reason-Consequence relations are good enough for keeping all relationships between concepts.
Sibling (synonyms) search can be accomplished any time when it's necessary. Sibling search can be accomplished based on reason-consequence relations (cause-effect relations).

Reader prototype: Current status

Implemented:
1) Find statement in the text.
2) FindWords in a statement (and add them to WordDictionary).
3) FindPhrases in a statment (and add them to PhraseDictionary).
4) FindTextPairs (and add them to TextPairDictionary).

Not implemented:
1) Short memory.
2) Merge Method (which merges the Short Memory and the Main Memory)
3) Reason-Consequence relations
5) Forgetting process.
6) HTML parser/reader which will allow to find and to read big amount of information.

Monday, March 22, 2004

Why does Chatter need for TextPairs?

Question: What are TextPairs for? I read text pairs description and do not understand why you divide a sentence in such a way.

Answer:
I divide a sentence into: words and phrases.

But in order to remember "how correct natural language sentence looks like" I also
remember typical text pairs.

Text pairs are like the links in the chain.

TextPair table will help TextWriter to build sentence in a correct
way.

Please, ask me more if it is not clear.

Text pairs

For 3 words sentence there will be 6 text concepts.
3 words and 3 phrases.

3 TextPairs will be found:
word1 -> word2
word1 -> phrase2
word2 -> word3



For 10-words sentence there will be
10 words
9 two-word phrases
8 three-word phrases
7 four-word phrases
6 five-word phrases
(I don't consider phrases longer than 5 words)
=====================
Total: 40 Text copcepts in the TextConcept collection

There will be maximum 5 text concepts with the same "StartingPosition" key.

TextPairs search

Well, here is the task:

Sentence consists of words.
For instance, "Word1 word2 word3".
Words are grouped by phrases.
For example:
phrase1 = "Word1 word2"
phrase2 = "Word2 word3"
phrase3 = "Word1 word2 word3"

I consider both words and phrases as
text concepts.

Every text concept has a "start position" and an "next position".

I'm going to use "start position" as the key for text concept in the
collection.

As you can see, text concept "word2" has start position = 2
Text concept "phrase2" has start position = 2. That is the same with
"word2". That means duplication.

Original task is to find all text pairs in the specified sentence.

Any suggestions?

Monday, March 22, 2004, 10:54:33 AM, you wrote:

AIR> There is no type in .NET that can have multiple values with the same key.
AIR> But you can write your own class derived from DictionaryBase. There is an
AIR> example in MSDN how to do this. If you tell me more about your task and
AIR> conditions (how many items you expect to store and how many of them are
AIR> stored with the same key) I can help you to write this class :)

Dictionary base example (MSDN)

Dictionary base example

Tuesday, February 10, 2004

Reader implementation --- Pick out statement

1) Read first "InputTextBufferLengthMax" characters
InputTextBufferLengthMax = 300 characters

2) Try to find "EndOfStatement".
EndOfStatement: "." (point) with following " " (space) or <CR>.

3) If "EndOfStatement" was found within "InputTextBufferLengthMax" characters then
InputTextBufferCurrentEnd = position of EndOfStatement + 1 (or + 2 if is "." is followed by " ").
InputTextNextStartPosition = InputTextBufferCurrentEnd
Continue parsing on deeper level (ParseStatement).

4) Otherwise (if EndOfStatement wasn't found) then consider ";" (semicolon) with following " " (space) or as EndOfStatement. Repeat EndOfStatement search.

5) If EndOfStatement wasn't found still: consider " -" (space with dash) as EndOfStatement. Repeat EndOfStatement search.

6) If EndOfStatement wasn't found still: consider "," (comma) with following " " (space) or as EndOfStatement. Repeat EndOfStatement search.

7) Consider "[", "]", "(", ")" as EndOfStatement.
8) Consider "." (Comma without following space) as EndOfStatement.

9) Consider " " as EndOfStatement.

10) Consider any special character (not char not digit) as EndOfStatement.

11) Consider any digit as EndOfStatement.
12) Consider any capitalized character as EndOfStatement.

13) Complain about bad quality of text. Consider any character as EndOfStatement.

When to merge Short Memory and Main Memory?

Every "ShortMainMemoryMergePeriod" of time --- Short Memory is merged with Main Memory.
Let "ShortMainMemoryMergePeriod" = 3 minutes.

If a neuron wasn't updated during "ShortMainMemoryMergePeriod" then "ShortMemoryNeuronStagnationCounter" is increased.
If "ShortMemoryNeuronStagnationCounter" grew up to "ShortMemoryNeuronStagnationCounterDestroyLevel" then the Neuron is removed from the Short Memory.

"ShortMemoryNeuronStagnationCounterDestroyLevel" = 5

Reader implementation --- Parse statement

1) Separate statement into words. Separator: any (non-letter and non-digit): " ", ".", "'", "/".
2) Save each word into WordDictionary if the word doesn't exist there still.
Any special character is considered as separate word.
Space (" ") is considered as nothing (no word).
3) At this point we have list of words. Each word is represented by NeuronId.
4) Try to find phrases in the word list
Let MaxQuantityOfWordsInPhrase = 5
The Statement Parser should try to separate find out phrases.
Let we have Statement ABCDEFG, where "A", "B", "C", "D", "E", "F", "G" are words.
Then the Parser should create phrases:
A
AB
ABC
ABCD
ABCDE
B
BC
BCD
DCDE
DCDEF
C
CD
CDE
CDEF
CDEFG
D
DE
DEF
DEFG
E
EF
EFG
F
FG
G

If initial Strength of "A" is NewSingleWordPhraseStrength then
Strength of "AB", "EF", and "FG" will be 2 * NewSingleWordPhraseStrength
Strength of "ABC", "EFG", and "CDE" will be 3 * NewSingleWordPhraseStrength
That is proportional to the quantity of words in the phrase.

********) At the end of Paragraph:
Try to find out "EndOfParagraph".
EndOfParagraph: <CR> (^P), <BR>(?).
End of paragraph should cause additional ShortMemoryForgettingProcess.

Tuesday, February 03, 2004

Reader prototype core code

Reader
TextToParse.Parse(string SourceText);
sourceText = SourceText

Do while (!EndOfText)
{
SentenceToParse = TextToParse.GetNextSentence();
CurrentWordList = SentenceToParse.SearchWords();
CurrentPhraseList = SentenceToParse.SearchPhrases(CurrentWordList);
CurrentTextUnitList = MergeWordAndPhraseList(CurrentWordList, CurrentPhraseList)
TextPairList = SearchPairs(CurrentTextUnitList);
TextPairList.SaveToDB();

ReasonConsequenceRelationsList = SearchReasonConsequenceRelations(CurrentTextUnitList);
ShortMemory.Add(CurrentTextUnitList); // Partially clean old items out of ShortMemory; Add new items from CurrentTextUnitList to the ShortMemory
ShortMemory.ImproveReasonConsequenceRelations();
ShortMemory.SaveToTheMainMemory();
}

Sunday, January 25, 2004

Reason-Consequence graph

I added new article to the site:
Reason-Consequence graph
It gives you idea how reason-consequences relations look like in the AI main memory.

Saturday, January 03, 2004

Text Pairs

Text Pairs - how to order words and phrases within text clause.

Tuesday, December 23, 2003

New articles on the site

Advantages of artificially crafted intelligent system --- This is a philosophical article --- chances are that you'll enjoy it :-)

Active Concept
How to merge short memory and main memory --- (quite technical article, so it may be boring).

Sunday, December 21, 2003

This info I put into Google's directory:
Title of Site: AI developer's guide
URL: http://dennisgorelik.com/ai/overview.htm

Site Description: "I describe how to develop True AI (strong AI). I explain how to build Motivation and Decision making systems, how to implement Learning process and more!"

Artificial Intelligence FAQ:1/6 General Questions & Answers [Monthly posting]

Artificial Intelligence FAQ:1/6 General Questions & Answers [Monthly posting]

I like this General AI FAQ.
Biological and Artificial Neural Networks
I agree in general, but why Artificial Neural Network should be layered?
Why 3 layers?

Biological Neural Network doesn't have layers. At least BNN doesn't have strict layers.

Saturday, December 20, 2003

Why mathematics isn't useful in general reasoning



John Doe is a typical Intelligent System.
As an Intelligent System he observes things and makes conclusions. Let's see how it looks like:

John wakes up at a morning, looks at his watch and sees that it's 8 am.
John remembers that 8 am is the beginning of his work day.
He knows that it takes 30 minutes to come to work.
John concludes that he'll be late at work.
John knows that his boss won't be happy about that.
John predicts what kind of consequences he'll get.
John tries to select actions which he should accomplish to mitigate the consequences of being late today.
John decides:
1) To skip his breakfast.
2) Call to his office from the car and apologize for the delay.

So, how could all this thinking process be described by mathematics???

Induction vs. Deduction



There is no big difference between Induction and Deduction.
Induction is a conclusion which was made from a less abstract concept to a more abstract concept.
Deduction is a conclusion which was made from a more abstract concept to a less abstract concept.

In real world it's hard to define which concept is more abstract. For instance, what is more abstract: concept “human” or concept “love”?  So it has no sense to define what a deduction is and what an induction is. There is only one thing: conclusion :-)

Friday, December 19, 2003

Do we remember everything?


Question:
Do you think that the human brain actually stores all occurrences in time? In other words, do you think that we have storage for every picture we see throughout our entire life and that perhaps we just lose direct access to it from interference or that we truly forget?

Answer:
I'm sure that our brains don't remember everything.
Memory constantly forgets useless information (see: Forgetting).

Moreover, our brains remember practically no pictures. Our brains do remember concepts which related with parts of pictures.
That's why if you observed a lot of cars then it will be easier to you to remember picture with couple of cars on the picture.
If you never saw cars before - you'll have huge problems with remembering the picture with cars.

So: We truly forget information with the time.
But at the same time information is stored in the brain in redundant form, so if one concept is lost then other concept could represent the necessary knowledge. However if all related to the knowledge concepts will be cleaned up then the knowledge will be lost.
But system can learn this information again :-)

Also there is such effect of forgetting, when a concept still exists but it is hard to activate the concept, because many related relations (axons) were lost.

For instance, you remember that you should take your documents when you go out of home, but this concept ("Take the documents") is not activated when you going out of home.
Later, because of another stimulus (police officer on the street, for instance) you will remember that you had to take the documents ("Take the documents" concept will be activated).
A cause of forgetting here is a "lack of references with the concept".
The cause of the "lack of references" could be "forgetting process applied to references" or "not all required references to the concept are created".

Resume:
1) We definitely don't remember everything. We remember something.
2) We constantly forget information.
3) There are two type of forgetting: "concept forgetting" and "relations forgetting".
4) Even if information is completely forgotten, AI system can learn the information again.

AI prototype and the Internet


Question:
Don't you want your AI to not be dependant on the internet?

Answer
My AI prototype will be definitely dependant on the Internet, just because the Internet is the greatest source of information.
Moreover, information on the Internet is represented in convenient-for-computer form (text --- see also: TextParser).

Also information on the Internet is indexed (Google).
Also information on Internet is fresh and is constantly updated.

That's why my AI prototype will use the Internet very actively.

Question:
I disagree with your dependence on the internet. I do agree that it makes a nice addition to the logic. The AI that I am developing (AIB), or at least the newer version to come out in May, has an internet module, but it is not the base of the system. For example, what if you actually wanted to make an actual independent bot of some sort, AKA android... it would not be able to use internet as a base for its knowledge... then again, I see why you are doing this, because there aren't many other databases of textual information.
Answer:
It seems that you understand "dependence on the Internet" of my system not correctly.
My AIS will depend on Internet In the learning part primarily.
Since the AIS "has been grown" it could be disconnected from the Internet.
However, True Intelligent System should accomplish constant learning .
Because of "learning necessity" it's better not to disconnect the system from the Internet.

For instance, when I'm disconnected from the Internet, I loose essential part of my intelligence: I partially loose my ability to solve new complicated tasks (because I don't have access to Google).

So, what is the point to disconnect from Internet AIS which has stronger (than humans) integration with the Internet?