I'm sure that I'm making mistakes of some sort in the way I 'solve' puzzles.
For example:
With difficulty level set to Hard and 2200+ (which gives me quite a number and
variety of Hard steps, usually), some puzzles seem to be solvable based on
nothing more than naked pairs and naked triples.
Plus, although very rarely, F11 solves remaining singles but with some Invalid
values - i.e., the puzzle has more than one solution.
While there is some satisfaction in solving a puzzle in fewer and easier steps
than the Solution Path might suggest, and there is more than one possible path
to a solution, I'm concerned that some moves I make are not strictly valid at
a given stage. But, unless a Deviation is displayed, I don't have any reason
to question the validity of my moves.
"Deviations" are ultimately, according to puzzle solution, actually 'Invalid'
moves.
My question being;
Is it possible to determine from the current state of a puzzle and available
techniques (I disabled a few) whether a move is strictly "legal" or not?
That is, excluding a candidate or setting a value might be valid at some stage
in the puzzle solution but not by any method at the current stage.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you can eliminate 5 and 7 from r9c5. And yes, the side effects of
eliminations can be confusing.
The first case (eliminating a candidate makes the puzzle easier) is simple
enough to understand: Every puzzle has one or more cells, that, when set,
reduce the puzzle to singles (the "backdoors"). The solver searches for steps
in a predefined order. A human solver solves more intuitive. If an
elimination, that is not part of the computer solution, triggers a backdoor,
the puzzle becomes very easy indeed.
The second case (eliminating a candidate makes the puzzle HARDER), is not so
easy to understand, but it does happen. Lets take a look at your example. If
we eliminate both candiates (5 and 7) from r9c5, we get an X-Wing after a few
steps, that, amongst others, eliminates 5 from r2c6:
But since 5 has not been eliminated from r9c5, it has also not been eliminated
from r2c6, and so r2c6 does NOT become a Naked Single. The simplest step
available is now an XY-Chain, the puzzle has become harder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Determining if an elimination is "legal" or not is not as easy as it sounds
and I doubt it can be done altogether, especially when you take into account,
that players sometimes execute more than one step at once. The only real
"ultimate" check is, wether an eliminated candidate was part of the solution
or not, as you mentioned above.
A manual check for standard steps can be done using the "All possible steps"
panel: Befor eliminating a candidate, do a search for all steps (you would
have to disable unwanted techniques for all steps as well as for the solver).
Using "Sort cells by affected cells/candidates" (the "C" icon) you can quickly
check, if HoDoKu found steps for your candidates.
Puzzles should definitely not have more than one solution. If F11 produces red
cells, the most probable cause is, that you have overlooked an invalid
elimination before pressing F11. If thats not the case, it would be a bug, but
I would need a test case to verify it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is quite possible I overlooked an invalid exclusion. I found it necessary
to increase the intensity of Deviations colour, a little, at some time for
that very reason. Yet, if I deliberately try it now the result of pressing F11
is both Deviations (pink) and Invalid (red) values. F11 multiple times
produces red only.
Whatever the case, Invalid 'solutions' are very rare and I figure it was most
likely something I did. Since the introduction of the Progress Marker, it is
now easier to see if a puzzle is made invalid at some stage.
If, in the remote possibility, I find another F11/invalid result, then I
definitely have in mind to post it here for your consideration.
Thank you for your detailed reply.
I didn't think it would be easy, if even possible.
I failed to note that W Wing is one technique I am not using at present - the
other is HR. That would mean the path I have is different from the one you
have.
Still, it is interesting to me to discover why the Progress Marker colour
changes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cant reproduce the error. Your solution path is of course valid (except the
typo at the end: r7c9 = 6 instead of r6c9 = 6). When I follow your solution I
get to:
I think you might be seeing side effects of a bug you reported a while back ( https://sourceforge.net/tracker/?func=detail&aid=3515379&group_id=250484&atid=
1126425), which I have already corrected for the next version: If
you have deleted values from cells while solving the puzzle, F11 might lead to
incorrect solutions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I didn't mean to suggest the puzzle was invalid. I was looking for an
expert opinion on whether my solution path is valid or not. Thank you.
It's not for want of trying that I haven't found an invalid solution yet, but,
if I did, I think I would post it under a more appropriate Subject heading.
Although, in reality, it took me a little longer to spot the Possible UR it
was easy to reproduce and describe (in summary) the minimum steps required -
in this example.
Most UR types, I find, are really easy to see and it is likely that's how I
managed to bypass a series of Hard steps on other occasions. (UR type 3 I
can't do, and I don't think I came across a type 5 yet...)
BTW:
I'm thinking that an image file would be the easiest way to 'describe' a
puzzle state sometimes - showing Givens, Values and remaining Candidates all
at once - and to demonstrate if invalid exclusion is absent. I could post a
screenshot, but..
What I assume is a 'browse' button, to choose destination, in Save as Image,
wants to "Open" a file. Is this a bug?
D is my CD/DVD drive letter. If I manually change destination to C and create
folder "temp", on C drive, it saves image (and accompanying .txt) ok, but I
wouldn't think HoDoku capable of opening them directly anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
UR: I like them too and they can be pretty effective.
"Open" is not a bug, but lazyness on my part. But you are right, the UI is not
very intuitive when saving pictures. The default of "d:\temp" is a bug though.
It should initially point to your Documents folder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sure that I'm making mistakes of some sort in the way I 'solve' puzzles.
For example:
With difficulty level set to Hard and 2200+ (which gives me quite a number and
variety of Hard steps, usually), some puzzles seem to be solvable based on
nothing more than naked pairs and naked triples.
Plus, although very rarely, F11 solves remaining singles but with some Invalid
values - i.e., the puzzle has more than one solution.
While there is some satisfaction in solving a puzzle in fewer and easier steps
than the Solution Path might suggest, and there is more than one possible path
to a solution, I'm concerned that some moves I make are not strictly valid at
a given stage. But, unless a Deviation is displayed, I don't have any reason
to question the validity of my moves.
"Deviations" are ultimately, according to puzzle solution, actually 'Invalid'
moves.
My question being;
Is it possible to determine from the current state of a puzzle and available
techniques (I disabled a few) whether a move is strictly "legal" or not?
That is, excluding a candidate or setting a value might be valid at some stage
in the puzzle solution but not by any method at the current stage.
It turns out that one indicator of an Illegal step is the colour of the
Progress Marker icon.
I have been wondering why it changes from Yellow to Orange, or to Green,
sometimes..
It turns Orange if I do something which changes the state of the puzzle so
that the solution now requires some Unfair technique(s).
And, likewise, Green if the solution then requires only Medium.
For example
.-----------------.-----------------.---------------.
| 8 1459 159 | 79 4567 459 | 49 2 3 |
| 345 6 2359 | 1 245 3459 | 7 8 49 |
| 7 2349 239 | 239 24 8 | 1 6 5 |
:-----------------+-----------------+---------------:
| 9 7 6 | 48 3 2 | 5 1 48 |
| 1 245 25 | 48 9 6 | 248 3 7 |
| 34 234 8 | 5 1 7 | 26 9 46 |
:-----------------+-----------------+---------------:
| 2 8 4 | 6 57 39 | 39 57 1 |
| 35 359 7 | 239 258 1 | 3689 4 689 |
| 6 1359 1359 | 379 458 3459 | 389 57 2 |
'-----------------'-----------------'---------------'
To my fuzzy way of thinking, I can exclude both 5 and 7 from r9c5.
Excluding the 7 alone produces an 'Unfair' rating, because the solution then
requires an XY Chain.
Excluding the 5 as well changes rating back to 'Hard'.
Yes, you can eliminate 5 and 7 from r9c5. And yes, the side effects of
eliminations can be confusing.
The first case (eliminating a candidate makes the puzzle easier) is simple
enough to understand: Every puzzle has one or more cells, that, when set,
reduce the puzzle to singles (the "backdoors"). The solver searches for steps
in a predefined order. A human solver solves more intuitive. If an
elimination, that is not part of the computer solution, triggers a backdoor,
the puzzle becomes very easy indeed.
The second case (eliminating a candidate makes the puzzle HARDER), is not so
easy to understand, but it does happen. Lets take a look at your example. If
we eliminate both candiates (5 and 7) from r9c5, we get an X-Wing after a few
steps, that, amongst others, eliminates 5 from r2c6:
A bit later a W-Wing eliminates 4 from r2c6, producing a Naked Single in r2c6:
Rest is Singles plus one W-Wing.
Now lets look at the situation, when we eliminate only 7 from r9c5. After the
same steps, that led to the X-Wing above, we get the following grid:
As you can see, the 5 in r9c5 makes the X-Wing invalid and thus nothing can be
eliminated from r2c6.
The W-Wing a bit later is the same as above:
But since 5 has not been eliminated from r9c5, it has also not been eliminated
from r2c6, and so r2c6 does NOT become a Naked Single. The simplest step
available is now an XY-Chain, the puzzle has become harder.
Determining if an elimination is "legal" or not is not as easy as it sounds
and I doubt it can be done altogether, especially when you take into account,
that players sometimes execute more than one step at once. The only real
"ultimate" check is, wether an eliminated candidate was part of the solution
or not, as you mentioned above.
A manual check for standard steps can be done using the "All possible steps"
panel: Befor eliminating a candidate, do a search for all steps (you would
have to disable unwanted techniques for all steps as well as for the solver).
Using "Sort cells by affected cells/candidates" (the "C" icon) you can quickly
check, if HoDoKu found steps for your candidates.
Puzzles should definitely not have more than one solution. If F11 produces red
cells, the most probable cause is, that you have overlooked an invalid
elimination before pressing F11. If thats not the case, it would be a bug, but
I would need a test case to verify it.
It is quite possible I overlooked an invalid exclusion. I found it necessary
to increase the intensity of Deviations colour, a little, at some time for
that very reason. Yet, if I deliberately try it now the result of pressing F11
is both Deviations (pink) and Invalid (red) values. F11 multiple times
produces red only.
Whatever the case, Invalid 'solutions' are very rare and I figure it was most
likely something I did. Since the introduction of the Progress Marker, it is
now easier to see if a puzzle is made invalid at some stage.
If, in the remote possibility, I find another F11/invalid result, then I
definitely have in mind to post it here for your consideration.
Thank you for your detailed reply.
I didn't think it would be easy, if even possible.
I failed to note that W Wing is one technique I am not using at present - the
other is HR. That would mean the path I have is different from the one you
have.
Still, it is interesting to me to discover why the Progress Marker colour
changes.
This would be easier to explain if it were possible to attach a .hsol file
here.
As far as I can tell, the following solution is quite "legal".
Starting with Givens: 836..7...1....2....47.1......1....79.7.1.8.2.32....6....
..7.59....8....2...5..138
Locked Pair (or Locked Candidates) 5, 9 in b1 => r3c1 = 2; r2c8 <> 5
Hidden single r8c7 = 7 =>
Naked Triple 3, 4, 8 r245c7 => r3c7 = 9 => r3c8 = 8 =>
Naked Pair 4, 6 r28c8 => r16c8 <> 4
Uniqueness Test 2 or 3 (or 4, more indirectly) 1/5 r16c89 => r6c9 = 6
F11.
I cant reproduce the error. Your solution path is of course valid (except the
typo at the end: r7c9 = 6 instead of r6c9 = 6). When I follow your solution I
get to:
I press F11 and everything is blue as it should.
I think you might be seeing side effects of a bug you reported a while back (
https://sourceforge.net/tracker/?func=detail&aid=3515379&group_id=250484&atid=
1126425), which I have already corrected for the next version: If
you have deleted values from cells while solving the puzzle, F11 might lead to
incorrect solutions.
Sorry, I didn't mean to suggest the puzzle was invalid. I was looking for an
expert opinion on whether my solution path is valid or not. Thank you.
It's not for want of trying that I haven't found an invalid solution yet, but,
if I did, I think I would post it under a more appropriate Subject heading.
Although, in reality, it took me a little longer to spot the Possible UR it
was easy to reproduce and describe (in summary) the minimum steps required -
in this example.
Most UR types, I find, are really easy to see and it is likely that's how I
managed to bypass a series of Hard steps on other occasions. (UR type 3 I
can't do, and I don't think I came across a type 5 yet...)
BTW:
I'm thinking that an image file would be the easiest way to 'describe' a
puzzle state sometimes - showing Givens, Values and remaining Candidates all
at once - and to demonstrate if invalid exclusion is absent. I could post a
screenshot, but..
What I assume is a 'browse' button, to choose destination, in Save as Image,
wants to "Open" a file. Is this a bug?
D is my CD/DVD drive letter. If I manually change destination to C and create
folder "temp", on C drive, it saves image (and accompanying .txt) ok, but I
wouldn't think HoDoku capable of opening them directly anyway.
UR: I like them too and they can be pretty effective.
"Open" is not a bug, but lazyness on my part. But you are right, the UI is not
very intuitive when saving pictures. The default of "d:\temp" is a bug though.
It should initially point to your Documents folder.