I'm curious if anyone has tried solving Slitherlink puzzles (or puzzles in the same family, such as Masyu) using or-tools? Is it even possible, using the current implementation?
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Am I correct in thinking that the extra logic you added for corners is a heuristic to speed solving, but not strictly necessary to find a solution?Jim
--
I'm attempting to port the C++ code to Python for readability. Have all working but the Hamiltonian path.Is it possible to implement the constraint callback used for single-loop detection in Python? I haven't found any Python examples that pass callback functions to the solver.
for y in range(height):
row = [h_arcs[x][y] for x in xrange(width+1)]
solver.Add( solver.Sum(row) % 2 == 0 )
for x in range(width):
column = [v_arcs[y][x] for y in xrange(height+1)]
solver.Add( solver.Sum(column) % 2 == 0 )