Skip to content

skeeperloyaltie/DMACS-CNF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Puzzle Solver

This code is a puzzle solver that generates a Boolean formula in DIMACS-CNF (Conjunctive Normal Form) format from a puzzle input and uses a SAT (Boolean Satisfiability) solver to find a solution to the puzzle.

Usage

To use the puzzle solver, define the puzzle input and pass it as an argument to the generate_cnf function, along with the value of n:

Define the puzzle input

puzzle = { "n": 3, "black": [(0, 0), (1, 1)], "white": [(2, 0)] }

Generate the DIMACS-CNF formula for the puzzle

cnf = generate_cnf(puzzle, puzzle["n"])

Requirements

This code requires Python 3.x and the Pygame module to run. To install Pygame, run the following command:

pip install pygame

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages