OPENTadpole — application consisting of a full-fledged editor of the nervous system of a tadpole frog and physical emulation of the body of the tadpole and the external environment. The ability to create, configure and edit the animal’s connection from scratch, and immediately see how your creation is reflected in its behavior.

Hello, I’m developing models of nervous systems, this is my hobby, this is my passion. I individually develop a new approach to the modeling of the nervous system, which consists in striving to simplify the model as much as possible, retaining functionally significant aspects of the modeling object. This approach should significantly reduce the necessary computational resources for the work of the model of the brain with the preservation of cognitive functions.

I have long wanted to demonstrate how my ideas can be applied to animals with a simple nervous system, such as a mollusk, a worm or some insect. I really like the OpenWorm project to create a computer model of the Caenorhabditis elegans worm, whose nervous system consists of 302 neurons, and whose conectom was fully compiled. The project consists of two parts: simulation of neural electrical properties of the worm’s nervous system and modeling of its body’s mechanical properties in the process of swimming. This concept I applied to my project, a reference to this can be seen in the title of the project. The choice of the simulated animal was influenced by the recording of Roman Borisyuk’s speech, in which he told about the project on modeling the nervous system of a two-day tadpole of a frog. Inspired by this video, I decided to make some branch in the work on the simulator of the nervous system, which gave the name OPENTadpole.

The theoretical platform that claims to explain the mechanisms of the functioning of the nervous system should work both on the scale of simple nervous systems and on the scales of nervous systems performing cognitive functions. It is often possible to find comments directed to the authors of the newfangled theories on the work of the brain, that before modeling large-scale neural networks, it may be worthwhile to show how their theories can be applied to the simplest animals and their nervous systems. On these remarks one can hear an evasive answer that the properties of neurosystems appear only on very large, giant scales, and the life of primitive creatures has no significance when it comes to solving cognitive problems. Such injustice and delusion have become for me another reason to concentrate for some time on the life and behavior of the two-day tadpole of the frog.

Cybernetic animals with the nervous system

Of course, Man has already created many cybernetic mechanisms imitating certain aspects of animal behavior, for example, the mechanical ducks Vokansona, who not only waved their wings, pecked the scattered food, but also had a semblance of the digestive system with all the accompanying processes. But artificial animals with a nervous system similar to their biological analogue are rare. Let’s make a brief overview of the world of cybernetic animals, so that it becomes clear to you why I have so much boldness to call my tadpole the first cybernetic animal with an artificial nervous system.

And we will not start with an animal, but start with a legendary person — Henry Markram. Henry Markram, a scientist known to many as a pioneer in the study of synaptic connections, he became one of the first who began to systematically study the successive version of Hebb’s rule. But Henry Markram became a real fame as the creator of the most expensive imitation of the brain in the world. At the disposal of the scientist and his colleagues is not only the largest funding ever allocated for such purposes, but also the most powerful computing resources of the Blue Gene supercomputer from IBM. The name of the computer gave the first name to the project: “Blue Brain Project”, in 2013 it was renamed “The Human Brain Project”. Despite the fact that the title of the project now speaks of the human brain, work is being done on a model of a small fragment of the mouse cortex. The project managers have big plans, starting with a small fragment of the mouse’s brain to reach the full model of the human brain. Back in 2009, the main curator of the project Markram promised that in ten years will appear computer simulation of the entire human brain. Many people think Henry Markrama is a charlatan, really if you listen to his speeches, then they are oriented more to the poorly versed in neuroscience rich investors than to their fellow scientists.

In the history of the project, in addition to beautiful graphic materials, blinking garlands of neurons, there is one practically useful study. About twenty 3D models of neurons of certain types were created, completely repeating the topology of real neurons, taking into account all the bends and branches of the dendrites. Then, a small area of ​​the cortex was configured in which the stored neuron models were arranged according to certain rules, but the neuron models were selected randomly, then the statistics from the obtained model were collected: where the dendrites intersect, at what distance from the cell body, what type of contacts.

The obtained statistics were compared with similar statistics, but obtained from the biological nervous system and obtained very important results: the formation of 80% synaptic connections in the cortex is subject to randomness. That is, when meeting freely growing dendrites, axons, collaterals, a synapse can be formed, without any chemical markers. Of course, in some cases, the selectivity of the formation of synapses is not ruled out, nor can it be concluded that the quality of the bonds is random. Synapse can be formed by chance, in the process of neuron growth, but its strength (weight) can be determined by the vital activity of the nervous system and animal.

