# Thread: Contest 6 - Sudoku solver - Discussion

1. ## Re: Contest 6 - Sudoku solver - Discussion

Originally Posted by manavo11
I mean the night from Friday to Saturday midnight...
Huh?

2. ## Re: Contest 6 - Sudoku solver - Discussion

The entries will be accepted if they are submitted until 23:59 Friday night... Now?

3. ## Re: Contest 6 - Sudoku solver - Discussion

In plain Finnish that means "sinulla on alle 24 tuntia aikaa" which translated to English means "you have less than 24 hours to go". About 23:25 if I'm not mistaken.

4. ## Re: Contest 6 - Sudoku solver - Discussion

GMT at the moment it's 01:37 AM... if i'm not mistaken...

5. ## Re: Contest 6 - Sudoku solver - Discussion

Well according to the time converter I went to then Oregon (USA) is GMT - 7 so midnight GMT is 7AM the same day. Am I mistaken?

6. ## Re: Contest 6 - Sudoku solver - Discussion

I think it means that you have till 17:00 (5 PM) to submit...

When it's midnight GMT, you will be 7 hours behind, which means 5 PM...

7. ## Re: Contest 6 - Sudoku solver - Discussion

That saves me a lot of stress. Thanks manavo.

8. ## Re: Contest 6 - Sudoku solver - Discussion

Just uploaded the 1011 patterns for the contest.
T - 16ish hours...

-Lou

9. ## Re: Contest 6 - Sudoku solver - Discussion

The file format should be:

Quote:
FileName001.msk: (SOLVED or FAILED) in 0,000000 seconds!
Later today, 8 hours or so, I'll tweak My code , generate some patterns that return more than 1 solution, {Hence, UNSOLVABLE Sudoku} and get those submitted, to allow testing on the SOLVED or FAILED requirement.

-Lou

10. ## Re: Contest 6 - Sudoku solver - Discussion

