Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T09:42:30.267Z
Answers.LastActivityDate: 2021-01-04T09:42:30.267Z
Answers.UserDisplayName: Brian Towers
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T05:43:10.600Z
Answers.Text: No I meant exercising the book moves that brings to this position.
Answers.UserDisplayName: eguneys
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T05:54:10.247Z
Answers.Text: Give it an opening book then?
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T06:11:55.090Z
Answers.Text: Can you extend your answer to provide an opening book for kings gambit, and the way to use it. Also I want to specify the moves myself first copied from the book I am reading, and let the engine play them.
Answers.UserDisplayName: eguneys
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T06:12:41.727Z
Answers.Text: How can I possibly know what opening lines you want the engine to play? You're the one who does; you must make the opening book.
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T06:15:46.957Z
Answers.Text: I thought there are existing opening books for each opening, and if not, how do I make one, what is the format, how do I use it?
Answers.UserDisplayName: eguneys
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T06:23:13.413Z
Answers.Text: https://chess.stackexchange.com/questions/5933/how-to-create-your-own-opening-book-for-your-own-chess-engine Although you will almost certainly find it easier to just set up the position you're interested in.
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T05:33:59.907Z
Answers.LastActivityDate: 2021-01-04T05:33:59.907Z
Answers.UserDisplayName: Allure
Body: <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>
  
Tags: <opening><engines><study>
Title: How to exercise an opening variation with a chess engine?
ThreadText: # How to exercise an opening variation with a chess engine?
  
  (Asked by: username_0 on 2021-01-04)
  
  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.
  
  **Tags:** opening, engines, study
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-01-04. Score: 3
  
  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.
  
  
  ---
  
  ### Answer by username_2 on 2021-01-04. Score: 1
  
  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
  
  > **Comments:**
  > **username_0**: No I meant exercising the book moves that brings to this position.  
  > **username_2**: Give it an opening book then?  
  > **username_0**: Can you extend your answer to provide an opening book for kings gambit, and the way to use it. Also I want to specify the moves myself first copied from the book I am reading, and let the engine play them.  
  > **username_2**: How can I possibly know what opening lines you want the engine to play? You're the one who does; you must make the opening book.  
  > **username_0**: I thought there are existing opening books for each opening, and if not, how do I make one, what is the format, how do I use it?  
  > **username_2**: https://chess.stackexchange.com/questions/5933/how-to-create-your-own-opening-book-for-your-own-chess-engine Although you will almost certainly find it easier to just set up the position you're interested in.  
  
  ---
  
  