Solution uniqueness for Net. Can be disabled on request (but is
[sgt/puzzles] / puzzles.but
index be0a677..bf2601b 100644 (file)
@@ -18,6 +18,8 @@
 \cfg{ps-filename}{puzzles.ps}
 \cfg{pdf-filename}{puzzles.pdf}
 
+\define{by} \u00D7{x}
+
 This is a collection of small one-player puzzle games.
 
 \copyright This manual is copyright 2004 Simon Tatham. All rights
@@ -80,48 +82,149 @@ These actions are all available from the \I{Game menu}\q{Game} menu
 and via \I{keys}keyboard shortcuts, in addition to any game-specific
 actions.
 
+(On Mac OS X, to conform with local user interface standards, these
+actions are situated on the \I{File menu}\q{File} and \I{Edit
+menu}\q{Edit} menus instead.)
+
 \dt \ii\e{New game} (\q{N}, Ctrl+\q{N})
 
 \dd Starts a new game, with a random initial state.
 
-\dt \ii\e{Restart game} (\q{R})
+\dt \ii\e{Restart game}
 
-\dd Resets the current game to its initial state. Undo is lost.
+\dd Resets the current game to its initial state. (This can be undone.)
 
 \dt \ii\e{Undo} (\q{U}, Ctrl+\q{Z}, Ctrl+\q{_})
 
 \dd Undoes a single move. (You can undo moves back to the start of the
-game.)
+session.)
 
-\dt \ii\e{Redo} (Ctrl+\q{R})
+\dt \ii\e{Redo} (\q{R}, Ctrl+\q{R})
 
-\dd Redoes a previous undone move.
+\dd Redoes a previously undone move.
 
-\dt \I{exit}\ii\e{Quit} (\q{Q}, Ctrl+\q{Q})
+\dt \ii\e{Copy}
 
-\dd Closes the application entirely.
+\dd Copies the current state of your game to the clipboard in text
+format, so that you can paste it into (say) an e-mail client or a
+web message board if you're discussing the game with someone else.
+(Not all games support this feature.)
+
+\dt \ii\e{Solve}
+
+\dd Transforms the puzzle instantly into its solved state. For some
+games (Cube) this feature is not supported at all because it is of
+no particular use. For other games (such as Pattern), the solved
+state can be used to give you information, if you can't see how a
+solution can exist at all or you want to know where you made a
+mistake. For still other games (such as Sixteen), automatic solution
+tells you nothing about how to \e{get} to the solution, but it does
+provide a useful way to get there quickly so that you can experiment
+with set-piece moves and transformations.
+
+\lcont{
 
-\H{common-id} Recreating games with the \ii{game ID}
+Some games (such as Solo) are capable of solving a game ID you have
+typed in from elsewhere. Other games (such as Rectangles) cannot
+solve a game ID they didn't invent themself, but when they did
+invent the game ID they know what the solution is already. Still
+other games (Pattern) can solve \e{some} external game IDs, but only
+if they aren't too difficult.
 
-The \q{\i{Specific...}} option from the \I{Game menu}\q{Game} menu
-lets you see a short string (the \q{game ID}) that captures the
-initial state of the current game.
+The \q{Solve} command adds the solved state to the end of the undo
+chain for the puzzle. In other words, if you want to go back to
+solving it yourself after seeing the answer, you can just press Undo.
 
-The precise \I{ID format}format of the ID is specific to each game.
-It consists of two parts delimited by a colon (e.g., \c{c4x4:4F01,0});
-the first part encodes \i\e{parameters} (such as grid size), while the
-second part encodes a \i\e{seed}, which determines the \i{initial
-state} of the game within those parameters.
+}
 
-You can specify a new ID (or just a seed) here. Pressing \q{OK} starts
-a new game with the specified ID (whether you changed it or not).
-Pressing \q{Cancel} returns to the current game.
+\dt \I{exit}\ii\e{Quit} (\q{Q}, Ctrl+\q{Q})
 
-You can also use the game ID (or just the encoded parameters) as a
-\i{command line} argument; see \k{common-cmdline} for more detail.
+\dd Closes the application entirely.
 
