I'm trying to implement a minesweeper solver using a SAT solver (sat4j) and I have a simple understanding of how they work. But one thing I can't figure out is how to represent the x+y+Z+....=2
for mines, since SAT solvers use Boolean input. Something such as in the table below:
| a | b | c | d | e | | f | 2 | g | 3 | h | | i | j | k | l | m |
You could write a+b+c+f+g+i+j+k = 2
and c+d+e+g+h+k+l+m= 3
.