β
ππΒ·
My CSP solver is currently working for these puzzle types: Slitherlink Sudoku Shikaku Calcudoku Pure Loop Masyu Minesweeper
β
β
ππΒ·
I've been using the book Brain Training the Japanese Way prolific puzzle book author Dr. Gareth Moore. There are 16 different types of logic pencil puzzles with 12
β
puzzles of each in increasing size and difficulty. My solver is sometimes slow, but now handles all 12 Shikaku puzzles from βBTJWβ.
β
π
β
ππΒ·
One project I've been working on a while is Sapphire, the top level of my βlanguage stackβ. The intent is to learn about Symbolic Logic with programming, and I
π¦
β
started it now years ago when I was doing the exercises in Mathematical Logic through Python and started up my own version with Unicode operators like βββ, ββ§β and
π
β
ββ¨β.
π
β
β
Currently, I can describe simple, finite Constraint Satisfaction Problems and I've been working on a solver that mixes symbolic operations with constraint propogation
β
over variables of finite domain. It can solve 9x9 Sudoku and small Slitherlink puzzles, as well as a few others, but it's still a kludge.
β
β
I support much of the same syntax in my Python based language I've implemented the solver in, but I'm not breezing through optimization. I'm working on getting things
β°
down to the C level while playing around with all the rest of it.
π―
/
ππΒ·
I usually start checking for updates on Raf Peeters Smart Games puzzle design site in January, but I just got around to checking it out after finding IQ Quub and IQ
β
β°
At the beginning of every year, previews and design discussions are posted of fantastic new challenges to work through and add to your collection!
β
ππΒ·
Using summation for Slitherlink and Killer Sudoku is a natural choice, but Peano's Axioms are insufficient to define the integers using only first order logic. I want
β
to dig into the theoretical concerns, but I'm going to defer them for now while I try to get some functionality working.
β
β
ππΒ·
I'm a focused on solving logic pencil puzzles as Constraint Satisfaction Problems in part because I'd like to try my hand at a puzzle generator. Perhaps my ambition
β
to share a monthly or even weekly sheet of puzzles at my local puzzle & game store is misguided, but for now it's on my hopes and dreams list.
β
β
ππΒ·
To even solve the trivial Slitherlink Puzzle (a 1Γ1 puzzle with a single β4β) semi-symbolically, I'm going to have to up my constraint handling. My plan was to
β
support constraint expressions - special objects which give some information about an otherwise indeterminate value.
β
β
My choice was to wrap a logical formula (another expression) using the variable β_β to represent the constraint expression. This could get unweildy, so in practice I
β
have kept them simple enough to be useful for my current, puzzle-solving purposes.
π
β
π
β
As an example, if x is β_β{1 2}β and y is β_β{2 7}β we can deduce βx+yβ will satisfy the constraint β_β{3 4 8 9}βand we could also deduce from βx=yβ that βx=y=2β. The
π
β
pigeonholer I implemented to solve Sudoku puzzles in βͺSilverβ« starts with β_β{1β―9}β for blank squares and 27 9-way not-equal expressions using an n-ary βΒ¬=β operator.
π¦
β
The handling is not Sudoku specific - I'm hoping it will work for a few more puzzles before I tidy things up.
π
β
π£
β
Which brings me back to the start - I didn't implement constraint expressions properly, and now that I'm counting the number of edges around a square that are on the
πͺ
β
path, I have to do at least some tidying.
β
β
puzzles with formulas defining 10 different puzzle types. Nikoli, the company that popularized βNumber Placeβ puzzles under the Japanese trademark βSudokuβ, publishes
β
collections in Japan and describes each on their website:
β
β
β
As I get my βͺSilverβ« Solver working on each, I'll post my βͺSapphireβ« definitions.
β
β
ππΒ·
I started on a formulation of Slitherlink rules in βͺSapphireβ«. Connectivity, as a pairwise relation could be easily satisfied by being true for any vertices that are
β
connected to anything. I ended up defining a distance function with a special value (rather than a distinct relation) for βnot connectedβ. In the next day or two,
β°
I'll see how βͺSilverβ« does trying to find a satisfying model (aka solution).