Blog  |   Puzzles  |   Books  |   About

Systematic Sudoku

March 19th, 2013

John Welch writes an excellent blog for advanced Sudoku Solvers called Systematic Sudoku.

Every Tuesday he posts a new detailed analysis of a tough puzzle, one of his goals being to understand the comparative difficulties of various sudoku publications. Sudoku difficulty is hard to measure and describe, and different publications (including this website) use different metrics and language to describe puzzle difficulty. How do the “Super Tough” puzzles that I offer here compare to the “Diabolical” puzzles you might find in your local newspaper? John Welch aims to find out.

Today, I had the honor of seeing John review a puzzle from this website: Namely Super Tough Volume 5, Book 1, Puzzle 5. If you’re new to John’s website, you will probably find his notation system, reminiscent of algebraic chess notation, hard to understand. He explains the notation elsewhere on his blog. I suggest reading the introductory links he has posted at the top of his blog, as well as some of his earlier posts on easier puzzles, to help get a feel for his lingo.

Today’s review is the first of a series, and you’ll see a few follow up reviews of Krazydad puzzles in the coming weeks. I, for one, am looking forward to see what John has in store for the next few Tuesdays!

Link: Systematic Sudoku

The mark of the unicorn

December 8th, 2012

It’s been a long while since I’ve posted, but hopefully, there are still one or two of you out there who understand the value of a good RSS feed. I’m back to write about a book I’m enjoying, with the following cryptic title:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

If this line of BASIC code already means something to you, then you are probably going to enjoy the book, go buy a copy right now, the proceeds go to a great charity. If the title looks like a bizarre and useless incantation (it is!), read on.

The book is an exploration of its title: A one-line BASIC program that was intended to run on an early 80s Commodore 64 computer. The program produces the maze-like pattern shown on the book’s cover, and its inner sleeves.

Each chapter explores a different facet of this program, and by doing so it covers an incredible amount of ground. There is a chapter on mazes, a chapter on randomness, a chapter on grids, a chapter on the BASIC language, and so on. If you think this is a lot of pages to devote to a one-line computer program, you are mistaken. This is not a long book, and it barely scratches the surface of each of the diverse subjects it touches upon, from Falcon looms and Truchet tiles, to 8-bit computers and flying toasters. There have been many books written about mazes, and whole careers built upon the study of randomness. Here each of these subject gets just a little chapter.

It is the surprising depth and far-reaching ramifications of little useless programs like 10 PRINT that got me into this game, back in the early 80s. I had a Timex Sinclair, and a VIC 20, both purchased at K-Mart, and I fondly remember writing one-liners like these, staring into the glowing phosphors of a little television, until I could barely keep my eyes open in the early morning light. During the months that I manipulated those phosphors, the symbols they represented were manipulating me. My fevered brain underwent more intellectual growth during that period than any time in my life since my early childhood.

The book was written by a team of what my colleagues call “unicorns” – cross-disciplinary people who bridge the worlds of creativity and technology. I was expecting a set of disconnected essays from different voices, but I didn’t get it. The authors used a Wiki to collaborate, and the book feels as if it were written by a single, extremely erudite, polymath author. The chapters cover separate subjects, but the whole is very much connected, helped by it’s extremely constrained subject – that single one line program. Although the book necessarily describes some technical subjects, it is written for a lay audience.

I think of myself as a unicorn. There are a lot of us out there, but we are not as common as I would like. My feeling is that unicorns provide an important bridge between the humanities and the sciences, and that unicorn skills should be nurtured. All of my professional career, I have obsessed over a set of subjects which were, until recently, not given sufficient attention in the computer science press.

For example, I’ve always been fascinated by the RND() function in the BASIC language – I initially thought it was the most important feature of the language. For a long time, the amount of joy I derived from writing software was proportional to the amount that the features depended on randomness. There is a relationship between the RND() function and the perception of utility. To me, programs that are useful, and that do not require randomness, are useful, but boring — they fill out your tax return and monitor patients in hospitals. The RND() function is like a firehose from God, and the programs that use it are useless, but fun — they are games, and simulations, and art.

