How does the program feel?

    Foreword


    I present to you the next part of the opus about the thinking program. This is not an independent article, but a logical continuation of the first part , so I urge you to follow the link for all the "new ones". In the meantime, we are waiting for them, you can make yourself coffee (tea, make fruit drinks, maybe something stronger) and get ready for active mental activity - there is a lot of information. Today, the senses will be in the spotlight.

    I will continue the thought voiced at the end of the last article. To achieve our goal, we need to highlight all sorts of human features and look at which ones can be relatively painlessly abandoned and which are so strongly connected with others that they will have to be implemented. The latter include, for example, sleep. It plays an important role in a person’s life, but it’s interesting for us first of all that in a dream a person restores emotional-motivational balance and psychological defense. So no sleep - no way. Another example that I recently thought about is the ability to retell texts, which arises from our recognition mechanisms and memory devices.

    In general, in highlighting such features there is also more practical meaning - in the future they will help calibrate the system by comparing the results of the program and the person. Then it will be clear what parameters you can tweak so that the program copes with the task more efficiently than a person, but at the same time retains its behavior. It may well turn out that the learning speed will have some limitations besides the power of the computer.

    Such an analysis and finding relationships between features is almost the only way to design such a complex program. After all, there is no way to present the entire model. There is no such science. There is neurophysiology, there is psychology, and there are sciences created at their intersection. There are many "types" of sciences that, despite the general absurdity and deliberate inaccuracy, sometimes contain very useful ideas (mnemonics, NLP). But the most interesting is that they all either contradict each other, or do not have intersection points at all, and the models described inside each are far from complete and complete. It was only earlier that I thought that I would take a thick reference book on human physiology and find there answers to all questions.

    As a result, you have to act almost intuitively. In the first article, a peculiar level of abstraction was set, on which the whole system will be built. Obviously, this level is higher than that of the human central nervous system, but this is not a reason to consider this model as knowingly inoperative. Initially, almost a year ago, I singled out functions at an even higher level of abstraction, which, unfortunately, cannot be formalized and now I have to select the foundation. And here errors are inevitable for the same reason - it is impossible to imagine the whole model. So do not be surprised if the initial concept of nodes will undergo changes - it adapts to the new functionality.

    Sensory organs


    Before considering how a person remembers, remembers, recognizes speech and finds a solution to problems, you need to know how the information is distributed across the nodes. And for this you need to trace its path from an external source to memory. So, let's talk about the senses.

    In humans, they are implemented on special groups of neurons associated with cells that are sensitive to particular stimuli. But we have a slightly different organization. A person from birth already has brain zones for all occasions. And here, some are created in the process of working in RAM.

    Dealing with this problem is not difficult. The sensory organs will be the same nodes or groups of nodes, only they will be located outside the memory, and their content will be a function of the corresponding stimulus. Each time this content changes, a logical unit reflection is created in the RAM. It is she who launches all thought processes, but more on that later.

    So far, the solution is not entirely successful - sooner or later, the RAM will gobble up the entire swap and still require additional. And a person cannot keep everything in mind. After all, it was estimated that on average we can keep in mind seven (plus or minus 2) new images. But not many people know or simply have not thought about the fact that this applies only to one sense organ. That is, a person can keep twice as many digits in his head if he half remembers visually and half by ear.

    We use this observation to complement our model. So, for each sense organ in RAM, a certain amount should be allocated - the number of nodes for reflections. When this limit is exceeded, rotation occurs - the new node replaces the oldest of the group of this organ. If the old node did not manage to contact its brothers from the permanent or random access memory before, then it is permanently deleted.

    Everything seems to be cool - the RAM is no longer growing in arithmetic progression, but has a fixed size. But what to do when new nodes cease to arrive? Continue to process the old ones? This is equivalent to if you were about to go to bed and, turning off the TV and closing your eyes, would continue to hear the last chords and see the performers standing still on the screen. Something is wrong here! Something we missed ...

    And we missed such a thing as short-term memory. Although it is called so, it is not a memory in the usual sense of the word. That is, in itself, it does not initiate any binding, and if no one else initiated it, the contents of short-term memory will be lost forever and no hypnosis will help. The only thing she does is artificially prolongs the life of sensations, the sources of which - stimuli - have already ceased to act. And all this so that we can "realize" these feelings and, if necessary, manage to process it.

    To understand this, imagine this situation - night, a dark room, the flash of the camera fires. It lasts a split second, but you have a few seconds to “make out” the room. Or another situation - morning, a dark room, the alarm clock squeals disgustingly. You automatically feel for the button, the screech stops, but you can hear its echoes for a while. In humans, this is realized due to the inertia of sensitive cells. And in our system, this behavior can be modeled by setting a timer - the lifetime - for each reflection node.

    If information about the stimulus is updated quickly and the time has come to rewrite the old node, but its life has not yet expired, then it will be rewritten anyway. If the information is updated slowly or ceases to arrive at all, then after the timers are activated, the nodes free up RAM (they are sent to read-only memory or to / dev / null).

    Well, now we have traced the path of information from the senses to memory.

    Motivation and emotions


    Let’s figure out what happens in humans during the work of the senses at a low level - at the level of neurons. A real neuron has quite a few parameters that can vary depending on various factors, but at the moment we are only interested in one thing - membrane polarization. In a normal unexcited state, its value is about 70 millivolts.

    When the stimulus begins to act on the cell, the potential difference gradually increases by 25 percent, and then starts to jump to zero and vice versa, thereby generating impulses. This is a normal working condition. Further, the amplitude of the oscillations begins to gradually decrease to zero, the oscillations cease, while the potential difference on the membrane surfaces is already half the norm. This is due to depletion of cell resources. If the stimulus still continues to act, and it has not been possible to adapt, then the tension further begins to simply monotonously fall. When it reaches zero, the cell will die.

    What are these numbers talking about? Membrane polarization is a reflection of the processes occurring in the cell, which mobilizes its reserves in order to increase resistance to irritants and adapt to them. Each stimulus new to the cell is initially unfavorable, which causes the cell to try to adapt to it. If in the end it adapts to the stimulus, then it is considered positive, since it increases the biological stability of the cell, and the body should strive for such irritants. If it was not possible to adapt, and the cell depleted its reserves, resulting in low polarization, then such an irritant is negative and the body should avoid it, since it reduces biological stability.

    Probably, it should already be a little clear where the legs of emotions and motivation grow from. At a low level, they act on the principle of approximation-estrangement - the desire to maintain a positive stimulus and get rid of the negative. But in order to transfer all this to our model, information is still not enough.

    Let us pay attention to what moment: in a normal working state, the polarization first increases monotonically, and then the oscillations begin - what does this mean? And this means that at first the cell itself tries to process the stimulus, and then signals its neighbors to help it in this. Well, then there is no longer enough energy for vibrations. The so-called period of fatigue comes when the cell is already powerless to do anything and is on the verge of death.

    Now, you can already begin to transfer all this economy to our favorite sites. The first thing that catches your eye is the state of the cell, which is naturally realized in the form of a property of the “node” object. You can try to present its contents as an enumeration (state). So far I do not know if this will be enough. Otherwise, you have to decide on the forehead - use floating point numbers. This solution is undoubtedly closer to the original, but the processor time will be the price, which in our case is extremely undesirable.

    Now the question arises - what does "the cell itself is trying to process the stimulus"? A cell is a node in our case. It tries itself - other nodes are not involved yet. To process the irritant - and here it is not so simple. In the general case, this means that in the end some kind of reaction, action should follow.

    In humans, this feature is realized with the help of reflexes, which, as you know, are divided into conditional (acquired) and unconditioned (innate). Both of them work in a similar way - excitation in one area of ​​the brain through previously formed connections extends to another area. This other area can be directly responsible for the commission of any external action (close your eyes, grab the object). And it can transmit excitement through its connections to the third area. Thus, reflexes can be of the first, second or more orders.

    But we, as already mentioned, have a different organization and distribution of functions. Let's try to transfer the behavior described above to it. So, the first area with which excitation begins will be our reflection node, which has come from the senses. Since he is not connected with anything yet, he will have to find in his memory the closest analogue in content, a kind of “call to a friend”. I must say right away that a person doesn’t have such an operation, since he doesn’t have any copying when transmitting information from the senses (creating a reflection).

    The found analogue is copied to RAM for subsequent work with it. Thus, something is cleared up about the structure of this memory. In addition to the areas reserved for storing reflections, it has a separate area for memories. I suspect that it also has a division into the corresponding sensory organs with the corresponding volumes measured in nodes (volumes may differ from those in the field of reflections). In the field of memories, the treatment of the stimulus itself begins - the search for a reaction with the aim of prolonging it, or vice versa, is to stop. I will write more about this in one of the following articles.

    But, if the corresponding reaction is not found, or if the analogue of the stimulus itself is not found, the second phase of the node’s operation begins - connecting to the search for its neighbors, a kind of “hall help”.

    To understand who these neighbors are, consider a simple example of the sensory organ - the command line. It will consist of several nodes, each of which can store one character entered. Since the incoming information may contain several lines, our body will not be able to perceive the entire text. Consequently, the contents of our sensory organ (an array of nodes) will change as film frames change.

    Then, if the first phase of the processing of the stimulus is reduced to searching for a symbol, then during the second phase a search is performed on a fragment of the line. Then everything happens, as in the first phase - the found group of nodes is copied to the memory area and manipulations are already made there.

    The third phase is a period of fatigue. It comes when the two previous ones failed. Nothing special happens in it, all search processes are simply inhibited. The sensory organ ceases to respond to this stimulus. Real neurons also have a fourth phase - death. But it seems to me that you can do without it.

    Summarize. In the field of reflections, the following processes take place - rotation, timer removal, search for analogues, followed by creating copies in the memory area. But there are still two points that have not yet been clarified - these are, in fact, motivations and emotions, in honor of which this section is named.

    In fact, at a low level, there is a direct connection between motivation and emotions. I wrote a little higher that in addition to the main contents of the node (in the example with the command line it is a symbol), it also has a property that in real time reflects the state in which the node is (peace, agitation, fatigue).

    So, after processing in the field of memories, when the node is sent for storage, this same state is recorded in it. If this is a state of excitement, then this means that an adequate reaction has been found for this stimulus. Accordingly, this stimulus becomes positive, and in the future will cause a positive emotion. If the node is in a state of fatigue, then this means that the reaction was not found and the stimulus becomes negative, causing a negative emotion.

    Finally, consider an example that illustrates this behavior. Imagine that you solve a difficult math problem at home. If you manage to solve it, then you will remember it with positive emotions, and when you are offered to solve something similar in the class, then you will be happy to do it and offer to help your neighbor. But, if it was not possible to solve the problem at home, then it will be remembered with negative emotions, as it caused you only fatigue, and the result was never found. Then, when the same task is slipped into your class, then your hands will simply drop.

    Afterword


    In this article, I clearly demonstrated the method that I wrote about at the very beginning - the allocation of features and their formalization. As you can see, at the moment our model is at odds with the central nervous system. But what is more important for you - identity at a low level or identity in behavior? And this and that is impossible in this case, since the central nervous system works on living cells, and we only have a computer and programming languages ​​at our disposal. So at a low level, we will inevitably have discrepancies due to the characteristics of our platform. But this does not mean at all that in this way we will not be able to implement high-level behavior. In addition, we have a bonus - we can twist a lot of parameters as you like, thereby affecting the performance of the program as a whole.

    And finally, I have a question for those who are interested in this article. Here we examined the general behavior of the senses, as well as an example of one of them - the command line. And what other “sensory organs” can be implemented on such a platform?

    Also popular now: