× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



--- David Kahn <dkahn400@xxxxxxxxxxx> wrote:

> Anyone interested? Is it OK to post the code
> here?

I've heard from both Gerald Magnuson and Leif
Guldbrand, who has offered to put it on his
www.Think400.dk website if he deems it worthy, and
I've sent a copy of the source to each of them. It's
anyone else's for the asking but I won't post it to
the list.

Essentially the program displays a grid for you to
fill in a starting position. You can then either step
through the solution stages or use a function key to
"crunch" straight through to the end.

The display shows the %age complete, and also shows
counts of the number of changes on the previous step,
and the current number of cells containing guessed
numbers. These were originally included for debugging
purposes but they seemed interesting enough to leave
there.

At each stage the program goes through a crossing out
process where it looks at the current set of numbers
in the grid and unflags the possibility of those
numbers occurring in other cells in the same row,
column or box. If only one possibility exists for a
cell that number is entered.

If at the end of the stage no changes have taken place
the program takes a guess at the value of one of the
unfilled cells with the lowest number of possibilities
remaining. If during a stage the program sees that a
cell has zero possibilities it then considers the
current number of guesses.

If there are no guesses it declares the starting
position insoluble and stops. If there are guesses it
restores the situation to that immediately preceding
the last guess, unflags the guess as a possibility
(which usually leaves just one other possibility for
that cell) and carries on as before.

I believe that these two processes are properly called
deduction and bifurcation, but as this is the non-tech
list we probably ought to stick with the terms
crossing out and guessing. Easy puzzles require no
guesses whereas really hard ones seem to need 4 or 5.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.