So, as an auto-didact (as many unicorns are), I was surprised that in programming texts that describe programming languages, the RND() (or rand() or random()) feature is always given such brief, almost dismissive treatment. I’ve even met programmers who (gasp!) have never used it! Meanwhile outside of programming language texts, the topic is barely discussed. It’s not a topic that non-programmers have been exposed to. To me, it’s the first thing you should learn as a neophyte programmer — it opens up programming in a big way. Yet so many computer science students are not exposed to it early enough – instead, they are compelled to write functions which factor numbers and store fractions, and do other numeric manipulations. Many programmers have thrived in this sterile environment, but it doesn’t suit unicorns. For us, making random poetry and assembling Truchet tiles is a much better follow up to “Hello, World.”

The only way to really appreciate the wonder of what you can do with RND() is to write some code. Immerse yourself in it. Play with it. It’s programming as play, rather than programming as work. And it’s more fun to play with something when it’s easy — when there are virtually no barriers to entry. The one line BASIC program was my E-ticket to this world of wonder. Useless one line BASIC programs are a kind of activity that used to be called “recreational programming”. In addition to the C64 magazines discussed in the book, there used to be a wonderful recreational programming column in Scientific American by A. K. Dewdney (I was a little late for Martin Gardner); half my career owes its existence to these publications, and especially Dewdney’s column – it was my principle reference.

This same activity today tends to be called “creative coding”, and we’re no longer using BASIC, but a different set of tools: Processing, Cinder, Open Frameworks, Javascript, Node, whatever floats your boat. And some of the tools, most notably Processing, have a low enough barrier to entry that we can almost (but not quite) recreate the experience of 10 PRINT.

Another feature of unicorns is that they don’t mind using programming techniques that are no longer on the list of officially approved methodologies by the software engineering orthodoxy. Incantations are only a means to an end. We are not in the business of making incantations, we are in the business of making universes, using incantations as a tool. 10 PRINT, for example, contains a GOTO command. GOTO, of course, has been the bane of readable code almost since the second edition of “The Elements of Style”, and the BASIC language itself sits on a lowly plain of derision slightly above COBOL. The book also addresses the unfortunate gulf between recreational coders and the computer science establishment.

Ultimately, it is the love of RND() that separates this particular creative coder from your dyed-in-the-wool computer science nerd. At this late stage in my creative programming career, I no longer make as much use of RND() – I’ve discovered new ways to achieve the same important thing it gave me: complex and beautiful behavior with very little effort. The holy grail of the unicorn is the perfect one-line program. The one-line program that succeeds in recreating the universe, and making its own DNA, and breeding with itself so that a new sub-universe is born. This is our philosopher’s stone.

What the book helped me to remember is that joyful process of trying to create the universe with a line of code. Each time, I would get something interesting, like a labyrinth or a kaleidoscope; but I wouldn’t quite get that ultimate spark. So I would try again, never quite thinking that I had succeeded in creating the universe I sought. The book shows that the universe was already there — like the grains in a Mandelbrot filament, each of those little programs already contains a little universe, you just need to pay attention. Zoom in the right direction, and you’ll see it.

Unfortunately, one line programs, like unicorns, have become an endangered species. Those of us who remember one line BASIC despair at the new hurdles that have been raised, which prevent young people from discovering the joys of the random number generator. When we expunged GOTOs from the reserved words of all the new programming languages, when we made our code structured, object-oriented and useable for large complex software engineering projects, we also made it much harder for kids and teens to use those same technologies to explore the imaginary landscape. If the first programming language I had been exposed to was Java, I think I might have ended up in a different profession entirely.

The proceeds of this book go to PLAYPOWER – a charity which aims to give disadvantaged kids access to extremely cheap computers that have a one line BASIC. This seems like a wonderful thing. Damn, I want one of those computers too!

I miss my VIC 20.

Get started with Jigsaw Sudoku

September 7th, 2012

