Robot algorithm Marishko

    6 years of my life I spent on the study of 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 is able to learn autonomously as a small child.

    In this article I want to share some of the algorithms and ideas that I use.

    I must say right away 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.

    image



    To store information, I use a regular relational DBMS (Interbase Firebird).
    I store all data in three tables:
    - Phrases
    - Links
    - Dialogs

    I receive data by communicating the robot via ICQ with real people.
    Criteria for selecting people: from 18 to 50 years old, country: Russia, language: Russian

    PHRASES
    When a user writes a message to a bot, this message is reduced by a special algorithm to a 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 a word at the first letter, middle, last, and also the length of the word. This is enough to identify the word. And only if he did not recognize the word, he reads in all letters.

    Thus, I create a mask for each phrase.
    Example:
    For the phrase "Hello, how are you, buddy?" the mask will be as follows: “phhivht like phhivhhsh dhhzhschhe”

    I think you noticed that I also cut out all punctuation marks.

    COMMUNICATIONS
    After the mask is received, a connection is created between the sent phrase and the phrase that the bot sent to the user last time. Thus, an entry appears in the link plate.

    To give the user an answer, the bot uses the table of links in the same way. If the answer is not found. Then after a while a phrase flies out with which a new topic begins (as a rule it is a phrase with which no other phrase is connected)

    DIALOGUES
    When communication is established, a problem may arise 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 it is determined which of the saved dialogs the current dialogue looks more like. And accordingly, when defining phrases for answers, preference is given to those contained in a similar dialogue.

    SPLITHEAD SYSTEM
    Actually a mechanism that without any problems will allow the bot to pass the Turing test.
    Behind this bold statement is a little fraud. The bot can communicate with up to ten users simultaneously. And at some point, the SplitHead mode is turned on.
    As a result, various users are linked through the bot.
    This means that when Vasya Ivanov writes to the robot, the robot forwards his message to another random user, for example, Sasha Petrov, and the answers of Sasha Petrov go through the bot to Vasya Ivanov.
    Thus, two people communicate with each other and both write to the same bot.
    Naturally, their dialogue replenishes the base of the bot.

    Examples of bot conversations can be found here:
    marishko.gorcer.com/icq_logs.php

    You can download the marishko.icq program here:
    marishko.gorcer.com/icq_index.php?page=download

    PS: Please do not strictly judge the contents of bot conversations, the most active audience Robot impulsive youth.
    PS2: Since this work was done when I was young and not experienced, the system works a little unstable.
    PS3: Sources for the project in free distribution.

    Thanks to stronciy . For this post in the sandbox, he gave me an invite.

    Also popular now: