  Various microorganisms and some mammalian cells are able to swim in viscous
fluids by performing nonreciprocal body deformations, such as rotating attached
flagella or by distorting their entire body. In order to perform chemotaxis,
i.e. to move towards and to stay at high concentrations of nutrients, they
adapt their swimming gaits in a nontrivial manner. We propose a model how
microswimmers are able to autonomously adapt their shape in order to swim in
one dimension towards high field concentrations using an internal decision
making machinery modeled by an artificial neural network. We present two
methods to measure chemical gradients, spatial and temporal sensing, as known
for swimming mammalian cells and bacteria, respectively. Using the NEAT genetic
algorithm surprisingly simple neural networks evolve which control the shape
deformations of the microswimmer and allow them to navigate in static and
complex time-dependent chemical environments. By introducing noisy signal
transmission in the neural network the well-known biased run-and-tumble motion
emerges. Our work demonstrates that the evolution of a simple internal
decision-making machinery, which we can fully interpret and is coupled to the
environment, allows navigation in diverse chemical landscapes. These findings
are of relevance for intracellular biochemical sensing mechanisms of single
cells, or for the simple nervous system of small multicellular organisms such
as C. elegans.
