In this post we are implementing a Hidoku solver (Hidoku is yet another fine number puzzle) that uses a depth first search, branch cutting, limited (intelligent) successor generation and some automatic simplification. Usually, a Hidoku is a quadratic board consisting of n x n fields - but rectangular or other forms would be possible as well. With each Hidoku, some fields are already pre-filled with numbers at the beginning. The game goal is to fill in all other numbers so that an ascending number queue is built: each number has to be adjacent to it's successor, with adjacent meaning in an adjacent horizontal, vertical or diagonal field.
The checkerboard puzzle or draught board puzzle (also called Krazee Checkerboard Puzzle, Banzee Island checkerboard puzzle, Zebas puzzle, etc.) is a mutilated chessboard problem, which further is a tiling puzzle/dissection puzzle. Hence, the core problem is similar to the one of solving the well known Tangram, which some of you might be familiar with. The … Continue reading Draught board puzzle / checkerboard puzzle solver in Python
In the equation puzzle solver and the flower disk rotation puzzle we took a look at differences of solving problems in both Python and Prolog. In this followup post we look at Python vs Prolog again, but deal with a different problem: a Jodici solver. Jodici Jodici is a fun and intuitive number placement puzzle … Continue reading Jodici solver: Python vs Prolog
This post is a followup to the Equation puzzle solver: Python vs Prolog. We again compare Python and Prolog, but look at a different problem: a disk rotation puzzle. The flower disk rotation puzzle The flower disk rotation puzzle consists of 4 wooden, stacked disks. The disks are connected at their center via a pole, … Continue reading Flower disk rotation puzzle solver: Python vs Prolog
Recently some of my friends and colleagues asked me: how is the logic-declarative language Prolog (I've been playing around with it) comparable - or not comparable - to typical, more well known programming languages? This question made me curious how similar implementations in Prolog typically are to implementations in other, more well known programming languages. Hence, … Continue reading Equation puzzle solver: Python vs Prolog
Recently I needed a script to batch convert only those images amongst a large amount of images which fulfil certain criteria, namely of being exactly of a stated size. The script is based on ImageMagick's convert and basically takes an arbitrary amount of convert parameters. I personally use this script to automatically reduce size and … Continue reading convertconditional: convert an image if it fulfills certain conditions