  Atomic diffusion in solids is an important process in various phenomena.
However, atomistic simulations of diffusion processes are confronted with the
timescale problem: the accessible simulation time is usually far shorter than
that of experimental interests. In this work, we developed a long-timescale
method using reinforcement learning that simulates diffusion processes. As a
testbed, we simulate hydrogen diffusion in pure metals and a medium entropy
alloy, CrCoNi, getting hydrogen diffusivity reasonably consistent with previous
experiments. We also demonstrate that our method can accelerate the sampling of
low-energy configurations compared to the Metropolis-Hastings algorithm using
hydrogen migration to copper (111) surface sites as an example.