In the framework of the Human Brain Project, before the creation of a full-scale model of the brain, the mouse is still far away. Due to the resources of IBM, another researcher Dharmendra Modha in 2009 announced the launch of a project to create a digital simulation of the cat’s brain. This statement caused a lot of indignation at Markram, which resulted in an angry open letter to IBM’s chief technologist. Competition does not like anyone, but it would be better if we saw it in the struggle of virtual cats and mice than on attracting the attention of the heads of IBM. After many years of significant changes and development in the sphere of imitation of the brain of mammals did not occur.

OpenWorm

OpenWorm is a very famous project to create a simulation of the nematode (roundworm) of the species Caenorhabditis elegans, this worm is notable for the fact that this is the only animal species for which a complete connection of its nervous system consisting of 302 neurons and about 7,000 synaptic connections is made. Even for such a small nervous system as c. elegans the formation of a connector turned out to be a titanic work. First, the worm was subjected to a complex procedure — serial microscopy, the creation of a series of photographs of transverse sections of the body. It was necessary to make very thin, micron-sized cuts, then to create high-resolution images using an electron microscope. With the length of an adult worm in 1–2 mm — this turned out to be a difficult task, the available atlas of photographs is made up of 3 worms, good nervous system c. elegans possesses amazing stability and repeatability of the structure. Secondly, it took more than seven years of painstaking study of the images, a team of scientists, to compile a map of the connections of the nervous system, corrections are still being made to the database obtained.

The next step in understanding the nature of the nervous system c. elegans is an attempt to create a computer simulation of the worm. The digital model is convenient because the experimenter can change and select the settings of its elements, so that the work of the whole model is comparable to the biological analogue, so that it is possible to reveal some laws of organization and work of the nervous system of a living organism by way of empirical selection. Of course, without a general theory of the work of the nervous system, without a theoretical platform, such a search for laws is a very difficult task, the solution of which can naturally be delayed.

The project acquired special prominence during the company’s kickstarter in 2014. The OpenWorm community is very fruitful: a three-dimensional nematode atlas was created, in which the nervous system is detailed — each neuron is indicated; a system for modeling and visualization of geppetto has been created and is being widely developed; simulation of the mechanical properties of the body of the worm and the external environment — Sibernetic. But free-moving cybernetic nematodes controlled by the nervous system has not yet appeared. Some simple reflexes associated with locomotion (movement) and pulling back when touched to the front part of the body are simulated, but the greater part of the nerve circuits and associated nematode behavior remains unexplored.

Swimming nematodes, control is carried out using simple periodic signals, without the participation of virtual neurons:

Tadpoles

The little-known project tadpoles.org.uk, modestly explains some of the fundamental principles and laws of the organization of the nervous system. Scientists created a model of the development of the nervous system, its formation in the initial period of development of the animal. First, a model is generated: from neurons, dendrites and axons grow according to certain rules that take into account certain parameters of the tadpole’s body with some probability of influencing the growth direction of the shoots, then synapses are formed at the junctions of the dendrites and axons of different cells. In the final, the model can be activated and it will demonstrate activity similar to the activity of the nervous system of a living tadpole in the part responsible for swimming.

It turns out that to form a nervous system with all congenital reflexes and mechanisms, it is necessary that simple instructions are executed by the nerve cells. Depending on its location and affiliation to certain ganglia, the cell must grow its dendrites and axon in certain directions, and also form synoptic contacts with cells nearby, at some distances from the cell body, without any selectivity. The resulting error in the structure of the neural network due to deviations in the direction of growth of the processes when overcoming possible obstacles are compensated by the excessive presence of neurons.

For the act of swimming, wave-like contraction of muscles along the body, the tadpole requires about 1,500 neurons, for a nematode less than three hundred. The tadpole of the frog is more complex and evolutionarily developed than the roundworm, and the increase in the number of neurons is connected here, not with the need to increase the computing power, but with the reliability of the system and compensation for the inaccuracy of the work of neurons as computational elements. Some researchers attribute the properties of quantum computers or complex calculators to individual neurons, but this is fundamentally wrong, a neuron is primarily a biological cell, with its inherent inaccuracy in work and instability. Therefore, it makes no sense to spend time recreating all 86 billion neurons of the human brain, it will be appropriate to structure the neurons structurally into certain neurons performing functional tasks assigned to groups of neurons.

Functional approach

You can spend a lot of time, money and effort on creating the most complex models of complex systems without having obtained practically meaningful results, if the exact idea of the operation of each element of the system is not laid down and about what functions these elements perform within the system as a whole. Ideally, you need to know the result of the work of the model before the beginning of its re-creation, it is this that determines the success in solving the tasks posed, and not the existence of a supercomputer and large financial assistance.

