Click here to Skip to main content
15,904,024 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Sounding off on the responses Pin
kalberts19-Mar-18 3:50
kalberts19-Mar-18 3:50 
GeneralRe: Sounding off on the responses Pin
W Balboos, GHB19-Mar-18 3:51
W Balboos, GHB19-Mar-18 3:51 
GeneralRe: Sounding off on the responses Pin
kalberts19-Mar-18 3:54
kalberts19-Mar-18 3:54 
GeneralRe: Sounding off on the responses Pin
W Balboos, GHB19-Mar-18 4:00
W Balboos, GHB19-Mar-18 4:00 
GeneralRe: Sounding off on the responses Pin
kalberts19-Mar-18 4:15
kalberts19-Mar-18 4:15 
GeneralRe: Sounding off on the responses Pin
PIEBALDconsult19-Mar-18 10:32
mvePIEBALDconsult19-Mar-18 10:32 
GeneralRe: Sounding off on the responses Pin
PIEBALDconsult20-Mar-18 10:49
mvePIEBALDconsult20-Mar-18 10:49 
GeneralRe: Sounding off on the responses Pin
W Balboos, GHB21-Mar-18 1:17
W Balboos, GHB21-Mar-18 1:17 
PIEBALDconsult wrote:
but I wonder what yours makes would have made of them.
(FIFY) It probably would have failed.

Sophistication was added in stages (based on ease of translating thought to code).
Single-Box Level:
1 - does row have 8 of 9 already determined? Fill in (the most obvious).
2 - intersection of two rows: does it exclude all but one value?
Sector Level (a 3x3):
3 - Exclude current contents of the 3x3, and does it force the single remaining value?
4 - Include intersecting row and column in this consideration.

This worked for easy and less easy boards. The difficulty of translating thought to code keeps increasing. If it failed to change anything on a pass then game-over.

Score-keeping for each box was kept with a bitmask for that box (I like bitmasks) that needed to match mask 1 - 9 (initialize to 0x1F). Could be checked, for example, via a switch.

But this was long ago and more sophisticated play put it out of its misery.

Ravings en masse^
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

GeneralRe: Difficult-to-solve Sudoku wanted Pin
Fueled By Decaff19-Mar-18 3:23
Fueled By Decaff19-Mar-18 3:23 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 3:33
kalberts19-Mar-18 3:33 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 5:02
mvePIEBALDconsult19-Mar-18 5:02 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 5:57
kalberts19-Mar-18 5:57 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 8:59
mvePIEBALDconsult19-Mar-18 8:59 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 5:21
Dezhi Zhao19-Mar-18 5:21 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 6:16
kalberts19-Mar-18 6:16 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 7:15
Dezhi Zhao19-Mar-18 7:15 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 8:33
kalberts19-Mar-18 8:33 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 9:21
Dezhi Zhao19-Mar-18 9:21 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 7:30
Dezhi Zhao19-Mar-18 7:30 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
kalberts19-Mar-18 9:18
kalberts19-Mar-18 9:18 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao19-Mar-18 9:35
Dezhi Zhao19-Mar-18 9:35 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 16:37
mvePIEBALDconsult19-Mar-18 16:37 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
Dezhi Zhao20-Mar-18 3:06
Dezhi Zhao20-Mar-18 3:06 
GeneralRe: Difficult-to-solve Sudoku wanted Pin
PIEBALDconsult19-Mar-18 10:34
mvePIEBALDconsult19-Mar-18 10:34 
QuestionKid Sister Safe These Days... Pin
megaadam18-Mar-18 23:17
professionalmegaadam18-Mar-18 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.