Answers.Body: <p>There can't be a standard here so you can choose your scoring system in the way is makes most sense for your particular case. I'm not sure what its intent really is so it might be different from what I have in mind. We can all agree on what a 100% score would look like, but what does it really mean to have a 50% or a 75% score?</p>
  <p>If it's intended as a training tool, I'd include the evaluation of the final position. For me it's not the same to stop following the PGN with a blunder than doing that with an interesting alternative. But maybe for your particular case it is!  It's ultimately up to you to decide. For example, I don't see why the number of branches taken should have anything to do with &quot;how well&quot; you folowed the PGN.</p>
  <p>Some possible criteria you can use (I'm thinking of a training tool that helps me memorize an opening line here):</p>
  <ul>
  <li>Number of moves played correctly.</li>
  <li>Number of non-forced moves played correctly.</li>
  <li>Number of moves until the &quot;end&quot; of the line.</li>
  <li>Evaluation after deviating (compared to evaluation at the end of the line)</li>
  <li>Mainline penalty (being a bit more lenient with errors in weird sidelines than with errors in the mainline).</li>
  <li>Critical position bonus (selecting a few specific positions that are considered &quot;critical&quot; in a given line and give extra weight to those in the final score).</li>
  <li>Previous success ratio (give extra weight in the final score to positions the user got wrong frequently in the past)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-16T13:12:16.257Z
Answers.Text: number of branches is interesting for entertainment value I think.
Answers.UserDisplayName: eguneys
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-16T06:57:31.187Z
Answers.LastActivityDate: 2021-04-16T06:57:31.187Z
Answers.UserDisplayName: David
Body: <p>I am making a bot that plays opening moves from a PGN. When the player reaches a position out of PGN, I want to give a score to the player how well he followed the PGN. What kind of statistics can I give the player for entertainment.</p>
  <p>I am thinking:</p>
  <p><code>ply</code> The ply number that is reached.</p>
  <p><code>plies to next branch</code> Number of plies to next branch.</p>
  <p><code>branches</code> Number of branches that has been taken.</p>
  <p>Would this be accurate, and what can I add to them?</p>
  
Tags: <opening><engines><pgn><evaluation>
Title: How to score a certain move in a PGN, for how well opening theory is followed
ThreadText: # How to score a certain move in a PGN, for how well opening theory is followed
  
  (Asked by: username_0 on 2021-04-15)
  
  I am making a bot that plays opening moves from a PGN. When the player reaches a position out of PGN, I want to give a score to the player how well he followed the PGN. What kind of statistics can I give the player for entertainment.
  
  I am thinking:
  
  `ply` The ply number that is reached.
  
  `plies to next branch` Number of plies to next branch.
  
  `branches` Number of branches that has been taken.
  
  Would this be accurate, and what can I add to them?
  
  **Tags:** opening, engines, pgn, evaluation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-16. Score: 1 | Accepted answer
  
  There can't be a standard here so you can choose your scoring system in the way is makes most sense for your particular case. I'm not sure what its intent really is so it might be different from what I have in mind. We can all agree on what a 100% score would look like, but what does it really mean to have a 50% or a 75% score?
  
  If it's intended as a training tool, I'd include the evaluation of the final position. For me it's not the same to stop following the PGN with a blunder than doing that with an interesting alternative. But maybe for your particular case it is! It's ultimately up to you to decide. For example, I don't see why the number of branches taken should have anything to do with "how well" you folowed the PGN.
  
  Some possible criteria you can use (I'm thinking of a training tool that helps me memorize an opening line here):
  
  * Number of moves played correctly.
  * Number of non-forced moves played correctly.
  * Number of moves until the "end" of the line.
  * Evaluation after deviating (compared to evaluation at the end of the line)
  * Mainline penalty (being a bit more lenient with errors in weird sidelines than with errors in the mainline).
  * Critical position bonus (selecting a few specific positions that are considered "critical" in a given line and give extra weight to those in the final score).
  * Previous success ratio (give extra weight in the final score to positions the user got wrong frequently in the past)
  
  > **Comments:**
  > **username_0**: number of branches is interesting for entertainment value I think.  
  
  ---
  
  