  We consider a finite horizon stochastic optimal control problem for
nearest-neighbor random walk $\{X_i\}$ on the set of integers. The cost
function is the expectation of exponential of the path sum of a random
stationary and ergodic bounded potential plus $\theta X_n$. The random walk
policies are measurable with respect to the random potential, and are adapted,
with their drifts uniformly bounded in magnitude by a parameter
$\delta\in[0,1]$. Under natural conditions on the potential, we prove that the
normalized logarithm of the optimal cost function converges. The proof is
constructive in the sense that we identify asymptotically optimal policies
given the value of the parameter $\delta$, as well as the law of the potential.
It relies on correctors from large deviation theory as opposed to arguments
based on subadditivity which do not seem to work except when $\delta = 0$.
  The Bellman equation associated to this control problem is a second-order
Hamilton-Jacobi (HJ) stochastic partial difference equation with a separable
random Hamiltonian which is nonconvex in $\theta$ unless $\delta = 0$. We prove
that this equation homogenizes under linear initial data to a first-order HJ
deterministic partial differential equation. When $\delta = 0$, the effective
Hamiltonian is the tilted free energy of random walk in random potential and it
is convex in $\theta$. In contrast, when $\delta = 1$, the effective
Hamiltonian is piecewise linear and nonconvex in $\theta$. Finally, when
$\delta \in (0,1)$, the effective Hamiltonian is expressed completely in terms
of the tilted free energy for the $\delta=0$ case and its
convexity/nonconvexity in $\theta$ is characterized by a simple inequality
involving $\delta$ and the magnitude of the potential, thereby marking two
qualitatively distinct control regimes.
