Tectonic puzzle helper (version 3)


new version 3.02: small improvements
Download tectonic helper version 3.02

Below you see a reduced picture of version 3 of the tectonic puzzle helper:



Installation

The tectonic helper is written for Windows.
There is no installation procedure.
Just copy the .exe file to a folder of choice.

The rules

Tectonic is a number puzzle.
We notice a rectangle which holds 9x5 small squares.
Such a square is called a cell.
These cells are surrounded by fat lines making groups of 1 to 5 cells.
Such a group is called a block.
Solving a tectonic puzzle means writing digits 1 to 5 in the cells such that:
    - each block holds digits 1,2,3,4,5 (as much as there are cells)
    - cells that touch each other do not have the same digit.
Touching, or connecting, means horizontal, vertical and diagonal.

A block of one cell must have the digit "1".
A block of three cells must have the digits "1", "2", "3" etcetera.
Some digits are prefilled.
This tectonic-helper program supports solving puzzles at different levels:
from simply saving pencil and paper, display of possibilities to hints in difficult situations.

Drawing a new puzzle


1. press the raster menu button.
2. press clear to erase old rasters.
3. press the +/- buttons to obtain the right number of rows and columns.
4. move mousepointer over the edges of the cells that make a block.
5. press left mousebutton to draw a fat line.
6. press right mousbutton to erase a fat line.

7. press the digits menu button
8. press clear to erase old numbers.
9. klick mouse on a cell for selection or use the cursorkeys to move the cell pointer.
10. type number in selected cell.
11. press delete key to remove a number.

Entered digits are painted brown.

12. press the play.. menu button to enable the search for a solution.

Note:
If the option box is checked digits may be entered by clicking on an option.

Searching for a solution

Select a cell and type a number.
Numbers entered in play time are painted in black.
Numbers can be added as well by clicking on an option of the cell.
Press the clear button to remove all black numbers.

Options

Options are digits that are allowed in a cell at a certain moment.
Option display is turned on and off by the options checkbox.
To solve a puzzle means option reduction.
In a solved puzzle each cell has only one option left.
To remove an option, click on it with the right mousebutton.
The reset opts button causes recalculation of all options.

If the error box is checked the program checks for cells without options or block with a missing option.

Hints

Click on the lamp or press the enter key for hints.
The program looks for moves, from easy to difficult.
A comprehensive description is found later under "strategies".
Press the lamp again to implement the hint.
Press the escape key to reject the hint.

backtracking

This is a sytematical "trial and error" method that allows solving of every puzzle however difficult.
1. press the backtracking STORE button to save the game.
2. try a convenient cell and number. Eventually ask for a hint.
3. if stuck: proceed with point 1.
4. if error is reported: press RELOAD to restore game.
5. try next number of the cell. Goto 2.
6. if all digits tried: RELOAD to restore previous situation.
7. if no relaod possible: there is no solution.

Backtracking is allowed 10 levels deep.

Save a puzzle

Press the save menu button.
A dialog menu opens to select a folder and to type a name for the puzzle.
Tectonic files have the extension .tect

Open a puzzle

Click on the open menu button.
A dialog menu opens with possible tect_...,tecx_ and *.tect files.
The tect_* files are from old version 1.
The tecx_* files are from previous version 2.
The *.tect files are written by the newest version 3.

When clicking on a *.tect file, WINDOWS will ask for an application.
Type tectonic3e.exe and in the future *.tect files show the tectonic logo.
From now on the tectonic helper opens automatically when clicking on a file.

Print puzzles

Press the printer image to open the printer preview page.
The current puzzle is displayed right in the center.
Move the mouse pointer over the puzzle, press the left mousebutton
(A selected puzzle has a blue frame)
and shift the puzzle to the right place of the page.
Repeat this procedure for other puzzles. There is room for 8 puzzles per page.
Press select to select a printer.
Press delete to remove a selected puzzle from the page.

Press print to print the page.

Strategies

Now we discuss the ways to solve tectonic puzzles.
The hints processor follows the same route.

1.Single-option cells