Now much attention is paid to neural networks, which demonstrate high efficiency and great practical benefit. Initially, neural networks were positioned as some models of biological neural networks, but over time and the development of neurobiology it became clear that there is only a common name between a formal neuron used in neural networks and a biological neuron. Modern neural networks are a powerful mathematical tool for statistical analysis. It is this positioning of neural networks in their development that will give greater effectiveness. Statistical analysis and processing of a large number of data, rather than a model of the nervous system. It is possible that a certain kind of artificial intelligence may appear on the platform of neural networks, but if we are striving to create intelligence like the human one, we should pay attention to biological neural networks.

Neural networks have already proven to be more effective in solving specific problems than humans, and it is desirable that their development continues. As a brain researcher, I would have a great deal of confidence in a machine controlled by a well-designed neural network than a machine controlled by a virtual model of a nerve tissue similar to a biological one. The fact that in the mechanisms of the brain initially elements of inaccuracy and limited perception, which naturally leads to errors, are laid, but on the other hand these same mechanisms give a great potential for creativity and adaptation.

The dominant mathematical model used in the creation of biologically similar neural systems is the Hodgkin-Huxley model, described back in 1952. Anyway, this model is used in the Human Brain Project, and in OpenWorm, and in tadpoles.org.uk. The Hodgkin-Huxley model is a system of equations describing charge oscillations arising on the surface of the neuron membrane, the system of equations has been adopted and adapted from electrical engineering in the part of descriptions of self-oscillations in an electric oscillatory circuit. Alan Lloyd Hodgkin and Andrew Huxley added to the system of equations some additional elements and a number of coefficients, selecting them in such a way that the result of their work is compared with the experimental data obtained by them in the study of squid axons.

The system of Hodgkin-Huxley equations describes the change in the potential only at one point of the membrane, to obtain a picture of the propagation of excitation through the membrane and neuron outgrowths, it is possible to break the neuron model into some primitives, or to select equidistant points on it and to consider a system of equations at each such point. The Hodgkin-Huxley model is very realistic, demonstrates the spread of the action potential over the crate’s body, but the model requires large computational resources.

In my work, I produce a certain reengineering of the nervous system, highlight the significant and discard or simplify some related processes and phenomena. The nature of the nervous system and nerve cells is very diverse and complex, there are many chemical reactions, intracellular processes and phenomena, but one should not transfer everything to the model, it is first necessary to understand the meaning and functional purpose of the phenomenon, otherwise it will be a meaningless complication of the model.

What is the functional significance of the propagation of the action potential along the neuron membrane? — Transmission of information from one part of the nerve cell to another. Information that the nerve cell has been activated through receptors or synapses, must reach the tips of the axon, flowing along its entire length, which can reach up to a meter in the human body. What is important in this process? — The time from the start of activation, until the moment of transfer of information about it, the target area of ​​the nervous tissue. On average, the propagation velocity of the action potential is 1m/s (2,2 mph), it depends on various factors, for example, on the degree of myelination of the axon. Accordingly, under different conditions, the delay time can be different. The Hodgkin-Huxley model very realistically simulates the process of nerve impulse propagation through the membrane, but is such a detail needed when creating a functional model of the nervous system?

If we can simplify something, it means that we understand something. The idea of simplifying to simple laws and functions, identifying the main and separating it from the secondary, can be called a functional approach.

If you try to model the human brain with all 86 billion neurons, with the repetition of the topology of the processes, and even the miscalculation of the Hodgkin-Huxley system of equations in a dense grid of points on the surface of neurons, then all the computing resources on the planet Earth will not suffice. And making predictions about the appearance of such models, you can focus on twenty years in advance, and after these years, for another twenty years. Well, the propagation of the action potential is not all, one must still understand the logic of neuron interaction, to solve this problem, it first of all focuses on fairly simple nervous systems, such as the nervous system of a worm or tadpole of a frog.

Development

You do not expect that the use of the game engine in scientific models can cause a sense of alertness to the public? — a similar question was asked to me by one wonderful Internet user. Yes, I have not resorted to any standardization system, I have not used the languages ​​of the description of biological structures, only for the reason that it takes a lot of time to study the companion material. I am not a scientist, but an ordinary person with a dynamic and fussy life, but with a lot of ideas, creative potential and desire for realizations. Therefore, the time between family life, work and sleep is given to modeling by means that are available. The Unity game engine is just a tool in my work, and very good and convenient in terms of visualization.

