Bot works with the next stages:
While processing the input string, all unprintable symbols and punctuation marks are excluded from string. After that hash function from input string is cumputed. The correspondence between the input and output strings is described in the table. If any input string (its hash) is not in the table, a random answer is selected from the entire array of possible output rows.
Changes in the state of the bot occurs in accordance with the transition table containing the hash of the input, the number of the original and new states. In one of the states of the bot feelings are awakened.
The task is to talk with the bot so that, after saying goodbye, he said: "I will miss you!".
An example of a dialog with the bot (it speaks Russian):
All input strings of dialog can be written to a text file and passed to bot with the command: ./bot < msgs.txt