The QBasic Forum      Other Subforums, Links and Downloads
  << Previous Topic | Next Topic >>Return to Index  

Completed latest project: SuDoku Goof Counter

August 21 2007 at 5:03 PM
  (Premier Login iorr5t)
Forum Owner

http://www.network54.com/Realm/iorr5t/SWP.zip

SuDoku Work Pad (SWP) is a program designed for SuDoku solvers who don't want any help with pencilmarks (and indeed probably sneer at there use). You enter a puzzle and try to solve it. It knows the solution and counts any goofs you make trying to find it.

Fun to shoot for the ultimate reward: "Perfect Solution"!!!!!!

Mac


 
 Respond to this message   
AuthorReply
drew
(no login)

Sweet, MAC! I love it..

September 5 2007, 1:25 PM 

I don't have a boss, but the ESC is pretty handy

However, I did find one thing that was wrong with it.

It didn't provide the answers for me..

What kind of people like to do sudoku without the answers lol..



(I get these for homework all the time in Healthfull Living)


Nice PRO!

Drew

 
 Respond to this message   

(Premier Login iorr5t)
Forum Owner

Thanks, drew

September 6 2007, 5:23 AM 

The answer is there, but you have to sacrifice to get it.

Just try numbers and you will be penalized until you get it right. Then go to the next number. You can solve the whole puzzle that way.

Then you get "Solved with 213 errors!"

But you've got your solution.

Mac

 


 
 Respond to this message   
drew
(no login)

RE: Thanks, drew

September 6 2007, 11:53 AM 

213.. Is that the max, or the max that you have tried.. lol

there are 6 squares of 9.. thats 54 possibilities, if you get it right on your first try... Lets say you get it on your last try..

0 - 9 is 10 different options.. thats 54 * 10 = 540 - given

Haha that is true, better than an eraser to =]

I like the layout for it.. Nice and simple

Whats up with "0" it looks like "" and goes to the next line, you can't see it.



drew

 
 Respond to this message   

(Premier Login iorr5t)
Forum Owner

What's up with zero?

September 6 2007, 12:33 PM 

Say you see a puzzle in the newpaper which looks like this:
   ---  87-  ---
   --1  --4  ---
   5--  2--  3--

   2--  -9-  -6-
   43-  ---  -25
   -9-  -3-  --7

   --8  --5  --9
   ---  1--  2--
   ---  -69  ---

(Where "-" means a cell with nothing in it)

You can enter the puzzle by putting the cursor on r1c4 and pressing 8. The cursor will automatically go to r1c5 which is logical, right?

OK, so you enter 7 and now you use the mouse again to go to r2c3 in order to enter the 5. Etc, etc.

Well, I am a pretty good speed typist on the numeric keypad. So I would not mess with the mouse but instead would start out
---87------1--4---5--2--3--, etc.

The zero is nice and easy to hit on the numeric keypad, so I use it to skip boxes. Actually I would enter
000870000001004000500200300, etc.

So the zero is intended to enter nothing. The spacebar does that, too and sometimes I use it when I am solving and thus not using speed typing.

For your other question: 213 was just the max I hit. But it would be interesting to compute the worst case. Assume a typical puzzle that has about 25 cells originally filled in. We have 81-25 cells to go. Further assume that rather than entering 1-9 in order, we enter them at random and, unfortunately, the last one entered is always the correct one. (I'm assuming we don't try the same number twice in a given cell)

So we will have 8x56 = 448 errors. That would be the max although my program doesn't provide for a max. I guess if you continually and stubbornly guessed 8 in cell r1c1 long enough, the program will bomb out on the limit of BASIC's INTEGER range. I know I didn't put in a check, so it is one of the few programs I publish that allow the user to crash the program.
Maybe it is the only one.

Mac


 
 Respond to this message   
Current Topic - Completed latest project: SuDoku Goof Counter
  << Previous Topic | Next Topic >>Return to Index  

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums