Article View: sci.electronics.design
Article #1330Re: Puzzles
From: Don Y
Date: Wed, 18 Nov 2026 00:35
Date: Wed, 18 Nov 2026 00:35
339 lines
15058 bytes
15058 bytes
On 11/15/2026 7:13 AM, Waldek Hebisch wrote: >> --7-1-2-5 >> --6----7- >> 9----73-1 >> 73----8-- >> --27---13 >> 8-135-7-6 >> ---296137 >> --3-7---- >> 279-3-6-8 >> >> But, at that point, you have to make a guess. > > No, I can get at least to: > > --791-265 > --6----7- > 9----7381 > 73----8-- > --27---13 > 8-135-7-6 > --8296137 > --3-7---- > 279-3-6-8 The difference between your state and mine resolves to: ---9---6- --------- -------8- --------- --------- --------- --8------ --------- --------- suggesting you deduced one of these moves could be reasoned from the current state of the solution WITHOUT GUESSING. I don't see that to be the case (but, if I am wrong, you can indicate which was the "next" move that you reasoned after my state). > At this point I have a lot of extra information, but I do not > know if this information is enough to find next square > (my single guess was made at this point). Solver tells me > that starting from this it still needs 2 decisions, when > I give it the next (guessed) state it say that it needs > 1 decision. So simple propagation will not work, but > more complex rules may work (as apparently happens with > the second decision point, which solver needs, but I do > not need). I regard my state as requiring a guess. The correct guess is to select '4' as the choice for the upper left corner of the upper left 3x3 grid. This unambiguously resolves to: 487913265 316825974 925647381 734162859 652789413 891354726 548296137 163478592 279531648 >> And, have to carefully consider WHERE you make that guess >> if you don't want to end up having to make ANOTHER guess. >> >> I don't consider puzzles that rely on guesswork to be >> particularly appealing as you can rationalize not doing ANY >> deductive work and just guessing at the whole thing! > > Well, if you are too eager to make guesses, then you are > likely to spend a lot of time pursuing wrong paths. > Consequently, you are unlikely to find solution in > reasonable time. I make a guess when (and only when) there are no unambiguous deductions available. In an attempt to minimize the number of possible wrong guesses that may be required, I examine those cells for which only two choices exist (a cell with a single choice would be obvious; a cell with 8 choices would leave me wondering which of those 8 to try first... second... third...) In this case, the possible choices (for the indicated cell) were 3 and 4. If I had picked 3, the solution would have progressed to a contradictory state *or* a state that required yet another guess (I got lucky so I don't know what '3' would actually have led to) But, this is an annoying approach to the problem, comparable to just throwing guesses at a poorly constrained grid. There's no satisfaction from having *worked* through to the answer. >>> and several steps beyond that. As one point I did a binary >>> guess, I guessed correctly and after that I got a solution. >>> >>> Actually, at later step I made a mistake, so I tried the >>> other possiblity which led me to contradiction. Consequently >> >> Exactly. But, then you have to "backup". Easy for a machine >> algorithm but a lot harder to do "in your head" > > I was not doing it in my head. I have kept copies of > the state after making a move (or a few if they were > obiously related). I did it in a computer file, but > the same would also work on the paper (given sufficient > supply of scratch paper). So backtracking itself is not > hard. The problem is amount of work you need to do > if you backtrack too eagerly. Unambiguous deductions are easy to follow through with. When you get to a point where a "choice" is required, then things fall to a sort of intuition -- recognizing patterns of "remaining candidates" in the indeterminate cells and using that to bias your choice of WHICH cell to exercise and which VALUE to pick, first. There is no guarantee that this will yield a successful result. But, it is a strategy that *hopes* to leave you facing a series of potentially incorrect "guesses" for a cell with lots of candidates. >>> I suspected that this may be a "bad" sudoku, without >>> solution. But I created a solver and it found solution. >>> Comparing I fund place where I made an error and restarting >>> from this place I got solution. >> >> IME, all of the puzzles have been solvable. But, often require >> a guess. >> >> Minesweeper is similarly annoying as some puzzles resolve to a >> point where you can't unambiguously determine the next "safe" >> square. > > I think it is supposed to be a feature. If you make too many > guesses you will sooner or later hit a mine and loose. Minimizing > guesses siginficantly increases chance of winning. The first move in Minesweeper is always a guess as there is no hinting available on an empty board. But, you can expose most "safe" moves deductively (you can even ask it to do that for you with a "trial pick"). However, you can be left with states where the hints tell you N of the remaining N+e squares have mines under them -- yet, no way of resolving WHICH is safe and which the likely mine. Again, you've invested time very deliberately identifying exactly which locations have mines and which are "safe" -- yet are forced to GUESS which of the few remaining are mines from ambiguous hints. >> This is disappointing as you've invested time and been screwed through >> no fault or deficiency of your own. > > Goal of creators usually is not pure satisfaction of users. > Rather, they want you to come for more. If you win every > time than you will quickly become bored. OTOH "I almost > made it" encourages another trial. Then every game should be similarly enticing. And, the first move shouldn't expose you to a catastrophic failure before you've even invested any time. > There is old puzzle of 15. You have 4 by 4 grid and movable > squares with numbers from 1 to 15 fitted into it. One > square is empty and you can move any neighbouring movable > square into the empty position, in effect exchanging empty > square with one of the neighbours. The goal it to put > squares in order. But there are to classes of positions, > one class which can be ordered and the second one where the > best you can do is to get at distance of one exchange to > the ordered state. Apparently, all puzzles are sold in > unsolvable position. OK, all such puzles (a few) that I > got in my hand were in such state. One can disassemble > the puzzle and put it back in another state, but I doubt > the users did it. Rather, I think that manufacturers > decided that they can sell more selling them in unsolvable > state. > >>>>> So you may simply generate random sudoku and reject >>>>> ones that do not have unique solution. Slightly harder may >>>>> deciding how hard given sudoku is for people (you do not want them >>>>> too easy, but also you do not want ones that only computer >>>>> can solve). >>>> >>>> Exactly. What *criteria* does an algorithm use to create a puzzle >>>> of a given complexity? How do you even MEASURE the compleity? >>>> Is it simply a matter of the number of prefilled squares that are >>>> presented to the player? Or, do the *choices* of those squares >>>> significantly impact the difficulty level? >>> >>> I would say that difficulty depends on complexity of algorithm >>> needed to solve it. Basicaly anybody can to simple >>> propagation, if it leads to solution, then the sudoku is >>> easy. If more complex propagation rules are needed, then >>> it is harder. People seem to be quite reluctant to >>> systematically check alternatives, but if number of >>> alternatives is small, than IMO the sudoku is stil >>> reasonable. Of course, people that know only simple >>> propagation may be forced to check alternatives in >>> cases where better propagation rules would lead to >>> unique possibility. >> >> >>> Number of prefilled squares determines number of squares >>> to fill, so in a sense amount of work, but otherwise >>> I do not think that corelation with difficulty is >>> very strong. >> >> But, as this program has difficulty levels, it has used >> SOME criteria to determine how to create suitable puzzles. > > As I wrote, you can judge difficulty based on rules > needed to solve it and beyond that by number of decision I suspect the criteria actually implemented aren't that sophisticated; more probably, "reveal X cells" where X decreases with difficulty (providing less deductible constraint for the player) > points. Concerning methods, in several situations random > generation works well to produce varied objects. You > may need to think about good distribution, for example > I use random generation of expressions, but my first > attempts tended to produce expressions with undesirable > characteristics. Later, I learned about better > distribution. > >>>> Or, is it easier to just PREcompute the set of potential puzzles >>>> using symbolic representations of the numbers, select one at >>>> random, apply rotation/flip transforms to further "randomize" >>>> it and then bind digits to the symbols?? If the number of such >>>> "templates" is small, then simply storing them might be more >>>> efficient than generating them. >>> >>> I am not sure how much effort is needed for generation. Solver >>> solves your one in less than 2ms. Similarly, starting from >>> empty square (of course in such case there are multiple >>> solution, but solver produces just one of them). So, one >>> can make several solution attempts, changing candidate >>> sudoku for better properties and still have subsecond >>> generation time. >> >> The issue is identifying the criteria that one can use to >> determine "deterministic" solvability when *creating* the >> puzzle. With a crossword, it is obvious that a created >> puzzle is solvable because you created it in its solved state >> and the clues are supposedly correctly associated with each >> entry. > > I am not sure why you repeat "when creating". You can > generate first and discard bad ones later. Or, if that > is too expensive you can mutate generated bad case till > it is satisfactory. It seems the best approach is to generate a solution and then decide how much of it to *reveal* to the player, based on his level of difficulty. After all, you have to be able to generate *a* solution for the puzzle. >>>> E.g., weed out all words that are shorter or longer than the shortest >>>> unsolved clue (repeat throughout the solving stage). >>> >>> I am not sure what you want to say here. Of course you need >>> some lingustic knowledge in form of word list and for each >>> word you need possible questions/clues. You may wish some >>> form of semantic markup if you aim at specific theme. >> >> The mechanistic way of fitting words to a grid is easy. >> There are optimizations you can use to keep pruning the list >> of available "candidates" to place into the puzzle. >> >> But, the harder problem is how those words map back to their >> clues. > > I suppose that this is done via precomputed table. I guess > that in old times crossword makers had a list of words, > maybe as explict set of cards, maybe implicity as content > of dictionaries and similar works on their bookshelf. In an automated solution, I would just tag each word with criteria that the "designer" could use as filters. E.g., "baseball" seems a common theme in many crosswords that I've solved. So, I would tag words associated with baseball with "#baseball" and would bias the algorithm to select those over "non-baseball" words. The actual clues associated with each word would be more difficult to predefine as the theme can let you bias the clues to make the solution easier or more difficult (at your perogative). But, I think -- given a completed grid -- a human could exploit his creativity to fabricate an appropriate set of clues, having the "fitting" already handled for him. > In modern times you could try to create needed table using > data mining combined with available language resources like > WordNet. > >> The crossword app in the Nook lets you choose >> difficulty level, themeless, etc. >> >> Some of the difficulty lies in creating ambiguous clues; >> clues that suggest one word but actually mean another >> (often playing on different parts of speech, etc.) > > I guess now LLM could help with this, but in the past this > probably needed human work. > >> But, when you want to tie the clues (and solution words) >> together in a theme, that limits the clues you can offer >> and the words to which they reduce. >> >> I don't see an easy way to impose these criteria >> algorithmically. How do you decide on a theme? How >> do you rationalize a solution as being consistent with >> that theme? > > AFAICS this is play with probabilities. I the past humans > would provide marked data, now there are data mining > techniques and LLM-s. Doing this needs a lot of raw > data and a lot of compute power, so an app almost > surely uses precomputed tables. Humans are needed to create ORIGINAL puzzles -- themes that may not have been tried, word combinations, etc. (when I was a kid, crosswords were prohibited from having anything more than single word answers) And, to create "cleverer" clues that rely on puns, etc. instead of simple dictionary definitions.
Technical Details
Message-ID:
<11dirs3$tunv$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11ctgil$1ll56$1@dont-email.me> <11d4l69$nmdf$1@paganini.bofh.team> <11d5h3q$clc0$1@dont-email.me> <11dbb79$1j1jt$1@paganini.bofh.team> <11dbhfm$2hd3d$1@dont-email.me> <11dcen5$1ku24$1@paganini.bofh.team>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Don Y <blockedofcourse@foo.invalid> Newsgroups: sci.electronics.design Subject: Re: Puzzles Date: Tue, 17 Nov 2026 17:35:10 -0700 Organization: A noiseless patient Spider Lines: 339 Message-ID: <11dirs3$tunv$1@dont-email.me> References: <11ctgil$1ll56$1@dont-email.me> <11d4l69$nmdf$1@paganini.bofh.team> <11d5h3q$clc0$1@dont-email.me> <11dbb79$1j1jt$1@paganini.bofh.team> <11dbhfm$2hd3d$1@dont-email.me> <11dcen5$1ku24$1@paganini.bofh.team> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 18 Nov 2026 00:35:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="981759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z8zxVgElbw91LXkOOcvKf"; posting-host="31a80694dd1c76d0b89d5169a6888597" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:pqw1jjioBik1/BCQKETBHmkuFgk= sha256:4lLisBMXyzkvUsoXw7KzkxBHdoYvrCzoTUPZatzHYDw= sha1:lZ6o8Y+UagZjqbEILSQfLDFsIg0= sha256:1K1BeQmRT2yKnkVKRAhZmuv6JQyQo0BjdYqcFOK0Wfc= In-Reply-To: <11dcen5$1ku24$1@paganini.bofh.team> Content-Language: en-US