Backgammon variant — two player double or nothing on random walk? Two players, A and B, play the following backgammon variant.
  
  A series of steps is labelled $-2$, $-1$, $0$, $1$ and $2$, and a
  chess piece is placed on step $0$. A fair coin is flipped, and it
  lands on heads, the chess piece is moved forward by one step, while if
  it lands on tails, the piece is moved back by one step. Player A wins
  if the piece lands on step $2$ first, while player B wins if the piece
  lands on step $-2$ first, and the loser must pay the winner some
  amount of money.
  
  The amount is originally set at \$1. Initially, either player can
  challenge the other player to double this stake at any time (before
  the game ends), and the other player must either accept this or
  forfeit and lose the game. Following that, two consecutive challenges
  cannot be raised by the same player (i.e. if player A challenges first
  and B accepts, A cannot challenge again until B challenges him), and
  only one challenge can be raised each turn.
  
  When should you challenge, and if challenged, should you accept? What
  is the expected value of your strategy?


My initial thought was that if challenged, I would only accept when at $0$ (indifferent) and $+1$ (if I was player A) or $-1$ (if I was player B). However, this would mean that the other player challenged one step before possibly losing. How do I reconcile this? Is there a reason why a player would challenge if one step away from potentially losing?
The analysis in quarague&rsquo;s answer isn&rsquo;t correct because it only takes the possibility of doubling once into account, whereas future doubling opportunities in fact increase the expected payoff.

Denote by $x_k$ the expected value of the game for $A$ when $A$ has score $k$ and has the right to challenge and $B$ doesn&rsquo;t. We can guess that $A$ challenges when the score is $1$, and $B$ accepts, and then check whether this is self-consistent. Under these assumptions, we have

$$
2x_0=x_{-1}+x_1=x_{-1}-2x_{-1}=-x_{-1}
$$

and

$$
2x_{-1}=x_0+x_{-2}=x_0-1\;,
$$

and thus $x_{-1}=-\frac25$, $x_0=\frac15$ and $x_1=\frac45$. The assumptions turn out to be self-consistent, since the expected return for $A$ at score $1$ would only be $\frac12\left(\frac15+1\right)=\frac35\lt\frac45$ without challenging, and the expected return for $B$ upon refusing would be $-1\lt-\frac45$.

It remains to find the optimal strategy and expected return in the initial state of the game, where both players have the right to challenge. Denote these expected returns by $y_k$. Then $y_0=0$ by symmetry, and $y_1$ is $\frac12$ if $A$ doesn&rsquo;t challenge, $1$ if $A$ challenges and $B$ refuses and $-2x_{-1}=\frac45$ if $A$ challenges and $B$ accepts, so $A$ challenges at score $1$ and $B$ accepts.

To summarize, the initial value of the game is $0$ by symmetry; a player challenges exactly if they have a score of $1$, the other player always accepts, and the value of the game for the player with the right to challenge is $-\frac25$, $\frac15$ and $\frac45$ at a score of $-1$, $0$ and $1$, respectively.
One can analyse the expected values at each stage. First the base case without doubling, at stage 0, player A has an expected return of $0\$$ due to symmetry. At stage $1$, he has a $50\%$ chance to win immediately and a $50\%$ chance to go back to stage $0$. This gives A an expected return of $0.5\$$. By symmetry at stage $-1$ A has an expected return of $-0.5\$$. 

Now for doubling, by symmetry only consider whether A should offer and whether B should accept. At stage 0, A has zero expected return, so doubling doesn't change anything, neither does it for B. At stage 1, if A offers to double and B accepts, A's expected return doubles, if B refuses it also doubles to the current stake. So A should offer to double and B can take the double or not but it doesn't change his expected return. At stage -1, if A offers to double and B accepts, A's expected return goes from $-0.5$ to $-1$, if B refuses it goes to $1$. So B would accept it but A shouldn't offer it.