Random Sudoku
@paulspages.co.uk

Custom puzzle layouts 

Custom layouts let you design a pattern of starting squares, then have a puzzle generated to fit it.

FIRST, THE WARNINGS!

Generating a puzzle for a custom layout can take a very long time (it depends on the layout). Sometimes it will not be possible to generate a puzzle for a particular layout.

Generating puzzles places a high demand on your computer's processor. In extreme cases, running a computer at very high processor utilisation for long periods can cause overheating and damage to the processor, especially if it has been "overclocked" to make it run faster than the manufacturer's intended speed.

You use the custom layout generator entirely at your own risk.

OK, that's the warnings done with!

(If you've come here direct from a search engine, click here to see the main Sudoku page)
 

How to design a custom layout.
Saving and importing layouts.
Using an existing puzzle as a layout for other puzzles.
Why can't puzzles be generated from some layouts?
 

How to design a custom layout.

1. If you want to start with an empty grid, press 'Clear Puzzle' (under 'Type your own puzzle').

2. Mark the starting squares for your layout, like this:

Mark a square by typing a number into it. I've used 1s here, but any number from 1 to 9 will do. (Note - if you're using an alternative symbol set, e.g. 'ABCDEFGHI',  then use of of those symbols, e.g. A).

You can edit the layout by deleting and typing numbers (my example rather immodestly features my own initials!).

3. Press 'Custom Puzzle':

The page will attempt to generate a single-solution puzzle based on your layout of starting squares:
 

 

Two tips for designing custom layouts.

  • Get a good spread of starting squares around the grid.
    This is the most important tip. In this example there are starting squares in all the corners and in the central areas too. If you bunch your squares together, leaving acres of 'white space' elsewhere, then you probably won't get a puzzle.
     

  • To start with, use a lot of starting squares.
    The more squares in your layout, the better the chances of success. Start out with 30 or more squares (the example above has 31), then work down into the 20s as your skill improves. The absolute minimum is 19 starting squares - if you can design a successful 19-square grid, let me know!

     

Saving and importing layouts.

To save a layout:

1. Press

2. The Import/Export window will open. Press 'Export Puzzle', and the layout will appear in the text box, like this:

3. Select the text (under Windows, click in the box and do Ctrl-A) then copy it to the clipboard (Ctrl-C). You can now paste it into a text editor, email it to a friend, etc.

To import a layout:

1. Press

2. The Import/Export window will open.  Make sure 'Import as layout' is checked, like this:

3. Paste your layout into the text area, and press 'Import Puzzle':

Note - you can import any puzzle as a layout, i.e. not just ones that are laid out with all 1s. If you import a 'real' puzzle as a layout, it will be converted to all 1s, like the example in 'How to design a custom layout'.

 

Using an existing puzzle as a layout for other puzzles.

If you've solved a puzzle and you'd like to try another based on the same layout (but with different numbers!), do this:

1. Press to clear the puzzle back to its starting squares.

2. Press .

TIP - to edit an existing puzzle's layout, export it then import it as a layout (see details above). This will let you delete starting squares from the original layout.



Why does generating take so long, and why can't puzzles be generated from some layouts?

Because the puzzle generator at paulspages only creates single-solution puzzles. It's much easier to create puzzles that have more than one solution, but these require guesswork to solve, and aren't considered to be 'proper' sudokus.

A sudoku puzzle is a network of inter-dependencies. The numbers in the starting squares interact along the rows and columns to limit the possible values for other squares (for details see 'Crosshatching' in how to solve sudoku). Finding a set of starting-square numbers that limits the rest of the puzzle to just one solution is a tricky business.

In the symmetrical layouts used by the 'Random Puzzle' button the starting squares are spread fairly evenly around the grid. This means that the starting numbers interact with lots of empty squares, making it more likely that a set can be found which restricts the puzzle to a single solution. The fewer starting squares there are, the harder it is to find the set - and the harder it tends to be to solve the puzzle.

If the starting squares in a layout are unevenly distributed, then it's much harder to find a starting set that leads to just one solution - and it may not be possible at all.

 

© Paul Stephens, 2005. All rights reserved.