The whole OPENTadpole project consists of only two scenes: the connector editor and the environment simulation. With the editor in the development process there were no serious problems.

The next step was to work on the environment simulator, and quickly created the tadpole body from the standard Unity components. The body of the tadpole consists of 9 segments, connected together by joints, some virtual kinematic pairs and a pair of virtual muscles on both sides. Virtual muscles have a certain elasticity, which provides elasticity to the whole body.

The work of the muscles was subordinated to the virtual nervous system, which is loaded through conservation files, which are common to the editor and for the simulation of the environment.

Tadpole in vacuum

Further development required the addition of a system that simulated the physical properties of the medium, which was not an easy task for me. At some point, I even regretted that the model animal was chosen as a floating creature. And of course, the big advantage of using a very popular game engine is that it created and developed many add-ons, libraries and assets. I tried to work with several libraries, but LiquidPhysics2D was the best. This library is based on the well-known Box2D engine and is very optimized and easy to use, with lots of examples, so I managed to use it, although I had to apply a lot of persistence. It required re-making the body of the tadpole using the elements of the library.

Calculating the physical properties of a fluid in real time requires high computing power, so even using a well-optimized library, you can get a stable application running, limited to only a couple of thousands of particles.

I wanted to see a free floating tadpole within a fairly large area, a strong limited space would not allow me to fully appreciate the performance of the model. It was decided to dynamically create and remove particles in the region of the surrounding tadpole, it was necessary to break up space into special square areas and to regulate the appearance and removal of particles in them, depending on the position of the tadpole.

To the user did not confuse the dancing squares, the range of the particles was limited, as a result, a certain aura appeared, displaying particles around the body of the tadpole, which can be turned off with the F12 key.

Result

The purpose of such projects is to identify some general rules for the organization of the nervous system and the laws of interaction of neurons that determine the behavior of the animal. The project OPENTadpole in this respect can be called completely completed, everyone can try himself as the Creator and fill from scratch the empty body of a virtual tadpole with a nervous system that allows him to actively move around in space and interact with the environment and live in his strict and limited world. Indeed, while the development was underway, I got a lot of positive emotions, seeing how my actions make the behavior of the tadpole more and more alive.

In the archive with the application there is a beautiful, colorful manual describing the main aspects of the program, as well as describes a number of examples of conservation that will help you understand the principles of the nervous system (link at the end of the article).

Swimming

At the heart of the neural chain, the generator responsible for swimming is the generator of ordered activity, similar generators are found in all nervous systems of simple animals, these are closed chains of neurons that can generate rhythmic excitation without feedback.

The scheme of the generator of the ordered activity of the frog tadpole is represented by four neurons arranged symmetrically in the body of the tadpole. Two neurons (dIN, violet) in this scheme have a specific feature, they exit the state of inhibition, creating a spike of activity. Each such neuron activates an inhibitory neuron which in turn exerts a cross-over on the neuron dIN. Thus, we obtain a certain contour of circulation of nervous excitation. It is possible to start this generator with the single activation of one of the generator neurons, and it is possible to stop the operation of the generator if one of the neurons of the chain is inhibited by a stronger inhibitory effect.

For the purpose of conducting experiments in the OPENTadpole system, four receptor keys F1, F2, F3 and F4 were identified. In the examples, the receptor F1 starts the generator, F2 suppresses the activity in it.

The activity of the generator is propagated alternately along the right and left sides along the body of the tadpole, up to each motor neuron from the head to the tip of the tail, the excitation comes with a delay of 100 milliseconds, this is due to the fact that the propagation of the excitation has a finite velocity.

In the nervous system of a biological tadpole, such generators are many, they are located along the body and are connected in series. If only one generator existed in the tadpole’s nervous system, then it would create a great risk, damage to one neuron, or even a single synapse from this scheme, will lead to loss of the ability to move. For computer simulation there are no such problems, therefore for the model one generator is enough.

Maneuvers

Tadpole has the ability to change the direction of its voyage, to perform some maneuvers. To make a turn at the time of swimming, it is necessary that the muscles on the side to which the tadpole intends to turn should be strongly or intensively reduced, while maintaining the previous frequency of contractions.

Signals in the nervous system, for all animals, can be said to be discrete. The amplitude of the action potential is always and everywhere stable, the signal itself has a short, piciform character, but we can easily change the degree of tension in the muscles, smoothly enough and accurately, all determined by the frequency of the commands sent to muscle groups. The more often the impulses, the stronger the contraction of the muscle. Thus, controlling the frequency of the activating impulses, the nervous system controls the muscle groups, and it is flexible enough.

