user19717: I am reading an opening book in King's Gambit, and been writing down the lines to study later. But I wish there was a chess engine, that goes for those lines so I can play against them. I want to play the book lines against the engine so I don't forget them later. And the engine responds with the book lines back. Do you have any suggestions on how to make such a bot? For example a bot that looks up the favored variations and plays them otherwise plays a Stock-fish's best move.

user15223: Just set up the position you're interested in using Forsyth–Edwards Notation
 and feed it to the engine. For example if you want the engine to play the Muzio Gambit, give it this FEN: rnbqkbnr/pppp1p1p/8/8/2B1Ppp1/5N2/PPPP2PP/RNBQ1RK1 b kq - 1 5
Which corresponds to this position with Black to play:
rnbqkbnr/pppp1p1p/8/8/2B1Ppp1/5N2/PPPP2PP/RNBQ1RK1 b kq - 1 5


user4418: Chess engines use an opening book during the opening. The standard way of doing what you ask is to build your own opening book and point the chess engine to that so it uses your book and not the previously supplied one.
When you are done just switch back.

19717: <p>I am reading an opening book in King's Gambit, and been writing down the lines to study later. But I wish there was a chess engine, that goes for those lines so I can play against them. I want to play the book lines against the engine so I don't forget them later. And the engine responds with the book lines back. Do you have any suggestions on how to make such a bot? For example a bot that looks up the favored variations and plays them otherwise plays a Stock-fish's best move.</p>
 15223: <p>Just set up the position you're interested in using <a href="https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation" rel="nofollow noreferrer">Forsyth–Edwards Notation
</a> and feed it to the engine. For example if you want the engine to play the Muzio Gambit, give it this FEN: <code>rnbqkbnr/pppp1p1p/8/8/2B1Ppp1/5N2/PPPP2PP/RNBQ1RK1 b kq - 1 5</code></p>
<p>Which corresponds to this position with Black to play:</p>
<pre><code>rnbqkbnr/pppp1p1p/8/8/2B1Ppp1/5N2/PPPP2PP/RNBQ1RK1 b kq - 1 5
</code></pre>
 4418: <p>Chess engines use an opening book during the opening. The standard way of doing what you ask is to build your own opening book and point the chess engine to that so it uses your book and not the previously supplied one.</p>
<p>When you are done just switch back.</p>
