title: Finding a path through vertices in a graph with SAT Solving in Python
body: <p>Essentially what I am trying to do is find a path from v1 to v2 on a graph but some nodes are coloured and we can't visit them.</p>
  <p>I understand the constraints but the part I am really having a problem with is understanding how to add the possible moves to the constraints.</p>
  <p>If I set up the booleans in this way</p>
  <pre><code>nodes = [Int('&quot;n%i_%i&quot; % (i, j)) for i in range(len(G))]
  
  moves = []
  for i in range(len(G)):
       moves += ?
  </code></pre>
  <p>The condition would be that the nodes are beside each other so i = i and j = j +1  (or i = i +1 and j = j) and that the node is allowed to be visited so path=True, which is a feature of the graph. So for example G[i][j] == True.</p>
  <p>Would I use something like (or(And(nodes are beside each other), (G[i][j] == True)))
  And how can I express the nodes are beside each other?</p>
  <p>Thank you!!</p>