Abstract The object of this work is to create a computational model that examines the early evolution of the nervous system in relation to adaptive behavior. The main questions are: how did the nervous system and the most primitive forms of intelligence came into being, how a system can be organized during evolution that is able to ensure the adaptive behavior of a being, what are the basic rules of construction that are sufficient to create a workable nervous system without specifying the details of the construction. The biological bases of the model are the phyla Cnidaria and Porifera as they stand at the beginning of the genesis of nervous organization. We found in our model that in a network of homogenous epithelial-like cells, which is considered the starting point of the genesis of the nervous system, the changes that have positive influence on the behavior are those that make the spreading of the electric potential more efficient. It can cause the increase of the effectiveness of the behavior by itself without creating new specific cell-types. There are some alternatives to increasing the effectiveness of spreading of stimuli, for example increasing the value of biophysical parameters of the cells, or increasing the density of nerve cells and the number of synapses. If during the evolution a sort of cell comes into being that is able to conduct electrical stimuli — even in a rudimentary way — it can increase the adaptivity of behavior by itself without the need for specific information of how to organize the construction of this system.