Capsule Puzzles


How do you solve these puzzles?


Place the digits 1 - 5 once in every black-bordered region. No two equal digits can touch each other, not even diagonally.

 

 Each of the black-bordered regions has 5 squares.  But each of those 5 squares has a unique number. 
And no number has an identical number in the 8 squares that are adjacent or diagonal to that number.

So where are the puzzles?

The puzzles can be here; help yourself -->  puzzles

But before you rush off, a word of warning.  The puzzles have filenames  "Capsules-NN-xxx.jpg".
 

The NN represents the number of squares that are filled in - these are the starting numbers.  
I've found that the fewer the initial squares, the more difficult the puzzle is.    In fact I believe that
some of these puzzles are so difficult that a human would need to take into account the whole
board in order to solve them.

The xxx in the filename is simply a random number so I can have numerous puzzles in the directory
with the same number of initial squares.

 

How did I create these puzzles?

These are all computer generated.  No human hand has twiddled with the puzzle.
Here's the algorithm I used.
1.  Start with a 10 X 10 grid (which will hold exactly 20 regions.)
2.  The regions made up of 5 squares have random shapes.  Only a few possibilities,
        for instance a "U" shape, aren't used because they have no solution.

3.  Try to place the variously shaped regions on the grid.  That may work, that may
        not - I have a mechanism for sniffing ahead to determine that we're heading
        toward a dead-end, and rejecting the potential solution.
4.  Once we have the regions on the grid, place ALL the final numbers on the grid
        such that they follow the rules of the game.  This gives us the "Final Solution."
5.  Determine what will be the starting numbers.  Remove all the other numbers from
        the puzzle. 
6.  Try to solve the puzzle again, but with the starting numbers in place.  Do this
        multiple times, ensuring each time that the solution obtained in this manner
        is identical to the "Final Solution."  Our goal here is to be confident that
        there is only one solution to the puzzle.  In fact, there are occasions where
        knowing that there's a unique solution is required for you to solve the puzzle.

I don't believe that puzzles with fewer than 15 starting numbers are
solvable by humans.  I would be delighted to learn otherwise.

I can be contacted at:   jb at cs dot wpi dot edu