bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Quad-DLX implementation of Sudoku soon


From: Christian Robert
Subject: Re: [Bug-apl] Quad-DLX implementation of Sudoku soon
Date: Fri, 2 Dec 2016 18:01:37 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Jay, we found the bug at near the same time,

Xtian,

On 2016-12-02 17:52, Jay Foad wrote:
Your boxed display seems to be missing the 3 in the bottom left corner of a.

Jay.

On 2 December 2016 at 03:10, Christian Robert
<address@hidden> wrote:
Not a bug report,


Left  arg of GenGRID is maximum number of seconds to run (arg is optional
and default to 30 secs)
Right arg of GenGRID is the target maximum number of non-zero digits in the
grid (stopped by timer on the left side)


// generate a random grid and try for the next 60 seconds to reduce it into
a 20 non empty cells.

        Display a←60 GenGRID 20

     ╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗
     ║ 4 │   │ 5 ║   │   │ 2 ║   │ 7 │ 1 ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │   │   ║   │   │   ║   │   │   ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │   │ 9 ║   │ 4 │   ║   │   │ 6 ║
     ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
     ║   │   │   ║ 9 │   │   ║ 8 │   │   ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │ 3 │   ║   │   │ 6 ║   │ 4 │   ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │   │   ║   │   │   ║ 3 │   │   ║
     ╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
     ║   │ 1 │   ║   │ 6 │   ║   │ 8 │   ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │ 7 │   ║   │ 2 │ 1 ║   │   │   ║
     ╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
     ║   │   │ 8 ║   │   │   ║   │   │   ║
     ╚═══╧═══╧═══╩═══╧═══╧═══╩═══╧═══╧═══╝

Took 60.37293294 secs (failed at reducing to 20, final was 21)

      a
4 0 5 0 0 2 0 7 1
0 0 0 0 0 0 0 0 0
0 0 9 0 4 0 0 0 6
0 0 0 9 0 0 8 0 0
0 3 0 0 0 6 0 4 0
0 0 0 0 0 0 3 0 0
0 1 0 0 6 0 0 8 0
0 7 0 0 2 1 0 0 0
3 0 8 0 0 0 0 0 0

One of the hardest Sudoku you can dream of (I think) but still solvable.

I got Lucky, because very few initial grids can be reduced as much as that
...

Will post my Sudoku workspace later when I'm satisfied with his behavior and
speed.


Xtian.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]