Answers.Body: <p><a href="https://chess.stackexchange.com/questions/35602/which-methods-can-be-used-to-prove-that-a-position-is-illegal">(Duplicate?)</a> Big NO. A whole genre of problem chess depends on this question, and the positions can be murderously difficult.
  There does exist software like Natch or Jacobi trying to give you a
  proof game for a position, but even those must throw the towel
  if it gets too complicated. At the moment, an experienced human will beat any AI when it comes to legality.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-10T20:46:04.503Z
Answers.Text: Why duplicate? Do you have a reference to the same question already asked? Perhaps any references to where this question was discussed?
Answers.UserDisplayName: Vosoni
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-10T20:48:56.293Z
Answers.Text: I also heard about Retractor, Natch, and Euklide,  but they only try to prove that a position is legal and are useless in proving it illegal, as I understand. That's what my question was about.
Answers.UserDisplayName: Vosoni
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-10T20:50:53.117Z
Answers.Text: Why is the task of winning a chess game easier for an AI than the task of reaching a certain position?
Answers.UserDisplayName: Vosoni
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-11T15:31:54.483Z
Answers.Text: @Vosoni the estimated game-tree complexity for chess is huge. It's impossible for a computer to build the tree to find a certain position.
Answers.UserDisplayName: Herb
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-12T07:56:46.560Z
Answers.Text: So is the forward tree :-) OP has a point there - it would be interesting if some AI could "learn" illegal positions. It must run in "intelligent" mode, since indeed running the back tree is impossible. TLDR: It hasn't been tried yet, it would be an interesting project.
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-10T20:43:06.880Z
Answers.LastActivityDate: 2024-12-10T20:43:06.880Z
Answers.UserDisplayName: Hauke Reddmann
Body: <p>Are there chess engines that can automatically check with certainty if a given chess position is illegal, i.e. can't be reached from the starting position with legal moves? If a position is legal, providing a sample game leading to that position is enough as a proof. However, proving that a position is illegal can be much more difficult. I suppose that for the majority of positions such proofs simply do not exist, but can a computer solve this problem? Are there AI engines capable of retrograde analysis?</p>
  
Tags: <engines><retrograde-analysis>
Title: Checking if a position is legal with a chess engine
ThreadText: # Checking if a position is legal with a chess engine
  
  (Asked by: username_0 on 2024-12-10)
  
  Are there chess engines that can automatically check with certainty if a given chess position is illegal, i.e. can't be reached from the starting position with legal moves? If a position is legal, providing a sample game leading to that position is enough as a proof. However, proving that a position is illegal can be much more difficult. I suppose that for the majority of positions such proofs simply do not exist, but can a computer solve this problem? Are there AI engines capable of retrograde analysis?
  
  **Tags:** engines, retrograde-analysis
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-12-10. Score: 0
  
  [(Duplicate?)](https://chess.stackexchange.com/questions/35602/which-methods-can-be-used-to-prove-that-a-position-is-illegal) Big NO. A whole genre of problem chess depends on this question, and the positions can be murderously difficult.
  There does exist software like Natch or Jacobi trying to give you a
  proof game for a position, but even those must throw the towel
  if it gets too complicated. At the moment, an experienced human will beat any AI when it comes to legality.
  
  > **Comments:**
  > **username_0**: Why duplicate? Do you have a reference to the same question already asked? Perhaps any references to where this question was discussed?  
  > **username_0**: I also heard about Retractor, Natch, and Euklide,  but they only try to prove that a position is legal and are useless in proving it illegal, as I understand. That's what my question was about.  
  > **username_0**: Why is the task of winning a chess game easier for an AI than the task of reaching a certain position?  
  > **username_2**: @username_0 the estimated game-tree complexity for chess is huge. It's impossible for a computer to build the tree to find a certain position.  
  > **username_1**: So is the forward tree :-) OP has a point there - it would be interesting if some AI could "learn" illegal positions. It must run in "intelligent" mode, since indeed running the back tree is impossible. TLDR: It hasn't been tried yet, it would be an interesting project.  
  
  ---
  
  