I recently added a new puzzle variety to Krazydad, called Jigsaw Sudokus. These are very similar to normal Sudokus. Like those puzzles, each row and column contain all the digits 1 through 9. However, these puzzles are missing the 3×3 blocks found in regular Sudoku. Instead, the puzzles are divided into a set of irregular “jigsaw” pieces – each of which also contains the digits 1 through 9.

In my collection, the Jigsaw layouts are always different, so each puzzle offers a unique challenge which you won’t find in regular Sudoku.

Because these puzzles are a little different, I thought I’d offer a short tutorial to help you get started. I’ll start by solving just a couple squares of Puzzle #3 from book 1 of the Tough puzzles.

In particular, I want to demonstrate the one unique strategy that these puzzles require, apart from the regular Sudoku strategy you already know. This is called the “Law of Leftovers”, or the “Rule of Overlaps”. Take a look at the puzzle, below.

You’ll see that I’m interested in the jigsaw piece on the lower left, which I’ve colored mostly in blue. When you compare this piece to the first column, you’ll see that 3 cells stick out on the bottom (they contain a 3, a 6, and blank). I call these cells “outies”. There are also three cells left over at the top of the column (“innies”), which contain two blanks, and an 8. I’ve colored both sets of cells pink.

What may, or may not be obvious to you, is that the innies and the outies must contain the same set of 3 numbers. Why? The jigsaw piece must contain the numbers 1-9. The first column must also contain the numbers 1-9. The 3 outies must contain all the numbers from 1-9 which don’t appear in blue, and the 3 innies must also contain the numbers from 1-9 which don’t appear in blue. These three numbers must be the same, in both cases.

Since the innies contain an 8, the outies must also contain an 8. Since the outies have only one blank, and no other 8s, the blank on the bottom must be the 8. Similarly, the two blanks in the innies must contain, collectively, 3 and 6.

This takes us to step 2 (next picture).

Here we have another case of innies and outies. In this case it involves two jigsaw pieces, which overlap with the two columns on the right. The Law of Leftovers can work with any number of puzzle pieces, and any number of rows/columns, as long as the number of pieces, and the number of columns are the same. Once again, the outies on the left, in purple, must be identical to the innies, in pink.

This means the one blank cell in the outies, must be 2, and the two blanks in the innies must be, collectively, 3 and 4. This brings us to step 3, shown below.

As I already mentioned, you can use the Law of Leftovers with any number of rows or columns, as long as the number of pieces you are overlapping is the same. Here I am overlapping 4 puzzle pieces with the top 4 rows. You’ll see that there is one outie, in purple, and one innie, in pink.

At this point, I don’t know what those two numbers are, but I know that they must be the same. This means that any constraints that apply to one cell must also apply to the other cell. Since I know that the innie, in the first column, can’t contain the numbers 1,2,3,4,5,6 or 8, I know that the outie also can’t contain those numbers. Thus I can narrow both cells down to the choices 7 and 9.

When solving these puzzles, I sometimes find it useful to leave known identical cells colored with the same color, which I’ll do here.

I’ll end the tutorial here, and give you a chance to find more outies and innies on your own.

I *do* want to mention that lately I’ve been doing these puzzles on an iPad, using the application UPAD. There are a few advantages to this method.

1) I get as many colored pencils and colored highlighters as I like, which is useful for jigsaw strategy,
as well as other advanced strategy.
2) If I make mistakes, I can erase/undo the colored markings easily. I can switch colors and do a few “what if” markings, then hit undo until I get back to the original color.
3) I can draw on each page of my books, and it leaves the drawings on each page intact.
4) No wasted paper/ink.
5) It still feels a lot like using pencil and paper, which I love – especially when I use a stylus.

Happy puzzling!

Graffiti Shroud

August 11th, 2012



If you combine a sufficiently large number of (uncorrelated) photos, and choose the images carefully, you can approximate any image you like.

This “Shroud of Turin” was made by carefully choosing 300 photographs from a larger set of 20,000 photographs of graffiti. All images come from Flickr and are Creative Commons licensed. The images are combined by adding the individual pixel values, so that each of the 300 photos contributes an equal amount to the final image.

