Giter Club home page Giter Club logo

coloring-puzzle's Introduction

Coloring-Puzzle

Introduction

The CNF Satisfiability Problem (CNF-SAT) is a rendition of the Satisfiability Problem, where the Boolean equation is indicated in the Conjunctive Normal Form (CNF), that implies that it is a combination of statements, where a provision is a disjunction of literals, and an exacting is a variable or its invalidation.

This product of an AND of Ors helps us solve the problems once those have been encoded into Boolean logic. The solutions can be found impulsively by various algorithms and automatic solvers such as SAT solvers. These problems can be the n-queens problem, Sudoku puzzles, Einstein riddle, n-puzzles, Graeco-Latin squares...

Especially, the Coloring Puzzle belongs to that group of problems mentioned above. The puzzle needs filling with either green or red color and the number inside the cell corresponds to the number of green squares adjacent to that cell.

Given a matrix of size m×n, this problem will be solved by pySAT library, A* algorithm, brute-force algorithm and backtracking algorithm, all of these use the logical principles of generated CNFs.

The plan that we apply for this project about the Coloring Puzzle problem is first producing the CNFs by generating many cases on the paper. Subsequently, the team members start discussing and find how to sow the seeds of those CNFs as a premise for the algorithms behind.

Searching on google shows us the solution to this problem is similar to the game fill-a-pix. This helps us process those CNFs faster and ready to deal with the pySAT library (it is almost the same as solving the n-queens problem we used in the previous exercise).

From there, we extend the application of those CNFs to solve the Coloring Puzzle by other algorithms according to the requirements of the problem.

coloring-puzzle's People

Contributors

hmy2912 avatar

Forkers

minh-kop

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.