Copyright: Copyright ® 1993 by Steven Marshall


Help Contents
Towns Contents

Introduction

Procedures

Solving the Puzzle

Starting a New Puzzle

Using the Autosolver

Presetting the Puzzle

Saving the Puzzle

Restoring an Old Puzzle

Retreating (undo)

Repositioning the Puzzle

Iconizing the Puzzle

Exiting

Commands

Popup Menu

Glossary

Defined Terms

Keyboard Topics

Puzzle Control Keys

Accelerator Keys

Windows Keys

Disclaimer of Warranty


The Contents contains a list of all Help topics available. For information on how to use Help, press F1 or choose Using Help from the Help menu.


Disclaimer of Warranty

Users of Towns must accept this disclaimer of warranty:

Towns is supplied as is.  Homespun Software disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose.  Homespun Software assumes no liability for damages, direct or consequential, which may result from the use of Towns.


Introduction

Towns implements a puzzle presented in the Games column of the April '93 issue of OMNI  magazine by Scott Morris.  It is in turn based on a more general puzzle presented by M. Kontesevich at the 1981 "Tournament of the Towns", an intercity mathematics competition, in the former Soviet Union.  The object of the game is to vacate the six blue squares (hot spots) in the lower left corner of the playing field of any markers.  When a marker is removed another is placed in the spot directly above it, and another placed in the spot directly to the right. Only one marker can occupy a square, thus a marker can only be removed if those two adjacent spots are unoccupied.  Markers that can be removed are colored green, markers that are blocked and cannot be removed are colored red.

Scott Morris has offered a $5000 purse to the first person who sends him the correct solution with the fewest finite number of moves.  No solution has been found to date. .If you find a solution send it him at:

Counter-Intuitive Problem

Omni Magazine

324 W. Wendover Avenue Suite 205

Greensboro, North Carolina 27408.

The moves must be numbered sequentially and identified by the coordinates of the vacated squares.  Use chess notation, numbering the rows from the bottom up 1, 2, 3, etc. and lettering the columns A, B, C, etc. starting from the left.  Such a listing will be produced automatically if you should happen to find a solution.

Contents


In chess notation each square is identified by a letter for its column and a number for its row.  The columns are lettered A, B, C, etc. starting from the left, and the rows are numbered from the bottom up 1, 2, 3, etc.


Procedures

Solving the Puzzle

Using the Autosolver

Presetting the Puzzle

Starting a New Puzzle

Saving the Puzzle

Restoring an Old Puzzle

Retreating (undo)

Repositioning the Puzzle

Iconizing the Puzzle

Exiting


Commands

Popup Menu

New

Autosolve...

Preset...

Save

Restore

Truchet Tiling

Exit !


Exiting

To exit the puzzle select Exit ! from the Popup Menu.


Using the Autosolver

To have the puzzle solve itself select Autosolve... from the Popup Menu.  A dialog box will appear to start, stop, step and cancel the solver.  Be prepared to wait quite some time; the algorithm is a brute force depth first search and thus is quite inefficient; a 3x3 board has a total of 14 moves, a 4x4 has 594, a 5x5 has 1,390,382.

Four buttons control the solver:

Go	starts the solver

Stop	stops the solver

Cancel	dismisses the dialog box.

Help	calls this topic.


Select About... from the Help menu for more information about this mode.


Presetting

You can design your own puzzle challenge using the preset mode.  Preset allows you to place markers and hot spots anywhere on the board.  Be sure that there is at least one marker on a hot spot or the puzzle will be, by definition, solved.

When all the markers have been placed and the hot spots defined, click on Ok in the dialog box to return to the normal mode.  Click on Abort to return the puzzle to its original state and return to the normal mode.

Mouse operation:

 Clicking the left mouse button will place a marker in an empty spot or remove a marker from an occupied spot.  The right mouse button will make a normal spot into a hot spot and vice-versa.

Keyboard operation:

 Focus the desired spot using the DIRECTION keys.  Hitting the SPACEBAR will remove the marker if the spot is occupied or place a marker if the spot is empty.  Holding the SHIFT key while hitting the SPACEBAR will make a normal spot a hot spot and vice-versa.

For more information about using the keyboard, see also:

Puzzle Control Keys


Saving

To save the current state of the puzzle select Save from the Popup Menu.


Restoring

To restore a previously saved puzzle select Restore from the Popup Menu.


