chiark / gitweb /
Added an automatic `Solve' feature to most games. This is useful for
[sgt-puzzles.git] / puzzles.but
index 2d106059eb81b4b13f859d9c08b278b0db8c92a6..6d7d11fa6cff1c0d7bdead552df646c7f369aad2 100644 (file)
@@ -5,41 +5,47 @@
 
 \cfg{text-filename}{puzzles.txt}
 
-\cfg{xhtml-contents-filename}{index.html}
-\cfg{xhtml-leaf-level}{1}
-\cfg{xhtml-contents-depth-0}{1}
-\cfg{xhtml-contents-depth-1}{2}
-\cfg{xhtml-leaf-contains-contents}{true}
+\cfg{html-contents-filename}{index.html}
+\cfg{html-template-filename}{%k.html}
+\cfg{html-index-filename}{docindex.html}
+\cfg{html-leaf-level}{1}
+\cfg{html-contents-depth-0}{1}
+\cfg{html-contents-depth-1}{2}
+\cfg{html-leaf-contains-contents}{true}
 
 \cfg{info-filename}{puzzles.info}
 
 \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
 reserved. You may distribute this documentation under the MIT licence.
 See \k{licence} for the licence text in full.
 
-\versionid $Id: puzzles.but,v 1.1 2004/08/16 12:23:56 simon Exp $
+\cfg{html-local-head}{<meta name="AppleTitle" content="Puzzles Help">}
 
+\versionid $Id$
 
 \C{intro} Introduction
 
 I wrote this collection because I thought there should be more small
 desktop toys available: little games you can pop up in a window and
 play for two or three minutes while you take a break from whatever
-else you were doing. And I was also annoyed that every time I found a
-good game on (say) \i{Unix}, it wasn't available the next time I was
-sitting at a \i{Windows} machine, or vice versa; so I arranged that
-everything in my personal puzzle collection will happily run on both.
-When I find (or perhaps invent) further puzzle games that I like,
-they'll be added to this collection and will immediately be available
-on both platforms. And if anyone feels like writing any other front
-ends - Mac OS, PocketPC, or whatever it might be - then all the games
-in this framework will immediately become available on another
-platform as well.
+else you were doing. And I was also annoyed that every time I found
+a good game on (say) \i{Unix}, it wasn't available the next time I
+was sitting at a \i{Windows} machine, or vice versa; so I arranged
+that everything in my personal puzzle collection will happily run on
+both, and have more recently done a port to Mac OS X as well. When I
+find (or perhaps invent) further puzzle games that I like, they'll
+be added to this collection and will immediately be available on
+both platforms. And if anyone feels like writing any other front
+ends - PocketPC, Mac OS pre-10, or whatever it might be - then all
+the games in this framework will immediately become available on
+another platform as well.
 
 The actual games in this collection were mostly not my invention; I
 saw them elsewhere, and rewrote them in a form that was more
@@ -76,6 +82,10 @@ 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 \q{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.
@@ -93,6 +103,36 @@ game.)
 
 \dd Redoes a previous undone move.
 
+\dt \ii\e{Copy}
+
+\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{
+
+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.
+
+}
+
 \dt \I{exit}\ii\e{Quit} (\q{Q}, Ctrl+\q{Q})
 
 \dd Closes the application entirely.
@@ -100,8 +140,8 @@ game.)
 \H{common-id} Recreating games with the \ii{game ID}
 
 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.
+(or the \q{File} menu, on Mac OS X) lets you see a short string (the
+\q{game ID}) that captures the initial state of the current game.
 
 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});
@@ -131,6 +171,8 @@ are specific to each game and are described in the following sections.
 
 \H{common-cmdline} Specifying game parameters on the \i{command line}
 
+(This section does not apply to the Mac OS X version.)
+
 The games in this collection deliberately do not ever save
 information on to the computer they run on: they have no high score
 tables and no saved preferences. (This is because I expect at least
@@ -143,11 +185,11 @@ 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{Specific} 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 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).
 
 If you run the game with just that parameter text on the command
 line, it will start up with the settings you specified.
@@ -203,6 +245,11 @@ controls are:
 also unlock it again, but while it's locked you can't accidentally
 turn it.
 
+\dt \e{Jumble tiles}: \q{J} key
+
+\dd This key turns all tiles that are not locked to random
+orientations.
+
 (All the actions described in \k{common-actions} are also available.)
 
 \H{net-params} \I{parameters, for Net}Net parameters
@@ -300,13 +347,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}
 
@@ -369,6 +416,62 @@ The only parameters available from the \q{Custom...} option on the
 self-explanatory.
 
 
+\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.
+
+
 \C{rectangles} \i{Rectangles}
 
 \cfg{winhelp-topic}{games.rectangles}
@@ -380,17 +483,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
+\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 (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.
 
-\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
 
@@ -406,9 +509,56 @@ When a rectangle of the correct size is completed, it will be shaded.
 
 \H{rectangles-params} \I{parameters, for Rectangles}Rectangles 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 \q{Custom...} option on the \q{Type} menu offers you \e{Width}
+and \e{Height} parameters, which are self-explanatory.
+
+\q{Expansion factor} is a mechanism for changing the type of grids
+generated by the program. Some people prefer a grid containing a few
+large rectangles to one containing many small ones. So you can ask
+Rectangles to essentially generate a \e{smaller} grid than the size
+you specified, and then to expand it by adding rows and columns.
+
+The default expansion factor of zero means that Rectangles will
+simply generate a grid of the size you ask for, and do nothing
+further. If you set an expansion factor of (say) 0.5, it means that
+each dimension of the grid will be expanded to half again as big
+after generation. In other words, the initial grid will be 2/3 the
+size in each dimension, and will be expanded to its full size
+without adding any more rectangles.
+
+Setting an expansion factor of around 0.5 tends to make the game
+more difficult, and also (in my experience) rewards a less deductive
+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 11\by\.11 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}
@@ -421,7 +571,6 @@ generation of Net (see \k{net}) with the movement of Sixteen (see
 into place you have to slide them into place by moving a whole row at
 a time. 
 
-
 As in Sixteen, \I{controls, for Netslide}control is with the mouse.
 See \k{sixteen-controls}.
 
@@ -429,9 +578,171 @@ See \k{sixteen-controls}.
 (see \k{net-params}).
 
 
+\C{pattern} \i{Pattern}
+
+\cfg{winhelp-topic}{games.pattern}
+
+You have a grid of squares, which must all be filled in either black
+or white. Beside each row of the grid are listed the lengths of the
+runs of black squares on that row; above each column are listed the
+lengths of the runs of black squares in that column. Your aim is to
+fill in the entire grid black or white.
+
+I first saw this puzzle form around 1995, under the name
+\q{\i{nonograms}}. I've seen it in various places since then, under
+different names.
+
+Normally, puzzles of this type turn out to be a meaningful picture
+of something once you've solved them. However, since this version
+generates the puzzles automatically, they will just look like random
+groupings of squares. (One user has suggested that this is actually
+a \e{good} thing, since it prevents you from guessing the colour of
+squares based on the picture, and forces you to use logic instead.)
+The advantage, though, is that you never run out of them.
+
+\H{pattern-controls} \I{controls, for Pattern}Pattern controls
+
+This game is played with the mouse.
+
+Left-click in a square to colour it black. Right-click to colour it
+white. If you make a mistake, you can middle-click, or hold down
+Shift while clicking with any button, to colour the square in the
+default grey (meaning \q{undecided}) again.
+
+You can click and drag with the left or right mouse button to colour
+a vertical or horizontal line of squares black or white at a time
+(respectively). If you click and drag with the middle button, or
+with Shift held down, you can colour a whole rectangle of squares
+grey.
+
+(All the actions described in \k{common-actions} are also available.)
+
+\H{pattern-parameters} \I{parameters, for Pattern}Pattern parameters
+
+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). None of the
+difficulty levels generated by this program ever requires making a
+guess and backtracking 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.
+
+\H{solo-cmdline} \I{command line, for Solo}Additional command-line
+configuration
+
+The symmetry and difficulty parameters (described in
+\k{solo-parameters}) are not mentioned by default in the game ID
+(see \k{common-id}). So if (for example) you set your symmetry to
+4-way rotational and your difficulty to \q{Advanced}, and then you
+generate a 3\by\.4 grid, then the game ID will simply say
+\c{3x4:}\e{numbers}. This means that if you send the game ID to
+another player and they paste it into their copy of Solo, their game
+will not be automatically configured to use the same symmetry and
+difficulty settings 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
+symmetry, you can do it by suffixing additional text to the
+parameters:
+
+\b \cq{m4} for 4-way mirror symmetry
+
+\b \cq{r4} for 4-way rotational symmetry
+
+\b \cq{r2} for 2-way rotational symmetry
+
+\b \cq{a} for no symmetry at all (stands for \q{asymmetric})
+
+\b \cq{dt} for Trivial difficulty level
+
+\b \cq{db} for Basic difficulty level
+
+\b \cq{di} for Intermediate difficulty level
+
+\b \cq{da} for Advanced difficulty level
+
+So, for example, you can make Solo generate asymmetric 3x4 grids by
+running \cq{solo 3x4a}, or 4-way rotationally symmetric 2x3 grids by
+running \cq{solo 2x3r4}, or \q{Advanced}-level 2x3 grids by running
+\cq{solo 2x3da}.
+
+
 \A{licence} \I{MIT licence}\ii{Licence}
 
-This software is \i{copyright} 2004 Simon Tatham.
+This software is \i{copyright} 2004-2005 Simon Tatham.
 
 Portions copyright Richard Boulton.