You’ll notice an orange color that appears a few seconds into the video. This orange color is usually seen when combining uncorrelated photos. I blogged about this phenomenon a few years ago.

I wrote the software to produce this video in Processing.

Penrose Puzzle: Area 51

July 11th, 2012

This Penrose Slitherlink puzzle is inspired by David Millar’s “Area 51” puzzles, which you can find at The Griddle. The puzzle works like a regular Slitherlink puzzle, but with a few twists: The aliens must be kept inside the fence. The cacti must be kept outside the fence. The white circles indicate a straight line crossing.

Special thanks to David Millar, who drew the cacti and aliens.

Print the PDF

June Processing Workshops

June 4th, 2012

This month, I’ll be teaching two Processing workshops at CRASHspace, the awesome hacker space in Los Angeles. You can sign up for these classes in the CRASHspace store. This is a fundraiser for CRASHspace: all proceeds will go towards paying the rent and such. Each class is 4 hours long, and costs $60 ($40 for CRASHspace members).


Processing 101
Saturday June 16th, 1pm – 5pm

An introduction to the Processing language and development environment. Processing is an open-source language and development environment which is popular with designers, artists, and DIYers. It’s a great language for learning computer programming because of its simplicity and immediate visual rewards. You can use Processing to build a sketchbook of reusable code snippets for future projects.

This class will cover installation and introduce graphic programming techniques in Processing.

Students will learn

  • Basic vector drawing and color manipulation in Processing.
  • How to get images onto the screen.
  • How to effectively use randomness.
  • How to make an animated logo
  • How to make an animated particle system.

Flight Patterns by Aaron Koblin, © 2006
Data+Art in Processing
Saturday June 23rd, 1pm – 5pm

An introduction to using real-world data as an artistic medium in Processing. In this class, students will work with a variety of real-world data sources, and use this data to produce motion graphics, still images or music. The data used in the class includes

  • USGS earthquake records
  • An Astronomical database
  • English Literature
  • Twitter or other web services

Students will learn a variety of methods to map and render this data, including

  • How to control an animated image using multiple datapoints.
  • How to render maps and position items on a globe.
  • How to produce musical events from non-musical data.
  • Steganography – embed secret messages into images or music.

For both classes, students will need a Windows, Macintosh or Linux laptop. If you are very new to Processing, I suggest taking the first class before taking the second.

Chess Music at Handmade Music L.A. #3

May 6th, 2012


Next Saturday, I’ll demonstrate my musical chess system at the 3rd Annual Handmade Music L.A., at CRASH Space in Culver City.

There will be a number of other tinkerer/musicians there as well, showing innovative pieces of homemade music technology, including circuit bending, noisy circuits, repurposed video-games machines, and amplified motors. Hope you can join us! The event is Saturday May 12th, from 8pm until late. It’s free, although a 5$ donation to CRASH Space is suggested.

More Info

Solve Krazydad puzzles on an IPad with UPAD

April 16th, 2012

Lately, I’ve been solving Krazydad puzzles on an iPad, using my finger, or a stylus, rather than printing them out and solving with a pencil.

My iPad app of choice for printable puzzles is UPAD, a great little drawing app that works well with PDF files. It is available in both free and paid versions. The paid version, which I use, is $4.99. The Lite version limits the number of puzzles you can store to 5.

Using UPAD, I can store a collection of PDFs on my iPad, and draw on the individual pages using a variety of colors and pen sizes. There is also a highlighter, which is great for marking cells in Slitherlink puzzles. The Undo/Redo function makes it easy to try risky strategies and correct my mistakes. The different colors are great for more advanced Sudoku strategies.

To load a puzzle into UPAD, just visit the Krazydad website (or any other website which offers PDF puzzles, such as The Griddle) in the web browser on your iPad. Click on the puzzle book you wish to start solving. When the puzzle loads, a button will be available on the upper right that says “Open in UPAD”. Click this button. The UPAD app will launch and load the puzzle file. Then you can start drawing on the puzzle pages.