Look for cells that have only one option.

Example:



Cell C2 has only option "3".

2.Single-cell options

Take an option (1..5) and look per block in which cells this options fits.
If only one cell, fill in the number.

Example:



Cell D7 is the only cell of it's block that contains option "3".

3.block-option-killers

These are options that would remove this option from a neighbouring block.

Example:



Cell D4 may not have number "2" or "5" .

4.Inner-block-redundancy

look at n (1..4) cells of a block.
if n cells hold n options than eventually these numbers will appear in the cells
so the other cells of the block cannot have these options.
Note: n=1 is case 1. before. In a block of 5 cells, n=4 is case 2 before.

Example:



Cells D7,D8 have options "4" and "5" so these options must be removed in the other cells.
This is case "n=2".

Cases 1 to 4 were already handled by versions 1 and 2. to generate hints.
Now we arrive at the new possibilities of version 3.

Groups

Definition: a group is a number of cells that are all interconnected.
This connection may be caused by their common block or because they are touching.
Cells of a group must have different numbers.
A block is also a group however blocks have numbers starting at "1".
Before we handled all reductions possibele with blocks so from now we consider only groups
that cover different blocks. Otherwise we would repeat ourselves.
Recognizing groups can be difficult.

Two possibilities come to mind for option reduction:
    1. a cell connected to all cells of a group cannot have these group options.
    2. a cell may not have an option that would kill this option in a neighbouring group.
Note:
I follow the way of thinking of the player.
But in reality there is only one rule:
    cells may not have options that cancel these options in other groups.
Below are pictured some examples of groups and option reduction:


Group cells are colored orange by the hint processor.
This concerns cases where a cell connects to all cells of a group.
Options to be removed are placed in red rectangles.(see C2,B2,A3)

Below are pictured some cases where a cell only connects to some cells of a group:


The options in red have to be removed because they would kill these options in the group.
So far for the hints this tectonic helper may provide.

Under the hub

Finding groups is much work and time consuming.
To accellerate this process I use a predefined table which is made using
a specially designed editor.
Nobody is perfect so I added code to present this table to the player.
I may have overlooked patterns or possibilities.

The search for group hints is done by group size.
At first for two cells, then three, etcetera.
All cells are sequentially addressed: A1,A2....B1,B2.....
From this position the neighbour cells are examined for group construction.
The tabel provides relative coordinates for the group cells.
After clicking on the tectonic icon the table's scan patterns appear,
below for the group size of two.


In the center we notice a 4x4 square.
The left-top cell of this square has (relative) coordinates (0,0).
The left-top cell of the total picture has coordinates (-3,-3).
The black squares indicate cells to be examined as group members,
the cells with a gray circle are investigated for option reduction.
In case of the left picture the table delivers (0,0) and (1,0) for a possible group.
For the gray-circled cells the table provides (0,-1),(1,-1),(0,1) and (1,1).

Finally a remark about group size four:


Note: these patterns have 4 and 8 symmetries.

To make a group some cells need to be in the same block.
Look at the situation below (left pattern)



Cells B and C are connected to all cells but A and D must be in the same block for connection.
The gray circled cells must connect to at least two cells of the group.

The editor automatically enters the symmetries in the table.
Also a graphical representation is much more convenient then just numbers which reduces the chances for errors.
The tables are hidden in the bitmap of a TImage component.

Note: a cell can not be connected to five cells of a group as this would kill the group option.

For the other group patterns I refer to the program.

Backtracking

The tectonic hint capabilities end here.
Some very difficult puzzles still have cells with two or three options after rigorous option reduction.
look here:



To continue, press the backtracking STORE button to save the game.
Next choose number "4" for cell C4 (arbitrary choice) and continue.
Than this happens (if "errors" box is checked):



Option "3" in a group has disappeared, making the puzzle unsolvable.
Press backtracking button RELOAD to return to the situation before.
Now type number "5" for cell C4 and the puzzle solves easily.
Backtracking is allowed 10 levels deep.

Here I end the description of new version 3 of the tectonic helper.
Have fun !