Minimum steps on a number line to get from $0$ to $x$, moving $\pm i $ at $i$-th step. Given an infinite numberline, you start at zero. On every $i$-th move you can either move $i$ places to the right, or $i$ places to the left. How, in general, would you calculate the minimum number of moves to get to a target point $x$? For example:
If $x = 9$:
Move $1$: Starting at zero, move to $1$
Move $2$: Starting at $1$, move to $3$
Move $3$: Starting at $3$, move to $0$
Move $4$: Starting at $0$, move to $4$
Move $5$: Starting at $4$, move to $9$
 A: The number of steps $n$ required is the least $n$ such that $T_n$, the $n$th triangular number, is at least $x$ and has the same parity as $x$. We prove by induction: after $k$ steps, the numbers you can reach are
$$
\{-T_k,-T_k+2,\ldots,T_k-2,T_k\}.
$$
This is clear for $k = 1$. Now suppose it holds for $k$; then after $k+1$ steps you can reach
$$
\{-T_k-k-1,-T_k+2-k-1,\ldots,T_k-2-k-1,T_k-k-1\} \cup \{-T_k+k+1,-T_k+2+k+1,\ldots,T_k-2+k+1,T_k+k+1\}
$$
Clearly, $T_k-k-1 \geq 0$, and $-T_k+k+1 \leq 0$, so this set indeed spans the entire range
$$
\{-T_{k+1},-T_{k+1}+2,\ldots,T_{k+1}-2,T_{k+1}\}.
$$
A: First, try the greedy approach, i.e., always move right  (assuming $x>0$) until you arrive at a point $\ge x$. So you find the minimal $n$ such that $x\le 1+2+3+\ldots +n=\frac{n(n+1)}{2}$. Note that this $n$ can simply be found as $n=\left\lceil\sqrt{2x+\frac14}-\frac12\right\rceil$


*

*If you hit $x$ exactly, this is obviously optimal. 

*If you hit $x+d$, then certaily $d<n$ (or you would have stopped earlier). If $d=2k$ is even, simply flip the one $+k$ step into a $-k$ step

*If you hit $x+d$ with odd $d=2k+1$, $k\ge 0$, you must need at least one extra step because any flipping you can do with the given $n$ steps will move you by an even number of positions. Thus we add another step $+(n+1)$, which means we end at $x+d'$ with $d'=d+n+1$. Note that $d'\le 2n$, hence $d=2k$ with $k\le n$. As above, if we flip the $+k$ step into $-k$, we are done.

*If the above fails because $d'$ is still odd, we must add another step because we still cannot change the parity of the sum by flipping any summands. Smartly, we subtract this time, so we land at $x+d''$ with $d''=d+(n+1)-(n+2)=d-1$. If $d''=0$, we are done, and otherwise we can flip a single summand.


n sumary: Given $x\in \Bbb Z$, compute $n=\left\lceil\sqrt{2|x|+\frac14}-\frac12\right\rceil$. If $\frac{n(n+1)}{2}\equiv x\pmod 2$, we are done with $n$ summands and potentially one sign change. Otherwise, we need one (for $n$ even) or two (for $n$ odd) additional steps
A: I found a solution for this game which solves it in $\approx\frac{3}{\sqrt{2}}\sqrt{X}$ steps with X being the target 
0) Start from 0.
1) Move in i steps to the triangular number closest to X of the form $\frac{i(i+1)}{2}$ 
2) if X is lower than the triang. number:  perform left move -i then right move +i+1 until X is reached.
3) if X is higher than the triang. number:  perform right move +i then left move -i-1 until X is reached.
The exact number of moves is:
$$
\textrm{let}\,\,\,\,\,\,\,\,\, s=\frac{1}{2} \left(\sqrt{8 X+1}-1\right)
$$
$$
\textrm{steps} = \min{\left\{\left\lceil s\right\rceil ^2+2 \left\lceil s\right\rceil -2 X\,\,;\,\,2 X-\left\lfloor s\right\rfloor ^2\right\}}
$$
where the symbols $\left\lceil\cdot\right\rceil$ and $\left\lfloor\cdot\right\rfloor$ are respectively round away from zero and round towards zero.
Remark: this algorithm is optimal for triangular numbers.
Remark 2: the algorithm has best case performance $\sqrt{2X}$-steps and worst case performance $\sqrt{8X}$-steps
The advantage of this algorithm is that it requires no planning ahead
