title: Racket - Peg Solitaire cannot reach solution
body: <p>I am having issues with a Racket program I have to write. We are using the Intermediate Student with Lambda language, and can use anything included in that. My assignment is to make a form of Peg Solitaire that displays a solution as a slideshow once the program figures out the solution (This code was given in the instructions). My problem is that my program seems to either endlessly loop or it just is not able to find a pathway to the solution based on the board. We were given the function <code>(find-route initial-state neighbours solved?)</code> with this contract:</p>
  
  <p><code>find-route: X (X -&gt; (listof X)) (X -&gt; Bool) -&gt; (anyof false (listof X))</code></p>
  
  <p>It will produces a sequence of states until the solution.</p>
  
  <p>I am calling on it using this function:</p>
  
  <p><code>(define (solitaire board state solution)
    (find-route state (make-neighbours board) (make-solved? solution)))</code></p>
  
  <p>Where <code>make-neighbours</code> is a working function that produces every possible move in a given state (I have tested this function extensively, it doesn't appear to be the problem, but it is very long, so I am hesitant to copy/paste it). Additionally, <code>make-solved?</code> is also a working function that generates a function that determines if a given state is a solution.</p>
  
  <p>I think the issue is in <code>solitaire</code> but I can't seem to figure out what's wrong. If there's any extra information that you need let me know.</p>