You only need to import the puzzle file once. Later, when you re-launch UPAD, all the puzzles you’ve previously opened will still be there, unless you’ve deleted them.

You’ll find it takes a little trial and error to get used to using UPAD, but once you do, it is very rewarding, and it will save you from wasting ink and paper. The first problem you’ll encounter is that the puzzle is small, and your finger is enormous. You can work around this by zooming into the puzzle, using a “pinch out” gesture. For larger puzzles, I find myself zooming in and out quite a lot.

UPAD is even better with a stylus. You’ll find a number of cheap stylus options on Amazon.

Here’s a tip of the hat to David Millar for introducing me to this cool app.

Floret Slitherlink

April 14th, 2012

Here are six new Slitherlink puzzles for you to try. This puzzle is based on Floret Pentagonal Tiling, which was suggested to me by Danny Sichel. The additional clue styles (ampersand and dollar sign) were inspired by David Millar’s excellent “Area 51” puzzles, from The Griddle.

Floret Slitherlink

Fill in some of the dotted line segments to form a meandering path that forms a single loop. The path does not cross itself, branch, or touch itself at corners. The numbers indicate how many line segments surround each cell. Empty cells may be surrounded by any number of line segments.

A dollar sign ($) indicates the cell is inside the loop. An ampersand (&) indicates the cell is outside the loop.

There is one unique solution, and you should be able to find it without guessing. You may find it helpful to mark segments that cannot be filled in. It also helps to highlight cells which are inside the loop.

Letters, I get letters

April 5th, 2012

Dear Krazydad,
My husband just started doing KenKen and really loves it. I have a question for you as most of your Inky puzzles seem to have this symbol in them: What does the symbol / mean?

Confused

Dear Confused,

The / symbol is used to mean division (as in 12/4 = 3). It means the same thing as รท, the division sign. I used the slash because the division symbol is easily confused with a plus sign at small font sizes.


Krazydad,

I must be dense, but I don’t understand the cheat sheet(candidate cage set)for the Killer Sudoku puzzles. Why are some
numbers in red? What do the exclamation points mean? Please advise!

Dora the Killer

Dear Dora,

The red ones with explanation points mean “all numbers except these ones”. I should fix those, as this is the second letter asking for clarity. :)


Krazydad,
I am having trouble getting to your puzzles to print. Every time i try I get a message that Internet Explorer has stopped working. Any comments or suggestions?
Printless

Dear Printless,

It sounds like the Adobe Reader plug-in, which IE uses to view and print PDF files, has stopped working.

I recommend that you reinstall Adobe reader. You can get a new copy on Adobe’s website (link).

If you can’t get Adobe Reader to stop crashing your browser, a workaround is to download the puzzles to your desktop, and view/print them there. To download a puzzle, right-click the link (likely the same link that is crashing your browser) and select Save-As from the menu that appears. Double-click on the PDF file that you’ve downloaded and print it when it opens.

Good luck, and let me know if you run into more trouble.


Hi Jim,

I wanted to contribute my praise and thanks for your site.

I work as the librarian in a maximum security federal prison in Canada, and there are many offenders here who have received printed out puzzles since I found your site. They are unable to pay for things like this, so finding Krazydad has been a Godsend.

There are several ways this helps here. First of all, decreasing idleness is an important contributing factor to prison security. I often provide them especially to men who are in segregation and may not have regular access to other humans, books, or television. If they are occupied, they can put in time without causing needless disruptions.
Secondly, for our older offenders, keeping the mind active (thereby contributing to overall health) can be very challenging in this setting, and puzzles help out a lot.

So thanks again, especially for providing your service free of charge to those who can’t pay, and keep up the good work!

Shh the Librarian

Dear Shh,

Wow, what a nice letter! I’ve gotten a few letters from spouses of inmates, but this is the first from someone working on the inside. I wish there was a way I could get more puzzles out to inmates in a more organized way. If you have any ideas, let me know.