One of my favorite books is the "The Chess Mysteries of Sherlock Holmes" which describes a technique called retrograde analysis
https://www.amazon.com/Chess-Mysteries-Sherlock-Holmes-Recre...
https://www.amazon.com/Chess-Mysteries-Sherlock-Holmes-Recre...