JSudoku - Non-Consecutive

Programs which generate, solve, and analyze Sudoku puzzles

JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 1:56 pm

.
I'm setting up a puzzle generator, and thought I would test whether its output could be pasted into JSudoku.

My test case was this minimal, singles-only SudokuNC (Non-Consecutive) puzzle:
Code: Select all
...........2......7...61..8...............4.9.....6.2..4....5.21.......7......... # NC


I pasted the puzzle, then set the "Design" option "NC -> Adjacent cells". Then asked for full solve, so far so good, it got this right:
Image (Solved): Show
NC-Solved.png
NC-Solved.png (28.61 KiB) Viewed 1223 times


But it also reported that 15 guesses were required to solve it! Hmmm … can that be right? No way! So I started again and noticed something with the pencil-marks:

Image (Initial State): Show
NC-Initial.png
NC-Initial.png (29.18 KiB) Viewed 1223 times


Aha! It clearly hasn't calculated the initial pencil-marks correctly. No adjacency eliminations at all.

But it's definitely solving in NC mode, it produces the correct result. So is this a bug, or do I need to manually tweak it into resetting the pencil-marks?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby tarek » Sat Jan 19, 2019 2:17 pm

Paste your puzzle as if it was a vanilla sudoku then select non consecutive to see if it updated the pencilmarks then.

You can as a third step also check consistency to see if that updates them.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 5:17 pm

Thanks, tarek.

Nothing changes however …

Some experimenting seems to suggest that it only generates the reduced pencil-marks if it generates a puzzle with NC mode selected.

Unfortunately the Paste operation clears the NC mode selection (and presumably any others), so there appears to be no way around this blemish …
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 5:26 pm

.
Hmmm... Simple Sudoku doesn't support any variants at all, it seems, so it's no use here.

Now I'm annoyed! :x

Is there no freely available software that can perform this simple task? (ie confirm that my puzzle is singles-only)

Not that I need reassuring, I am just curious about what people are using (candidates must be free and run on Windows!)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby creint » Sat Jan 19, 2019 6:15 pm

Yes it only needs singles and non-consecutive to solve this.
Public solver from Richard Broughton can solve this one.

What should a solver do when a placement is made? If you place a digit, you can remove pencilmarks (all different). But should it also remove non-consecutive digits in near cells? And what about calculations?
I think its better to do this in a different step, you can add a different rating to every step.
creint
 
Posts: 393
Joined: 20 January 2018

Re: JSudoku - Non-Consecutive

Postby tarek » Sat Jan 19, 2019 6:29 pm

The sudoku variants & many. JC made a great effort in his JSudoku but the number of freely available Variant solver/Generators out there are limited.

I have been going into un-charted territories with variants for some time. I posted many puzzles that nobody has verified because nobody solved nor checked them for me. Welcome to programming sudoku variants!!!

I checked your puzzle & it solves without guessing. Your solver can print out eliminations I'm sure. More programming to do ;)
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 7:20 pm

Well, you see, I don't need a solver or a generator, I just built those. I was just "seeking a compatible partner" to try them out on just for fun really …

The most compatible software partner for the variants I use would appear to be Ruud's SudoCue and Andrew Stuart's online solver.

But the latter is online-only, no downloadable version as far as I can tell, and Ruud's solver won't install on my PC, apparently the .NET framework it was built with is so long out of date it can no longer be used.

creint wrote:What should a solver do when a placement is made? Should it also remove non-consecutive digits in near cells? And what about calculations?
I think its better to do this in a different step, you can add a different rating to every step.

Why would you NOT eliminate NC candiates in the adjacent cells? Isn't that precisely what a solver usually does?

OK, I think I get it - you are talking about an interactive solver APP, whereas to me a solver is simply a function that I use in the generator to create puzzles.

Fancy apps with rating systems are not on my radar, really. My generator is primarily to provide P&P puzzles.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby creint » Sat Jan 19, 2019 7:49 pm

Ruud's solver uses .NET Framework 4.6.1 for version 3.6.6, so you probably are missing the runtime package for that.
creint
 
Posts: 393
Joined: 20 January 2018

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 7:55 pm

Hmmm, the download webpage suggested the latest version was 3.2.0, so I've been using the wrong link.

Where do I find v3.6.6?

PS: I have located RCB's solver, thanks for pointing me to it. Just have to figure out his import puzzle format rules ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby 1to9only » Sat Jan 19, 2019 9:58 pm

Another quick hack!
Code: Select all
...........2......7...61..8...............4.9.....6.2..4....5.21.......7......... # NC ED=2.3/1.2/1.2
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sat Jan 19, 2019 10:15 pm

.
Oh, I see we are rating NC's now! 8-)

Hmm, what do you call a backwoods doctor with dubious medical qualifications?
Answer: Show
Another hick quack! 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby Mathimagics » Sun Jan 20, 2019 3:32 am

creint wrote:Ruud's solver uses .NET Framework 4.6.1 for version 3.6.6, so you probably are missing the runtime package for that.


Got our solvers and versions confused, I think. Richard Broughton's solver is v3.6.6.

So maybe Ruud's Sudocue 3.2.0 really is the only one that is available?


Anyway RB's solver has most of the variant combinations I generate, so that is fine. It doesn't have a generator, apparently, so I can't test a theory I have that you can't combine Windoku with Non-Consecutive mode. I suspect no grids exist, and was hoping RB's solver, which allows this combination to be selected, would find it impossible to generate!


PS: turns out this is true, and was noted back in 2007 (see here).

SO I think that's all my issues resolved, really ... 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: JSudoku - Non-Consecutive

Postby creint » Mon Jan 21, 2019 7:59 pm

What I meant was Richard Broughton's solver, that one can solve non-consecutive.
But you can also test it with my solver when it is available.
creint
 
Posts: 393
Joined: 20 January 2018


Return to Software

cron