Skip to content

Instantly share code, notes, and snippets.

@morgoth1145
morgoth1145 / picross-solver.py
Created December 12, 2023 06:02
Python Picross solver
import functools
import itertools
import operator
@functools.lru_cache(maxsize=None)
def generate_theories(constraint, length):
if 0 == len(constraint):
return [(False,) * length]
excess = length - len(constraint) + 1 - sum(constraint)
theories = []

Keybase proof

I hereby claim:

  • I am morgoth1145 on github.
  • I am morgoth (https://keybase.io/morgoth) on keybase.
  • I have a public key ASCrW0lHxPMOczaxdOeN-OeGisdW8c_t6JlmPxrT5S8VqQo

To claim this, I am signing this object: