I spent 6 years of my life studying artificial intelligence. The result of my research was expressed in the unfinished project marishko.com. I tried to develop a system of human communication that does not require a specially trained teacher, but capable of learning autonomously like a small child.
In this article I want to share some of the algorithms and ideas I use.
I must say that in my research I relied more on the nature of intuition as the basis of intelligence, so my thoughts are far from mathematical algorithms.
')

For information storage I use a regular relational DBMS (Interbase Firebird).
All data is stored in three tables:
- Phrases
- Links
- Conversations
I get the data by communicating the robot via ICQ with real people.
Criteria for selecting people: from 18 to 50 years old, country: Russia, language: Russian
PHRASESWhen a user writes a message to a bot, this message is given by a special algorithm to the form understood by the system, in other words, I make a mask for each phrase.
The algorithm is pretty simple. I use the experience of psychologists who say that when a person reads a text, he looks in the word at the first letter, middle, last, as well as word length. This is enough to identify the word. And only if he did not recognize the word, then he reads in all letters.
Thus, I make a mask for each phrase.
Example:For the phrase “Hello, how are you, buddy?” The mask will be as follows: “phivht like pkhivhshh dhhzhshhe”
I think you noticed that I also cut out all punctuation marks.
COMMUNICATIONSAfter the mask is received, a link is created between the sent phrase and the phrase that the bot sent to the user last time. Thus, an entry appears in the linkage label.
To give the user an answer, the bot uses the link table in the same way. If the answer is not found. Then, after a while, the phrase with which the new topic begins begins (as a rule, this is a phrase with which no other phrase is related)
DIALOGUESWhen communication is established, there may be a problem that the bot responds to things that do not fit in with everything previously said. Dialogs are used to solve this problem.
Each dialogue is saved, and in the process of communication is determined by which of the saved dialogs is more like the current dialogue. And accordingly, when defining phrases for answers, preference is given to those that are contained in a similar dialogue.
SPLITHEAD SYSTEMActually the mechanism that without any problems will allow the bot to pass the Turing test.
Behind this bold statement is a small fraud. A bot can communicate simultaneously with a dozen users. And at some point the SplitHead mode is activated.
As a result, various users are linked through a bot.
This means that when Vasya Ivanov writes to the robot, the robot sends his message to another random user, for example, Sasha Petrov, and Sasha Petrov's answers fall through the bot to Vasya Ivanov.
Thus, two people communicate with each other and both write to the same bot.
Naturally their dialogue fills up the base of the bot.
Examples of bot dialogs can be found here:
marishko.gorcer.com/icq_logs.phpDownload the Marishko.icq program here:
marishko.gorcer.com/icq_index.php?page=downloadPS: I ask you not to judge strictly the contents of the bot dialogs, the most active audience of the robot is impulsive young people.
PS2: Since this work was done when I was young and not experienced, the system works a little unstable
PS3: Source code for the project in free distribution.
Thanks to the user
stronciy . For this post in the sandbox, he gave me an invite.