-Game IDs are portable across platforms; you can use a game ID
-generated by the Windows version of a game on the Unix version, etc.
+\H{common-id} Specifying games with the \ii{game ID}
+
+There are two ways to save a game specification out of a puzzle and
+recreate it later, or recreate it in somebody else's copy of the
+same puzzle.
+
+The \q{\i{Specific}} and \q{\i{Random Seed}} options from the
+\I{Game menu}\q{Game} menu (or the \q{File} menu, on Mac OS X) each
+show a piece of text (a \q{game ID}) which is sufficient to
+reconstruct precisely the same game at a later date.
+
+You can enter either of these pieces of text back into the program
+(via the same \q{Specific} or \q{Random Seed} menu options) at a
+later point, and it will recreate the same game. You can also use
+either one as a \i{command line} argument (on Windows or Unix); see
+\k{common-cmdline} for more detail.
+
+The difference between the two forms is that a descriptive game ID
+is a literal \e{description} of the \i{initial state} of the game,
+whereas a random seed is just a piece of arbitrary text which was
+provided as input to the random number generator used to create the
+puzzle. This means that:
+
+\b Descriptive game IDs tend to be longer in many puzzles (although
+some, such as Cube (\k{cube}), only need very short descriptions).
+So a random seed is often a \e{quicker} way to note down the puzzle
+you're currently playing, or to tell it to somebody else so they can
+play the same one as you.
+
+\b Any text at all is a valid random seed. The automatically
+generated ones are fifteen-digit numbers, but anything will do; you
+can type in your full name, or a word you just made up, and a valid
+puzzle will be generated from it. This provides a way for two or
+more people to race to complete the same puzzle: you think of a
+random seed, then everybody types it in at the same time, and nobody
+has an advantage due to having seen the generated puzzle before
+anybody else.
+
+\b It is often possible to convert puzzles from other sources (such
+as \q{nonograms} or \q{sudoku} from newspapers) into descriptive
+game IDs suitable for use with these programs.
+
+\b Random seeds are not guaranteed to produce the same result if you
+use them with a different \i\e{version} of the puzzle program. This
+is because the generation algorithm might have been improved or
+modified in later versions of the code, and will therefore produce a
+different result when given the same sequence of random numbers. Use
+a descriptive game ID if you aren't sure that it will be used on the
+same version of the program as yours.
+
+\lcont{(Use the \q{About} menu option to find out the version number
+of the program. Programs with the same version number running on
+different platforms should still be random-seed compatible.)}
+
+\I{ID format}A descriptive game ID starts with a piece of text which
+encodes the \i\e{parameters} of the current game (such as grid
+size). Then there is a colon, and after that is the description of
+the game's initial state. A random seed starts with a similar string
+of parameters, but then it contains a hash sign followed by
+arbitrary data.
+
+If you enter a descriptive game ID, the program will not be able to
+show you the random seed which generated it, since it wasn't
+generated \e{from} a random seed. If you \e{enter} a random seed,
+however, the program will be able to show you the descriptive game
+ID derived from that random seed.
+
+Note that the game parameter strings are not always identical
+between the two forms. For some games, there will be parameter data
+provided with the random seed which is not included in the
+descriptive game ID. This is because that parameter information is
+only relevant when \e{generating} puzzle grids, and is not important
+when playing them. Thus, for example, the difficulty level in Solo
+(\k{solo}) is not mentioned in the descriptive game ID.
+
+These additional parameters are also not set permanently if you type
+in a game ID. For example, suppose you have Solo set to \q{Advanced}
+difficulty level, and then a friend wants your help with a
+\q{Trivial} puzzle; so the friend reads out a random seed specifying
+\q{Trivial} difficulty, and you type it in. The program will
+generate you the same \q{Trivial} grid which your friend was having
+trouble with, but once you have finished playing it, when you ask
+for a new game it will automatically go back to the \q{Advanced}
+difficulty which it was previously set on.
 
 \H{common-type} The \q{Type} menu
 
