user4545: I checked the UCI specification here and I don't see a way to undo a move. I'm using stockfish, is there a way to do this?
For example, how would I accomplish the following:
position startpos moves e4c5
undo

With the intent of the above "undo" to result in a position of e4

user825: Unfortunately the UCI protocol is stateless, there is no way to ask the engine to undo a move. The protocol is designed for communication between GUI and engine, you are supposed to have your own board representation such that you can update the engine.
For example, you would need to do:
position startpos moves e4c5
position startpos


4545: <p>I checked the UCI specification <a href="http://www.shredderchess.com/chess-info/features/uci-universal-chess-interface.html" rel="nofollow">here</a> and I don't see a way to undo a move. I'm using stockfish, is there a way to do this?</p>

<p>For example, how would I accomplish the following:</p>

<pre><code>position startpos moves e4c5
undo
</code></pre>

<p>With the intent of the above "undo" to result in a position of <code>e4</code></p>
 825: <p>Unfortunately the UCI protocol is stateless, there is no way to ask the engine to undo a move. The protocol is designed for communication between GUI and engine, you are supposed to have your own board representation such that you can update the engine.</p>

<p>For example, you would need to do:</p>

<pre><code>position startpos moves e4c5
position startpos
</code></pre>
