The coupled problem of hydrodynamics and solute transport for the
Najafi-Golestanian three-sphere swimmer is studied, with the Reynolds number
set to zero and P\'eclet numbers (Pe) ranging from 0.06 to 60. The adopted
method is the numerical simulation of the problem with a finite element code
based upon the FEniCS library. For the swimmer executing the optimal locomotion
gait, we report the Sherwood number as a function of Pe in homogeneous fluids
and confirm that little gain in solute flux is achieved by swimming unless Pe
is significantly larger than 10. We also consider the swimmer as an learning
agent moving inside a fluid that has a concentration gradient. The outcomes of
Q-learning processes show that learning locomotion (with the displacement as
reward) is significantly easier than learning chemotaxis (with the increase of
solute flux as reward). The chemotaxis problem, even at low Pe, has a varying
environment that renders learning more difficult. Further, the learning
difficulty increases severely with the P\'eclet number. The results demonstrate
the challenges that natural and artificial swimmers need to overcome to migrate
efficiently when exposed to chemical inhomogeneities.