Answers.Body: <blockquote>
  <p>Utilizing a chess engine: We utilized the open-source Stockfish engine, which allows us to calculate the most probable piece configurations. By calculating the prob-abilities of all possible configurations, we could choose the most probable candidate (see Figure 7). Additionally, we strengthened this method by utilizing large-scale chess game statistics in the manner proposed by Acher and Es-nault Acher and Esnault (2016).</p>
  </blockquote>
  <p>This makes literally no sense to me- SF is just an engine, and can't exactly give stats on most probable piece configs, and even if the researchers wrote some code to do such, it would be different than the most probable ones in human play.</p>
  <p>My suggestion would be to use <a href="http://www.gadycosteff.com/cql/" rel="nofollow noreferrer">CQL</a> on some database and search for each configuration.</p>
  <p>Alternatively, SCIDvsPC (free) and ChessBase (paid, and quite expensive) can search for these sort of configurations as well, so you might want to use those.</p>
  <p>As for what database to use, my recommendation would be <a href="http://caissabase.co.uk/" rel="nofollow noreferrer">Caissabase (free)</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-28T01:40:46.953Z
Answers.LastActivityDate: 2020-10-28T01:40:46.953Z
Answers.UserDisplayName: pulsar512b
Body: <p>I'm currently working on an image based FEN generator. I found a <a href="https://arxiv.org/pdf/1708.03898.pdf" rel="nofollow noreferrer">paper</a> doing the same and they have used Stockfish to  calculate  the  most probable piece configurations.</p>
  <p>Now I wonder if Stockfish has this functionality or if they implemented it on their own. Does anybody know more about this, as it would be extremely helpful for my project?</p>
  <p><a href="https://i.sstatic.net/2niW4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2niW4.png" alt="enter image description here" /></a></p>
  <p>On pages 7-8, the paper gives information on what they did.</p>
  <blockquote>
  <p>Utilizing a chess engine: We utilized the open-source Stockfish engine, which  allows us to calculate the most probable piece configurations. By calculating the prob-abilities of all possible configurations, we could choose the most probable candidate (see Figure 7). Additionally, we strengthened this method by utilizing large-scale chess game statistics in the manner proposed by Acher and Es-nault Acher and Esnault (2016).</p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-18T09:30:15.227Z
Comments.Text: they probably played games with it and noted the results. python-chess can help with that
Comments.UserDisplayName: Sopel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-18T21:42:30.677Z
Comments.Text: The section of the paper you refer to is not well explained, in my opinion. My understanding of it, based on the technique borrowed from the referenced paper by Ding 2016, is that several possible board configurations based on piece probabilities are given to stockfish to score. I would assume that scores which suggest a heavy imbalance between the two sides are rejected as being improbable in an active game. In my view, the approach should have been explained in more detail so as to be reproducible by others.
Comments.UserDisplayName: kentdjb
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-25T15:02:53.467Z
Comments.Text: Interesting question.  Have you tried contacting the authors of the paper?
Comments.UserDisplayName: Michael West
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-28T12:22:42.077Z
Comments.Text: No I haven't. But it's a good idea.
Comments.UserDisplayName: user13723229
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-12T11:10:24.310Z
Comments.Text: Took a while but i have asked it now, it is like you've said that heavy imbalances are weighted less probable.
  Also from the answer: It is possible to handle some trivial cases on your own (without stockfish):
  1) find similar FEN in chess database (of professional players);
  2) check the imbalance / count the pieces;
  for example, the position is at the opening stage, but we have 3 rooks, which is quite impossible.
  @MichaelWest
Comments.UserDisplayName: user13723229
Tags: <stockfish><programming><fen>
Title: Probability of given position/piece configuration
ThreadText: # Probability of given position/piece configuration
  
  (Asked by: username_0 on 2020-06-17)
  
  I'm currently working on an image based FEN generator. I found a [paper](https://arxiv.org/pdf/1708.03898.pdf) doing the same and they have used Stockfish to calculate the most probable piece configurations.
  
  Now I wonder if Stockfish has this functionality or if they implemented it on their own. Does anybody know more about this, as it would be extremely helpful for my project?
  
  [![enter image description here](https://i.sstatic.net/2niW4.png)](https://i.sstatic.net/2niW4.png)
  
  On pages 7-8, the paper gives information on what they did.
  
  > Utilizing a chess engine: We utilized the open-source Stockfish engine, which allows us to calculate the most probable piece configurations. By calculating the prob-abilities of all possible configurations, we could choose the most probable candidate (see Figure 7). Additionally, we strengthened this method by utilizing large-scale chess game statistics in the manner proposed by Acher and Es-nault Acher and Esnault (2016).
  
  **Tags:** stockfish, programming, fen
  
  > **Comments:**
  > **username_1**: they probably played games with it and noted the results. python-chess can help with that  
  > **username_2**: The section of the paper you refer to is not well explained, in my opinion. My understanding of it, based on the technique borrowed from the referenced paper by Ding 2016, is that several possible board configurations based on piece probabilities are given to stockfish to score. I would assume that scores which suggest a heavy imbalance between the two sides are rejected as being improbable in an active game. In my view, the approach should have been explained in more detail so as to be reproducible by others.  
  > **username_3**: Interesting question.  Have you tried contacting the authors of the paper?  
  > **username_0**: No I haven't. But it's a good idea.  
  > **username_0**: Took a while but i have asked it now, it is like you've said that heavy imbalances are weighted less probable. Also from the answer: It is possible to handle some trivial cases on your own (without stockfish): 1) find similar FEN in chess database (of professional players); 2) check the imbalance / count the pieces; for example, the position is at the opening stage, but we have 3 rooks, which is quite impossible. @username_3  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2020-10-28. Score: 1
  
  > Utilizing a chess engine: We utilized the open-source Stockfish engine, which allows us to calculate the most probable piece configurations. By calculating the prob-abilities of all possible configurations, we could choose the most probable candidate (see Figure 7). Additionally, we strengthened this method by utilizing large-scale chess game statistics in the manner proposed by Acher and Es-nault Acher and Esnault (2016).
  
  This makes literally no sense to me- SF is just an engine, and can't exactly give stats on most probable piece configs, and even if the researchers wrote some code to do such, it would be different than the most probable ones in human play.
  
  My suggestion would be to use [CQL](http://www.gadycosteff.com/cql/) on some database and search for each configuration.
  
  Alternatively, SCIDvsPC (free) and ChessBase (paid, and quite expensive) can search for these sort of configurations as well, so you might want to use those.
  
  As for what database to use, my recommendation would be [Caissabase (free)](http://caissabase.co.uk/)
  
  
  ---
  
  