Err... my solver solves those as well, in case you mean just more than one solution. It just gives one of the possible answers. There is nowhere said in the rules that "sudokus with multiple solutions are equal to invalid sudoku, thus the solver function must return false when it meets such a sudoku". However, if you mean really unsolvable (board that can't be solved because there must be two or more of the same number in certain row/col/block) then it gives FAILED just fine.

11. ## Re: Contest 6 - Sudoku solver - Discussion

I agree with Merri... If there is more than one solution the app won't fail to solve it, it will only fail if it can't find any of the possible solutions...

12. ## Re: Contest 6 - Sudoku solver - Discussion

Darn!

I hoped you wouldn't point that out.

{In terms of a generator, I consider a multi solution sudoku as a failure, along with those that throw off conflicted cell values.}

Oh, well. That would take a bit more development time. Never mind.

-Lou

13. ## Re: Contest 6 - Sudoku solver - Discussion

It is very easy to do such sudokus just by hand. For example, there can be only one completely symmetrical group of numbers within a sudoku. Thus if you place numbers in symmetrical way in the board, you get an invalid sudoku. So if you just make enough symmetric placements that first seem to be valid, you easily make an invalid sudoku. A completely symmetric placement of any numbers require that the centermost cell is included... thus if you try to place all numbers according to the symmetry, then all numbers are pointing to the centermost cell... the problem is that only one number can be there and thus you'd get eight invalid placements to the centermost block.

14. ## Re: Contest 6 - Sudoku solver - Discussion

True. Its easy to make an invalid base.

Now Hide all but "N" of them.
Now, Solve this msked arrangement.

Is the result necessarily the base you just created, or could it be a true sudoku?

15. ## Re: Contest 6 - Sudoku solver - Discussion

Last minute question... when you load the sudoku problem into my program it fills some lookup arrays other than the normal 'grid'...is this acceptable or must this be in the solver routine.
And since my code is implemented in a Module (not a class) can I have a Initialise subroutine?

16. ## Re: Contest 6 - Sudoku solver - Discussion

I would say, if by "Lookup" grids they are not created by any analysis of the puzzle, but are constant from 1 puzzle to the next, like an intermapping between the 2x2 position of the 81 cells in relation to the 9 rows and 9 columns, then I'd think you would want to initialize them in the form_load event.

But if they ARE unique to each puzzle, if you do any analysis of the puzzle whatsoever to build these grids, then I'd have to say they need to be in your solver area.

Of course, thats only My opinion.

-Lou

17. ## Re: Contest 6 - Sudoku solver - Discussion

Thanks.
Yet another question....after you have completed solving one problem...where do you put the 'cleanup - clearing arrays etc.' code in the same subroutine as the solver or can you put it elsewhere so it isn't timed?

18. ## Re: Contest 6 - Sudoku solver - Discussion

I would think that, any arrays that "Need" to be cleaned up would be redimmed at the start of each solving, in your solver, hence they would be timed.

If the arrays are static, ie.. again an intermapping between 2D coordinates and 1D, then they never have to be cleaned up. But any arrays that are used for temperary values, obviously if any preexisting values interferes with the next puzzle processing, would have to be cleaned up, and IMHO, that should be part of the timing.

Of Course, it could also be argued that, if all you are doing is zeroing existing arrays, without truly adding any information into them, then they should also be outside of the timeing.

So, I officially have no idea.

-Lou

19. ## Re: Contest 6 - Sudoku solver - Discussion

Yeah , Im just zeroing my arrays....hope that's ok.

20. ## Re: Contest 6 - Sudoku solver - Discussion

Originally Posted by NotLKH
Of Course, it could also be argued that, if all you are doing is zeroing existing arrays, without truly adding any information into them, then they should also be outside of the timeing.
I have a sub call PrepareSudoku that sets all my relevant modular level arrays to 0 (or whatever their default value is) that is not based on the contents of the current puzzle in any way. I don't time this. I don't think Merri does either.

Manavo, can you clear this up (again? )?

Thanks!

22. ## Re: Contest 6 - Sudoku solver - Discussion

Posted it ...hope it does well

23. ## Re: Contest 6 - Sudoku solver - Discussion

3 hours to go exactly. I guess I don't have time for any more optimizations, so I guess I will re-read the rules and scan the code a couple times (and remove things that are there for testing purposes only) then submit.

24. ## Re: Contest 6 - Sudoku solver - Discussion

Hehe, I left my code in a pretty unclean state. Ten minutes to go and the deadline is here... I weren't able to comment all the code as well as I wanted to, there just were too many things I tested. I've a lot of undone code as well... just the way it is. No time to do everything I want.

At the moment MegaTokyo translation is getting close to my heart again, so I've been working with it for the last three days. I need to work a few more so I don't need to think about it too much in three months or so. Needs about a week more work and I'm there. Then I can spend time with other things as well.

25. ## Re: Contest 6 - Sudoku solver - Discussion

I submitted mine about 10 minutes too late and I really hope manavo accepts it. I am pretty sure he will. I left home and what I did took extra long then I rushed back to submit it in time.

26. ## Re: Contest 6 - Sudoku solver - Discussion

Hehe yeah I don't think 10minutes late is too bad .
When do the results come out?

27. ## Re: Contest 6 - Sudoku solver - Discussion

He'd have to give you a 10 second penalty for being late. Should have said your clock was wrong
Maybe you could argue "Monkey Time" ?

28. ## Re: Contest 6 - Sudoku solver - Discussion

10 second penalty YIKES!....might as well give up

29. ## Re: Contest 6 - Sudoku solver - Discussion

Now I feel bad I didn't answer all your questions before the end

However, NotLKH's unofficial answers are correct, so I hope you listened to him

eyeR, 10 minutes isn't a problem, don't worry

30. ## Re: Contest 6 - Sudoku solver - Discussion

When are the results gonna come out?

31. ## Re: Contest 6 - Sudoku solver - Discussion

I have just downloaded all the entries. Not many I'll probably start marking now

Good luck everyone

Thanks

33. ## Re: Contest 6 - Sudoku solver - Discussion

Question for all contestants :

Do you want the marking to be in the IDE or compiled?

The answers I need are from :

Brick1 : Compiled
bpd : IDE
Merri : Compiled
kaffenils : Compiled
Raedwulf : Compiled
eyeRmonkey : Compiled

Thanks

34. ## Re: Contest 6 - Sudoku solver - Discussion

Compiled. With all advanced optimizations turned on in each. Saves you a lot of time

35. ## Re: Contest 6 - Sudoku solver - Discussion

Compiled .. Same as Merri 'all advanced optimizations turned on'

36. ## Re: Contest 6 - Sudoku solver - Discussion

OK, since majority rules, if 1 more person picks compiled I'll release the compiled results

37. ## Re: Contest 6 - Sudoku solver - Discussion

Tension rising
Tick tock Tick tock.....
Im growing impatient :P
1 hour after the announcement 3/6 votes
3 hours after the announcement 3/6 votes

38. ## Re: Contest 6 - Sudoku solver - Discussion

I'm sure that the majority will pick compiled, but just incase, I'll wait for the other 3 members to reply

39. ## Re: Contest 6 - Sudoku solver - Discussion

Ok manavo, just read it.
To be honest, i dont care IDE or compiled. No difference if it's for everyone the same.
But agree for compiled, to get things going.

40. ## Re: Contest 6 - Sudoku solver - Discussion

Wow, not too many entries. I feel special now.

I vote for compiled with all advanced optimizations if possible. Also if you are on a Pentium, do that optimization too.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured

Click Here to Expand Forum to Full Width

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.