Starting a New Puzzle

To abandon the current puzzle and start a new one select New from the Popup Menu.


The puzzle is solved when all of the blue hot spots are unoccupied.


Solving the Puzzle

The puzzle is solved when all of the blue hot spots are unoccupied.

When a marker is removed, a marker is placed in the spot above the vacated spot and another is placed in the spot to the right; for example:

This [image] before, becomes this [image] after.

Only one marker can occupy any one spot, so whenever either of the two adjacent spots are occupied, that marker cannot be removed; for example, here are the cases that block the lower left marker:

Markers that can be removed from the board are colored green, markers that cannot are colored red.

When the puzzle is solved a box will appear congratulating you for solving it.  Elapsed time since the last New command along with the number of moves used to solve the puzzle will be listed.  You will also be given the option of editing the history list.  Responding OK will load the file TOWNS.HIS into Notepad.  This file lists the entire sequence of moves you made, each spot vacated identified in chess notation.  Print this file and mail it to the address in the Introduction.

See also:

Removing the Markers


Truchet Tiling

Truchet tiling is a somewhat silly option where the board is tiled using a random selection of Truchet-like tiles instead of the normal plain squares.  A Truchet-like tile is a tile scribed with a quarter circle in opposite corners in two different orientations as so:

 and [image].

With each painting of a square, the tile is rechosen randomly, providing an everchanging pattern on the board.

Named for Sebastian Truchet, who in 1704 wrote a paper showing that numerous patterns can be generated by the assembly of a single half-colored tile in various orientations.

see also Computers Pattern Chaos and Beauty by Clifford A. Pickover (1990).  St. Martins Press: N.Y.(pp 329-32).

A test for randomness, the frequency of occurence of the circle [image] should be 0.054 (number of shapes divided by the number of tiles) or 3.4560 per 64 tile board, the dumbell [image] should be 0.0125 or 0.8 times per board.


Puzzle Menu
Popup Menu

The Popup menu is activated by the right mouse button. It includes commands that enable you to start a new puzzle, activate the autosolver, activate preset mode, save the current state, restore a saved state and exit from the puzzle.

For more information, select a Popup menu command name:

New

Autosolve...

Preset...

Save

Restore

Truchet Tiling

Exit !


Puzzle Exit Command
Exit ! Command

This command will immediately exit the puzzle.

See also:

Popup Menu


Puzzle New Command
New Command

This command will start a new puzzle by clearing off all the markers from the board except for a single marker in the lower left corner. All hot spots will be cleared except for the 6 in the lower left corner.

See also:

Popup Menu


Puzzle Save Command
Save Command

This command will save the current state of the puzzle.  Only one puzzle can be saved at a time, any previously saved position will be overwritten.  If there is a previously saved puzzle, a dialog box will appear asking you to confirm this operation.

See also:

Popup Menu

Restore


Puzzle Restore Command
Restore Command

This command will restore a saved position to the screen.  A dialog box will appear asking you to confirm your decision to lose the current state of the puzzle.  This command is disabled until the puzzle has been saved.

See also:

Popup Menu

Save


File Autosolver Command
Puzzle Autosolve Command

This command will activate the Autosolver control panel.

See also

Using the Autosolver


File Preset Command
Preset Command

This command will activate the Preset mode control panel.

See also

Popup Menu

Presetting the Puzzle


Repositioning the Puzzle

Mouse operation:

 To reposition the Puzzle on the Desktop, position the mouse over the border region or the gray region between the marker spots.  Hold down the left mouse button to drag the window to a new location.


Iconizing the Puzzle

Mouse operation:

 To reduce the Puzzle to an Icon, double-click the mouse in the border region surrounding the playing field.


Undo
Retreating (undo)

You can take back your previous moves with either the mouse or the keyboard.

Mouse operation:

 Position the pointer over the focused spot.  Click the right mouse button to take back your last move. Repeated clicks will continue to take back moves up to the starting position.

Keyboard operation:

 Hitting the SPACEBAR while holding the SHIFT key also undo your previous moves.

For more information about using the keyboard, see also:

Puzzle Control Keys


Removing the Markers

Markers can be removed with either the mouse or the keyboard.

Mouse operation:

 Position the pointer over a green marker.  Single click will remove the marker and place two new markers on the board; one above and one to the right of the vacated spot.  Dragging the pointer off the vacated spot before releasing the mouse button will abort the remove operation.