A simple mechanism of temporal summation of the neuron allows you to simply manage the pulse frequency, by changing the threshold of the adder. The level of the summation threshold in the biological neuron is determined by its overall configuration, the size of the neuron, the number and density of receptors on the postsynaptic membrane, the number and density of ion channels on the membrane, in general, from the metabolism of the nerve cell. And all these parameters can actively change in a living cell under the influence of the modulating effect exerted on it.

We have long been accustomed to the fact that when describing the work of the nervous system, only two kinds of synaptic effect are spoken: stimulating and inhibitory. But in fact it is a fatal inaccuracy distorting understanding of the principles of the nervous system. In his work, the American neurobiologist Erik Candel described the molecular mechanism of synaptic effects leading to metabolic changes in the cell and the synapse, for which he was awarded the Nobel Prize in 2000. Modulating neurons and modulating mechanisms have long been used in describing the principles of the nervous system, since these mechanisms play an important role in its work.

In the model, a separate type of synaptic connection is distinguished, which can affect the level of the adder threshold, for a certain time interval — a modulating synapse. If you modulate, reduce the threshold of the adder on an insert modulated neuron (green in the following scheme), this will increase its sensitivity, and upon activation it will generate more than one spike, and a whole series of pulses. Thus, by converting the signal from the generator it is possible to carry out maneuvers, turns during swimming. If the neurons are modulated on both sides simultaneously, the tadpole will simply swim more actively.

The modulation theme in the nervous system is very extensive, despite the fact that in this model I am limited only to controlling the activation threshold level. Given the changes that can dynamically occur in the nervous system, it can be said that the modulation can be very diverse, it is the changes in the strength of the synapses, the changes in plasticity, the degree of addiction, the time of the synoptic delay, and the metabolic properties of the cell.

Control with the help of modulating synapses, as well as control of the generator’s operation, made it possible to realize some protective reflexes, for example, the beginning of swimming when the tadpole touched the head and the deviation to the opposite side from contact, allowing the tadpole to float freely in the virtual aquarium by sailing from its walls.

Where to swim, then?

Tadpole learned to swim, and freely can choose the direction, but to choose this direction, he needs a goal, and this goal is fully justified, perhaps, food. To detect food, the tadpole has two special olfactory receptors, separated by a special line, through which the receptor can not sense the presence of food. The closer the food, the more activated the receptor, taking into account the square of the distance.

Of course, such an olfactory model is a great simplification, but within the framework of simulation it is quite acceptable.

In the examples, the signals from the two receptors first pass through a chain of neurons in which mutual suppression occurs, and then exert a modulating effect on the motor neurons, controlling the swimming of the tadpole.

Needs

I wanted the behavior of the tadpole to be somewhat more complicated than simply following the food, so it was decided to make a simulation of the needs mechanisms. First, it is the need for food, hunger is a natural desire in consuming the source of energy necessary for the movement and development of the organism. And naturally, hunger should have a different degree, if the animal is full, then the food should not be very interested in it. Secondly, there is no less fundamental need for energy conservation, which evolved very early and is of key importance in the behavior of all animals. Laziness allows us to optimize our energy efficiency behavior, the one who achieves the result with less waste of energy resources is more successful.

To realize these two needs, two special receptors are introduced, the higher the need, the more often they are activated. The saturation level decreases with time, the rate of this decrease is adjusted by the user, and the feeling of fatigue accumulates depending on the intensity of muscle contractions.

One can observe a kind of competition between these two needs: fatigue can be suppressed not by severe hunger, but strong hunger is stronger than even severe fatigue.

Now the tadpole’s behavior has become even more alive, it depends on inner motives and desires.

Conclusions

The tadpole swims and eats, and much more: it reacts to light, to touch, if you grab it by the head, it will try to escape (this is provided in the simulator), seeks and finds food, suffers from hunger and fatigue, all under the control of virtual neurons .

The most complex tadpole has 63 neurons and 131 synaptic connections, recall that Caenorhabditis elegans has 302 neurons, and biological tadpoles require only 1,500 neurons for normal swimming alone. The more developed the animal, the higher the redundancy of neurons in solving problems, which is due to evolutionary processes and the need for system reliability. While it is difficult to evaluate the redundancy of neurons with respect to the human brain, in my opinion, to implement a computer model close to the human brain, there will be no need for quantum computers or mainframes, a sufficiently powerful home computer. The main thing now is not computing power, but the development of the right technology and approaches.

OPENTadpole dowland for Windows

Source