@@ -129,9 +232,10 @@ The \I{Type menu}\q{Type} menu, if present, may contain a list of
 \i{preset} game settings. Selecting one of these will start a new
 random game with the parameters specified.
 
-The \q{Type} menu may also contain a \q{\i{Custom...}} option which
-allows you to fine-tune game \i{parameters}. The parameters available
-are specific to each game and are described in the following sections.
+The \q{Type} menu may also contain a \q{\i{Custom}} option which
+allows you to fine-tune game \i{parameters}. The parameters
+available are specific to each game and are described in the
+following sections.
 
 \H{common-cmdline} Specifying game parameters on the \i{command line}
 
@@ -149,26 +253,31 @@ command line.
 
 The easiest way to do this is to set up the parameters you want
 using the \q{Type} menu (see \k{common-type}), and then to select
-\q{Specific} from the \q{Game} menu (see \k{common-id}). The text in
-the \q{Game ID} box will be composed of two parts, separated by a
-colon. The first of these parts represents the game parameters (the
-size of the playing area, for example, and anything else you set
-using the \q{Type} menu).
+\q{Random Seed} from the \q{Game} or \q{File} menu (see
+\k{common-id}). The text in the \q{Game ID} box will be composed of
+two parts, separated by a hash. The first of these parts represents
+the game parameters (the size of the playing area, for example, and
+anything else you set using the \q{Type} menu).
 
 If you run the game with just that parameter text on the command
 line, it will start up with the settings you specified.
 
 For example: if you run Cube (see \k{cube}), select \q{Octahedron}
 from the \q{Type} menu, and then go to the game ID selection, you