Keyboard operation:

 Focus the desired marker using the DIRECTION keys.  Hitting ENTER or SPACEBAR will remove the selected marker (if it is green, otherwise nothing will happen).

For more information about using the keyboard, see also:

Puzzle Control Keys


The spot is focused when there is a dotted box surrounding it.


Hot spots are the spots that must be unoccupied in order to solve the puzzle.  Hot spots are identified by their blue color:


Using the Keyboard
Keyboard Topics

Choose this item to review the keys used in Windows:

Window Keys

Choose this item to review the keys specific to this application:

Puzzle Control Keys


Windows Keys

Choose from the following list to review the keys used in Windows:

Dialog Box Keys

Help Keys

Menu Keys

System Keys

Window Keys


Puzzle Control Keys

The following keys can be used whenever the main puzzle window is the current active window.

Key(s)	Function

DIRECTION key	Moves focus to the desired spot.

ENTER	Removes a green marker from the selected spot

SPACEBAR	Removes a green marker from the selected spot

or, in Preset Mode:

Places a marker in an unoccupied spot or removes a marker from an occupied spot.

SHIFT+SPACEBAR	Undo previous moves

or, in Preset Mode:

Toggles hot spot on/off.


Accelerator Keys

The following keys provide quick access to the various menu commands and can be used whenever the main puzzle window is the current active window.

Key(s)	Function

CNTRL+N	Start a new puzzle.

CNTRL+P	Preset the puzzle.

CNTRL+S	Save the puzzle.

CNTRL+R	Restore a saved puzzle.

CNTRL+X	Immediately exit the puzzle.


Dialog Box Keys

The following keys can be used in the PRESET MODE dialog box.

Key(s)	Function

TAB	Moves from field to field (left to right and top to bottom).

SHIFT+TAB	Moves from field to field in reverse order.

ALT+letter	Moves to the option or group whose underlined letter matches the one you type.

DIRECTION key	Moves from option to option within a group of options.

ENTER	Executes a command button.

ESC	Closes a dialog box without completing the command. (Same as Cancel)


Help Keys

Key(s)	Function

F1	Gets Help and displays the Help Index for the application. If the Help window is already open, pressing F1 displays the "Using Windows Help" topics.

In some Windows applications, pressing F1 displays a Help topic on the selected command, dialog box option, or system message.

SHIFT+F1	Changes the pointer to [image] so you can get Help on a specific command, screen region, or key. You can then choose a command, click the screen region, or press a key or key combination you want to know more about.

(This feature is not available in all Windows applications.)


Menu Keys

The following keys can be used in any window that has a menu bar.

Key(s)	Function

ALT	Selects the first menu on the menu bar.

Letter key	Chooses the menu, or menu item, whose underlined letter matches the one you type.

ALT+letter key	Pulls down the menu whose underlined letter matches the one you type.

LEFT or RIGHT ARROW	Moves among menus.

UP or DOWN ARROW	Moves among menu items.

ENTER	Chooses the selected menu item.


System Keys

The following keys can be used from any window, regardless of the application you are using.

Key(s)	Function

CTRL+ESC	Switches to the Task List.

ALT+ESC	Switches to the next application window or minimized icon, including full-screen programs.

ALT+TAB	Switches to the next application window, restoring applications that are running as icons.

PRTSC	Copies the entire screen to the Clipboard.

ALT+PRTSC	Copies only the active window to the Clipboard.

CTRL+F4	Closes the active window.

F1	Gets Help and displays the Help Index for the application. (See Help Keys)


Window Keys

The following keys can be used from any window, regardless of the application you are using.

Key(s)	Function

ALT+SPACEBAR	Opens the Control menu for an application window.

ALT+Hyphen	Opens the Control menu for a document window.

ALT+F4	Closes a window.

ALT+ESC	Switches to the next application window or minimized icon, including full-screen programs.

ALT+TAB	Switches to the next application window, restoring applications that are running as icons.

ALT+ENTER	Switches a non-Windows application between running in a window and running full screen.

DIRECTION key	Moves a window when you have chosen Move from the Control menu.

Or, changes the size of a window when you have chosen Size from the Control menu.


Glossary

chess notation

contents

focus

hot-spot

solved

Truchet Tiling

Please send any suggestions for this topic to:

Homespun Software

162 Whitney St.

Northborough, MA. 01532