  Motivated in part by a problem in simulated tempering (a form of Markov chain
Monte Carlo) we seek to minimise, in a suitable sense, the time it takes a
(regular) diffusion with instantaneous reflection at 0 and 1 to travel to $1$
and then return to the origin (the so-called commute time from 0 to 1).
Substantially extending results in a previous paper, we consider a dynamic
version of this problem where the control mechanism is related to the
diffusion's drift via the corresponding scale function. We are only able to
choose the drift at each point at the time of first visiting that point and the
drift is constrained on a set of the form $[0,\ell)\cup(i,1]$. This leads to a
type of stochastic control problem with infinite dimensional state.
