Giter Site home page Giter Site logo

z3-picross-solver's Introduction

Z3 Picross Solver

Usage

z3-picross-solver [-h] [--margin MARGIN] problem_file

or

python -m picross_solver.core [-h] [--margin MARGIN] problem_file

Install

pip install .

Demo

❯ z3-picross-solver ./sample_problems/wikipedia-8x8.yaml
[+] Successfully solved the problem.
        2 1 1 2
        1 1 1 1 3 2
    4 6 2 1 1 2 2 1
  4 □ □ ■ ■ ■ ■ □ □
2 2 □ ■ ■ □ □ ■ ■ □
2 2 ■ ■ □ □ □ □ ■ ■
  8 ■ ■ ■ ■ ■ ■ ■ ■
  2 ■ ■ □ □ □ □ □ □
2 2 ■ ■ □ □ □ □ ■ ■
2 2 □ ■ ■ □ □ ■ ■ □
  4 □ □ ■ ■ ■ ■ □ □
❯ z3-picross-solver --margin 1 ./sample_problems/wikipedia-20x20.yaml
[+] Successfully solved the problem.
                      1 1
                      1 1   3   3
                  3 2 1 3 2 3 5 1 2 3   2 2
            1 2 2 1 1 2 1 6 9 3 2 1 3 2 1 2 2
          2 2 3 3 1 1 2 3 4 1 2 2 7 2 4 2 1 2 1 1
        3 □ □ □ □ □ □ □ □ □ □ ■ ■ ■ □ □ □ □ □ □ □
        5 □ □ □ □ □ □ □ □ □ ■ ■ ■ ■ ■ □ □ □ □ □ □
      3 1 □ □ □ □ □ □ □ □ □ ■ ■ ■ □ ■ □ □ □ □ □ □
      2 1 □ □ □ □ □ □ □ □ □ ■ ■ □ □ ■ □ □ □ □ □ □
    3 3 4 □ □ □ □ □ □ ■ ■ ■ □ ■ ■ ■ □ ■ ■ ■ ■ □ □
    2 2 7 □ □ □ □ ■ ■ □ □ ■ ■ □ □ □ ■ ■ ■ ■ ■ ■ ■
    6 1 1 □ □ ■ ■ ■ ■ ■ ■ □ ■ □ □ □ ■ □ □ □ □ □ □
    4 2 2 □ ■ ■ ■ ■ □ □ □ ■ ■ □ □ ■ ■ □ □ □ □ □ □
      1 1 □ □ □ □ □ □ □ □ ■ □ □ □ ■ □ □ □ □ □ □ □
      3 1 □ □ □ □ □ □ □ ■ ■ ■ □ □ ■ □ □ □ □ □ □ □
        6 □ □ □ □ □ □ □ ■ ■ ■ ■ ■ ■ □ □ □ □ □ □ □
      2 7 □ ■ ■ □ □ □ ■ ■ ■ ■ ■ ■ ■ □ □ □ □ □ □ □
    6 3 1 ■ ■ ■ ■ ■ ■ □ □ ■ ■ ■ □ ■ □ □ □ □ □ □ □
1 2 2 1 1 ■ □ ■ ■ □ □ ■ ■ □ ■ □ □ ■ □ □ □ □ □ □ □
  4 1 1 3 □ □ □ ■ ■ ■ ■ □ □ ■ □ ■ □ □ ■ ■ ■ □ □ □
    4 2 2 □ □ □ □ □ □ □ □ ■ ■ ■ ■ □ ■ ■ □ ■ ■ □ □
    3 3 1 □ □ □ □ □ □ □ □ ■ ■ ■ □ □ ■ ■ ■ □ ■ □ □
      3 3 □ □ □ □ □ □ □ ■ ■ ■ □ □ □ □ ■ ■ ■ □ □ □
        3 □ □ □ □ □ □ ■ ■ ■ □ □ □ □ □ □ □ □ □ □ □
      2 1 □ □ □ □ □ □ ■ ■ □ ■ □ □ □ □ □ □ □ □ □ □
