  We study a random walk on $\mathbb{Z}$ which evolves in a dynamic environment
determined by its own trajectory. Sites flip back and forth between two modes,
$p$ and $q$. $R$ consecutive right jumps from a site in the $q$-mode are
required to switch it to the $p$-mode, and $L$ consecutive left jumps from a
site in the $p$-mode are required to switch it to the $q$-mode. From a site in
the $p$-mode the walk jumps right with probability $p$ and left with
probability $1-p$, while from a site in the $q$-mode these probabilities are
$q$ and $1-q$.
  We prove a sharp cutoff for right/left transience of the random walk in terms
of an explicit function of the parameters $\alpha = \alpha(p,q,R,L)$. For
$\alpha > 1/2$ the walk is transient to $+\infty$ for any initial environment,
whereas for $\alpha < 1/2$ the walk is transient to $-\infty$ for any initial
environment. In the critical case, $\alpha = 1/2$, the situation is more
complicated and the behavior of the walk depends on the initial environment.
Nevertheless, we are able to give a characterization of transience/recurrence
in many instances, including when either $R=1$ or $L=1$ and when $R=L=2$. In
the noncritical case, we also show that the walk has positive speed, and in
some situations are able to give an explicit formula for this speed.
