Git Product home page Git Product logo

sat-problem's Introduction

SAT/SMT-Problem

Solving CNF & Latin-Square & Sudoku problem by Z3-Solver and Qiskit

Installation

Option: Using pip

cd SAT-Problem
pip install -r requirements.txt

Quick Start

Google Colab

I have provided corresponding jupyter notebooks for all problems, you can choose to execute on colab or locally, it is worth noting that if you choose to execute locally, you need to install the required packages in advance.

Below, the solver types that I have used to solve various problems types correspond to the relevant notebooks:

  • SAT_QC_CNF.ipynb : solving SAT problem through quantum circuit powered by quskit.
  • SAT_QC_Latin_Square.ipynb : solving latin square puzzles through quantum circuit powered by quskit.
  • SAT_QC_Sudoku.ipynb : solving sudoku puzzles through quantum circuit powered by quskit.
  • SAT_Z3_CNF.ipynb : solving SAT problem through Z3 solver.
  • SAT_Z3_Latin_Square.ipynb : solving latin square puzzles through modeling it to a SAT problem and solve it by Z3 solver.
  • SAT_Z3_Sudoku.ipynb : solving sudoku puzzles through modeling it to a SAT problem and solve it by Z3 solver.
  • SMT_Z3_Latin_Square.ipynb : solving latin square puzzles through modeling it to a SMT problem and solve it by Z3 solver.
  • SMT_Z3_Sudoku.ipynb : solving sudoku puzzles through modeling it to a SMT problem and solve it by Z3 solver.

Scripts

Example scripts for evaluating all kinds of problems through different solving techniques can be found in scripts/. You'll need to change the paths to point to wherever the datasets are located. Gin configuration files for the problem model and some ablations can be found in configs/.

Details of the inner workings of Dataset

All files used as problem descriptions are placed in the datasets folder. The file with the extension dimacs is used to describe the cnf problem. The file with the extension txt represents the initial puzzle setting of latin square / sudoku.

If you want to add other The file name of the problem file must be written according to the above description.

sat-problem's People

Contributors

murumura avatar

Watchers

 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.