❯ z3-picross-solver --margin 2 ./sample_problems/wikipedia-30x20.yaml
[+] Successfully solved the problem.
                                                               1
                              2  1     1  2  3  6  8  1  1     4  6  4  2  1     1  1
            1  1  2  4  7  9  8  8  8  9  7  4  4  5  11 7  8  8  8  7  4  4  5  4  5  7  5  3  1  1
8  7  5  7  ■  ■  ■  ■  ■  ■  ■  ■  □  ■  ■  ■  ■  ■  ■  ■  □  ■  ■  ■  ■  ■  □  ■  ■  ■  ■  ■  ■  ■
5  4  3  3  □  □  ■  ■  ■  ■  ■  □  □  □  ■  ■  ■  ■  □  □  □  □  ■  ■  ■  □  □  □  □  ■  ■  ■  □  □
3  3  2  3  □  □  □  ■  ■  ■  □  □  □  □  □  ■  ■  ■  □  □  □  □  ■  ■  □  □  □  □  □  ■  ■  ■  □  □
4  3  2  2  □  □  □  ■  ■  ■  ■  □  □  □  □  □  ■  ■  ■  □  □  □  ■  ■  □  □  □  □  □  ■  ■  □  □  □
3  3  2  2  □  □  □  □  ■  ■  ■  □  □  □  □  □  ■  ■  ■  □  □  ■  ■  □  □  □  □  □  □  ■  ■  □  □  □
3  4  2  2  □  □  □  □  ■  ■  ■  □  □  □  □  □  ■  ■  ■  ■  □  ■  ■  □  □  □  □  □  ■  ■  □  □  □  □
   4  5  2  □  □  □  □  ■  ■  ■  ■  □  □  □  □  □  ■  ■  ■  ■  ■  □  □  □  □  □  □  ■  ■  □  □  □  □
   3  5  1  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  ■  ■  ■  ■  ■  □  □  □  □  □  □  ■  □  □  □  □  □
   4  3  2  □  □  □  □  □  ■  ■  ■  ■  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  □  ■  ■  □  □  □  □  □
   3  4  2  □  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  ■  ■  ■  ■  □  □  □  □  □  ■  ■  □  □  □  □  □
   4  4  2  □  □  □  □  □  □  ■  ■  ■  ■  □  □  □  □  ■  ■  ■  ■  □  □  □  □  ■  ■  □  □  □  □  □  □
   3  6  2  □  □  □  □  □  □  □  ■  ■  ■  □  □  □  ■  ■  ■  ■  ■  ■  □  □  □  ■  ■  □  □  □  □  □  □
3  2  3  1  □  □  □  □  □  □  □  ■  ■  ■  □  □  □  ■  ■  □  ■  ■  ■  □  □  □  ■  □  □  □  □  □  □  □
4  3  4  2  □  □  □  □  □  □  □  ■  ■  ■  ■  □  ■  ■  ■  □  ■  ■  ■  ■  □  ■  ■  □  □  □  □  □  □  □
3  2  3  2  □  □  □  □  □  □  □  □  ■  ■  ■  □  ■  ■  □  □  □  ■  ■  ■  □  ■  ■  □  □  □  □  □  □  □
      6  5  □  □  □  □  □  □  □  □  ■  ■  ■  ■  ■  ■  □  □  □  ■  ■  ■  ■  ■  □  □  □  □  □  □  □  □
      4  5  □  □  □  □  □  □  □  □  □  ■  ■  ■  ■  □  □  □  □  ■  ■  ■  ■  ■  □  □  □  □  □  □  □  □
      3  3  □  □  □  □  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  □  □  □  □
      3  3  □  □  □  □  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  □  ■  ■  ■  □  □  □  □  □  □  □  □  □
      1  1  □  □  □  □  □  □  □  □  □  □  ■  □  □  □  □  □  □  □  □  ■  □  □  □  □  □  □  □  □  □  □

z3-picross-solver's People

Contributors

ommadawn46 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.