-will see a string of the form \cq{o2x2:911A81,10}. Take only the
-part before the colon (\cq{o2x2}), and start Cube with that text on
-the command line: \cq{cube o2x2}.
+will see a string of the form \cq{o2x2#338686542711620}. Take only
+the part before the hash (\cq{o2x2}), and start Cube with that text
+on the command line: \cq{cube o2x2}.
 
 If you copy the \e{entire} game ID on to the command line, the game
 will start up in the specific game that was described. This is
 occasionally a more convenient way to start a particular game ID
 than by pasting it into the game ID selection box.
 
+(You could also retrieve the encoded game parameters using the
+\q{Specific} menu option instead of \q{Random Seed}, but if you do
+then some options, such as the difficulty level in Solo, will be
+missing. See \k{common-id} for more details on this.)
+
 \C{net} \i{Net}
 
 \cfg{winhelp-topic}{games.net}
@@ -237,17 +346,27 @@ barrier is placed between two tiles to prevent flow between them (a
 higher number gives more barriers). Since barriers are immovable, they
 act as constraints on the solution (i.e., hints).
 
+\dt \e{Ensure unique solution}
+
+\dd Normally, Net will make sure that the puzzles it presents have
+only one solution. Puzzles with ambiguous sections can be more
+difficult and more subtle, so if you like you can turn off this
+feature and risk having ambiguous puzzles. (Also, finding \e{all}
+the possible solutions can be an additional challenge for an
+advanced player.)
+
 \lcont{
 
 The grid generation in Net has been carefully arranged so that the
 barriers are independent of the rest of the grid. This means that if
-you change the \e{Barrier probability} parameter, and then re-enter
-the same game ID you were playing before (see \k{common-id}), you
-should see exactly the same starting grid, with the only change
-being the number of barriers. So if you're stuck on a particular
-grid and need a hint, you could start up another instance of Net,
-set up the same parameters but a higher barrier probability, and
-enter the game seed from the original Net window.
+you note down the random seed used to generate the current puzzle
+(see \k{common-id}), change the \e{Barrier probability} parameter,
+and then re-enter the same random seed, you should see exactly the
+same starting grid, with the only change being the number of
+barriers. So if you're stuck on a particular grid and need a hint,
+you could start up another instance of Net, set up the same
+parameters but a higher barrier probability, and enter the game seed
+from the original Net window.
 
 }
 
@@ -311,13 +430,13 @@ respectively.
 
 \cfg{winhelp-topic}{games.fifteen}
 
-The old ones are the best: this is the good old \q{\i{15-puzzle}} with
-sliding tiles. You have a 4x4 square grid; 15 squares contain numbered
-tiles, and the sixteenth is empty. Your move is to choose a tile next
-to the empty space, and slide it into the space. The aim is to end up
-with the tiles in numerical order, with the space in the bottom right
-(so that the top row reads 1,2,3,4 and the bottom row reads
-13,14,15,\e{space}).
+The old ones are the best: this is the good old \q{\i{15-puzzle}}
+with sliding tiles. You have a 4\by\.4 square grid; 15 squares
+contain numbered tiles, and the sixteenth is empty. Your move is to
+choose a tile next to the empty space, and slide it into the space.
+The aim is to end up with the tiles in numerical order, with the
+space in the bottom right (so that the top row reads 1,2,3,4 and the
+bottom row reads 13,14,15,\e{space}).
 
 \H{fifteen-controls} \i{Fifteen controls}
 
@@ -375,9 +494,86 @@ Right-clicking will move it in the opposite direction.
 
 \H{sixteen-params} \I{parameters, for Sixteen}Sixteen parameters
 
-The only parameters available from the \q{Custom...} option on the
-\q{Type} menu are \e{Width} and \e{Height}, which are
-self-explanatory.
+The parameters available from the \q{Custom...} option on the
+\q{Type} menu are:
+
+\b \e{Width} and \e{Height}, which are self-explanatory.
+
+\b You can ask for a limited shuffling operation to be performed on
+the grid. By default, Sixteen will shuffle the grid in such a way
+that any arrangement is about as probable as any other. You can
+override this by requesting a precise number of shuffling moves to
+be performed. Typically your aim is then to determine the precise
+set of shuffling moves and invert them exactly, so that you answer
+(say) a four-move shuffle with a four-move solution. Note that the
+more moves you ask for, the more likely it is that solutions shorter
+than the target length will turn out to be possible.
+
+
+\C{twiddle} \i{Twiddle}
+
+\cfg{winhelp-topic}{games.twiddle}
+
+Twiddle is a tile-rearrangement puzzle, visually similar to Sixteen
+(see \k{sixteen}): you are given a grid of square tiles, each
+containing a number, and your aim is to arrange the numbers into
+ascending order.
+
+In basic Twiddle, your move is to rotate a square group of four
+tiles about their common centre. (Orientation is not significant in
+the basic puzzle, although you can select it.) On more advanced
+settings, you can rotate a larger square group of tiles.
+
+I first saw this type of puzzle in the GameCube game \q{Metroid
+Prime 2}. In the Main Gyro Chamber in that game, there is a puzzle
+you solve to unlock a door, which is a special case of Twiddle. I
+developed this game as a generalisation of that puzzle.
+
+\H{twiddle-controls} \I{controls, for Twiddle}Twiddle controls
+
+To play Twiddle, click the mouse in the centre of the square group
+you wish to rotate. In the basic mode, you rotate a 2\by\.2 square,
+which means you have to click at a corner point where four tiles
+meet.
+
+In more advanced modes you might be rotating 3\by\.3 or even more at
+a time; if the size of the square is odd then you simply click in
+the centre tile of the square you want to rotate.
+
+Clicking with the left mouse button rotates the group anticlockwise.
+Clicking with the right button rotates it clockwise.
+
+(All the actions described in \k{common-actions} are also available.)
+
+\H{twiddle-parameters} \I{parameters, for Twiddle}Twiddle parameters
+
+Twiddle provides several configuration options via the \q{Custom}
+option on the \q{Type} menu:
+
+\b You can configure the width and height of the puzzle grid.
+
+\b You can configure the size of square block that rotates at a time.
+
+\b You can ask for every square in the grid to be distinguishable
+(the default), or you can ask for a simplified puzzle in which there
+are groups of identical numbers. In the simplified puzzle your aim
+is just to arrange all the 1s into the first row, all the 2s into
+the second row, and so on.
+
+\b You can configure whether the orientation of tiles matters. If
+you ask for an orientable puzzle, each tile will have a triangle
+drawn in it. All the triangles must be pointing upwards to complete
+the puzzle.
+
+\b You can ask for a limited shuffling operation to be performed on
+the grid. By default, Twiddle will shuffle the grid so much that any
+arrangement is about as probable as any other. You can override this
+by requesting a precise number of shuffling moves to be performed.
+Typically your aim is then to determine the precise set of shuffling
+moves and invert them exactly, so that you answer (say) a four-move
+shuffle with a four-move solution. Note that the more moves you ask
+for, the more likely it is that solutions shorter than the target
+length will turn out to be possible.
 
 
 \C{rectangles} \i{Rectangles}
@@ -391,17 +587,17 @@ numbered square, and (b) the area of each rectangle is equal to the
 number written in its numbered square.
 
 Credit for this game goes to the Japanese puzzle magazine \i{Nikoli}
-\k{nikoli}; I've also seen a Palm implementation at \i{Puzzle Palace}
-\k{puzzle-palace}. Unlike Puzzle Palace's implementation, my version
-automatically generates random grids of any size you like. The quality
-of puzzle design is therefore not quite as good as hand-crafted
-puzzles would be (in particular, a unique solution cannot be
-guaranteed), but on the plus side you get an inexhaustible supply of
-puzzles tailored to your own specification.
+\k{nikoli-rect}; I've also seen a Palm implementation at \i{Puzzle
+Palace} \k{puzzle-palace-rect}. Unlike Puzzle Palace's
+implementation, my version automatically generates random grids of
+any size you like. The quality of puzzle design is therefore not
+quite as good as hand-crafted puzzles would be, but on the plus side
+you get an inexhaustible supply of puzzles tailored to your own
+specification.
 
-\B{nikoli} \W{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}
+\B{nikoli-rect} \W{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/7/index_text-e.htm}
 
-\B{puzzle-palace} \W{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}\cw{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}
+\B{puzzle-palace-rect} \W{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}\cw{http://www.puzzle.gr.jp/puzzle/sikaku/palm/index.html.en}
 
 \H{rectangles-controls} \I{controls, for Rectangles}Rectangles controls
 
@@ -440,33 +636,6 @@ and more intuitive playing style. If you set it \e{too} high,
 though, the game simply cannot generate more than a few rectangles
 to cover the entire grid, and the game becomes trivial.
 
-\H{rectangles-cmdline} \I{command line, for Rectangles}Additional
-command-line configuration
-
-The expansion factor parameter, described in \k{rectangles-params},
-is not mentioned by default in the game ID (see \k{common-id}). So
-if you set your expansion factor to (say) 0.75, and then you
-generate an 11x11 grid, then the game ID will simply say
-\c{11x11:}\e{numbers}. This means that if you send the game ID to
-another player and they paste it into their copy of Rectangles,
-their game will not be automatically configured to use the same
-expansion factor in any subsequent grids it generates. (I don't
-think the average person examining a single grid sent to them by
-another player would want their configuration modified to that
-extent.)
-
-If you are specifying a game ID or game parameters on the command
-line (see \k{common-cmdline}) and you do want to configure the
-expansion factor, you can do it by suffixing the letter \cq{e} to
-the parameters, followed by the expansion factor as a decimal
-number. For example:
-
-\b \cq{rect 11x11e0.75} starts Rectangles with a grid size of
-11\u00d7{x}11 and an expansion factor of 0.75.
-
-\b \cq{rect 11x11e0.75:g11c6e5e4a2_4e9c3b3d3b5g2b6c4k4g30a8n3j1g6a2}
-starts Rectangles with a grid size of 11\u00d7{x}11, an expansion
-factor of 0.75, \e{and} a specific game selected.
 
 \C{netslide} \i{Netslide}
 
@@ -484,6 +653,7 @@ See \k{sixteen-controls}.
 \I{parameters, for Netslide}Game parameters are the same as for Net
 (see \k{net-params}).
 
+
 \C{pattern} \i{Pattern}
 
 \cfg{winhelp-topic}{games.pattern}
@@ -528,6 +698,83 @@ grey.
 The only options available from the \q{Custom...} option on the \q{Type}
 menu are \e{Width} and \e{Height}, which are self-explanatory.
 
+
+\C{solo} \i{Solo}
+
+\cfg{winhelp-topic}{games.solo}
+
+You have a square grid, which is divided into square or rectangular
+blocks. Each square must be filled in with a digit from 1 to the
+size of the grid, in such a way that
+
+\b every row contains only one occurrence of each digit
+
+\b every column contains only one occurrence of each digit
+
+\b every block contains only one occurrence of each digit.
+
+You are given some of the numbers as clues; your aim is to place the
+rest of the numbers correctly.
+
+The default puzzle size is 3\by\.3 (a 9\by\.9 actual grid, divided
+into nine 3\by\.3 blocks). You can also select sizes with
+rectangular blocks instead of square ones, such as 2\by\.3 (a
+6\by\.6 grid divided into six 3\by\.2 blocks).
+
+If you select a puzzle size which requires more than 9 digits, the
+additional digits will be letters of the alphabet. For example, if
+you select 3\by\.4 then the digits which go in your grid will be 1
+to 9, plus \cq{a}, \cq{b} and \cq{c}.
+
+I first saw this puzzle in \i{Nikoli} \k{nikoli-solo}, although it's also
+been popularised by various newspapers under the name \q{Sudoku} or
+\q{Su Doku}.
+
+\B{nikoli-solo} \W{http://www.nikoli.co.jp/puzzles/1/index_text-e.htm}\cw{http://www.nikoli.co.jp/puzzles/1/index_text-e.htm}
+
+\H{solo-controls} \I{controls, for Solo}Solo controls
+
+To play Solo, simply click the mouse in any empty square and then
+type a digit or letter on the keyboard to fill that square. If you
+make a mistake, click the mouse in the incorrect square and press
+Space to clear it again (or use the Undo feature).
+
+(All the actions described in \k{common-actions} are also available.)
+
+\H{solo-parameters} \I{parameters, for Solo}Solo parameters
+
+Solo allows you to configure two separate dimensions of the puzzle
+grid on the \q{Type} menu: the number of columns, and the number of
+rows, into which the main grid is divided. (The size of a block is
+the inverse of this: for example, if you select 2 columns and 3 rows,
+each actual block will have 3 columns and 2 rows.)
+
+You can also configure the type of symmetry shown in the generated
+puzzles. More symmetry makes the puzzles look prettier but may also
+make them easier, since the symmetry constraints can force more
+clues than necessary to be present. Completely asymmetric puzzles
+have the freedom to contain as few clues as possible.
+
+Finally, you can configure the difficulty of the generated puzzles.
+Difficulty levels are judged by the complexity of the techniques of
+deduction required to solve the puzzle: each level requires a mode
+of reasoning which was not necessary in the previous one. In
+particular, on difficulty levels \q{Trivial} and \q{Basic} there
+will be a square you can fill in with a single number at all times,
+whereas at \q{Intermediate} level and beyond you will have to make
+partial deductions about the \e{set} of squares a number could be in
+(or the set of numbers that could be in a square). At
+\q{Unreasonable} level, even this is not enough, and you will
+eventually have to make a guess, and then backtrack if it turns out
+to be wrong.
+
+Generating difficult puzzles is itself difficult: if you select
+\q{Intermediate} or \q{Advanced} difficulty, Solo may have to make
+many attempts at generating a puzzle before it finds one hard enough
+for you. Be prepared to wait, especially if you have also configured
+a large puzzle size.
+
+
 \A{licence} \I{MIT licence}\ii{Licence}
 
 This software is \i{copyright} 2004-2005 Simon Tatham.
@@ -554,8 +801,8 @@ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 
-\IM{specific...} Specific..., menu option
-\IM{custom...} Custom..., menu option
+\IM{specific} \q{Specific}, menu option
+\IM{custom} \q{Custom}, menu option
 
 \IM{game ID} game ID
 \IM{game ID} ID, game