Low/Hi Clue Thresholds

Everything about Sudoku that doesn't fit in one of the other sections

Re: LCT-18 Status

Postby debblez » Mon Feb 20, 2023 3:44 pm

Mathimagics wrote:Ok, the search for new grids with 18C puzzles is now resumed, albeit with only 4 cores (JILL), as JACK is busy helping champagne with the 17C search.

I have rewritten the Gen18C process completely, and it is much simpler, and more efficient, I think. It looks to be achieving an NPH of ~3000 (new grids found per core-hour), which is quite good.

The current 18C grid count is 635,256,482.

Cheers
MM

Have you given up on the LCT project? I find it extremely interesting and your progress very impressive.
debblez
 
Posts: 1
Joined: 20 February 2023

Re: Low/Hi Clue Thresholds

Postby dinev » Wed Aug 28, 2019 3:59 pm

Hi, Mathimagics!
I am interested in your project and today started the process of generation. So far have made two batches. Till the end of the day I can manage another two. I use Gen19J.exe , the other app has some problems starting. I tested some of the grids for what I am interested in (pattern games). I am satisfied.
Cheers,
Dinev
dinev
 
Posts: 262
Joined: 19 September 2018

Re: Low/Hi Clue Thresholds

Postby dobrichev » Mon Jul 01, 2019 8:45 pm

40 clues - 1 grid

Code: Select all
123456789456789123798132564231675498584923617679841235367518942815294376942367851
1..4....9.5..8..2..981.2..4..1..5.9.58.92...7.798412.5.67518.4281.294.76.........
1..4....9.5..89.2..981.2..4..1..5.9.58..2...7.798412.5.67518.4281.294.76.........
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Mon Jul 01, 2019 9:29 pm

36 clues - ? grids, 205 GB zip puzzles, small portion found
37 clues - ? grids, 423 774 106 puzzles
38 clues - 1 491 898 grids, 2 123 548 puzzles, significant portion found
39 clues - 2291 grids, 2651 puzzles, significant portion found
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Mon Jul 08, 2019 7:06 am

Hi Mathimagics,

For a particular size N, you need a file with one bit per grid. This is for the worst case "flat" model where neither almost all grids are expected to be set to "false" nor "true". (size 18?)
All you need is to obtain each grid "catalogue number" and update the bit, which can be done on single pass over catalogue, your ordered set, and the result.
While accumulating your set, a similar single pass merges can be done on the smaller but already ordered sets.

Of course for the 17s and 21s it is better to keep directly the ordered grid lists, either "by value" or "by reference".

Key phrases: "sort -mu", "comm -13".
On windows use gsort since the built-in stupid sort isn't easy to remove.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Tue Jul 09, 2019 8:28 am

OK, let start from the final result and then talk about the possible methods.

We want to fill this table
Code: Select all
minClues | numGrids
----------------------
17       |
18       |
19       |
20       |
21       |


In order to accumulate the number, we must keep a track of the grids having (and/or not having) puzzle of respective size.
One possibility is to have one 5,472,730,538 bits long file for each puzzle size where N-th bit is set if we know that the N-th grid from a catalogue is known to have at least one puzzle with respective puzzle size. No puzzle exemplar is stored.
Finally the table above will contain the number of bits set in the respective file.

For 17's we can set the bits for the known solution grids. But how to get the grid number within the catalogue? By ordering the grids with 17's in the same way as we ordered the used catalogue and then doing a single pass over the catalogue and the result file.

For 18's we can safely set all bits from 17's and do further search, and so on for 19's and others.

Is the above clear?
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Tue Jul 09, 2019 2:32 pm

OK, the details from your latest post are quickly focusing to the essentials.

Partitioning the catalogue by band has some advantages and disadvantages which I prefer to skip. Let assume we are working with the whole catalogue.

The most important thing in this data model (beyond the puzzles generation) is obtaining the grid index, right?

My point is that the binary search isn't effective for huge files, but is very effective for chunks that fit in RAM.
You can organize process so that the data (grid + puzzle size + puzzle exemplar) are locally kept in a smaller ordered in-memory container, sort of std::map<grid, <std::pair<int, puzzle>>.
When the data size exceeds the RAM, then it can be dumped to a file. At this point we still don't know the grid index.
Then you can
- combine several files in a larger one on single pass, see https://en.wikipedia.org/wiki/Sort-merge_join. The GNU Coreutils (available for windows) command for merging is "sort -mu", where -mu is merge, unique.
- find differences between files using command "comm". Applicable for determining the newly found records, those that have no corresponding records in the older (already processed) file.
- find grid indexes and update the global puzzle catalogue on a single pass by implementing merge-join in your code.

I know that after my suggestions for UA scanning :oops: , you will try to do exactly the opposite of what I wrote here. On your place I would do the same. :lol:

Some old code for working with collections of compressed grids can be found here.
One possibility to encode a puzzle (of a known size and known solution grid) is to write 80-bit map of the givens, determining the 81-st by size of the puzzle. The code in the above link uses 80 bits per grid, and one of them is free too.

In general that covers all that I wanted to contribute.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Sat Jul 13, 2019 9:58 am

What a big numbers!

I still can't realize how and why you organized the process by bands while mutations result in puzzles from random band. But I prefer explanation formulated at the final stages of the project, not now.

Did you use the results from symmetrical 18's thread in this forum?
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Sat Jul 20, 2019 8:50 pm

blue wrote:
ive been looking at a grid "which has an 18" but i've been struggling to find the 18 puzzle from scratch ....
this grid
Code: Select all
347981256582476193169523874896245317754318962213769485925137648478692531631854729

how long does your program take to confirm one 18-puzzle ? [ and how many 19s ? !]

5.4 seconds to confirm "only one" 18, and 213 seconds to find 2709 19's (including the 63 non-minimals).
(Any confirmation(s) of the 2709 number ?)


Confirming 1x18 + 2709x19.
188 and 4000 seconds. Your code is both fast and correct.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Wed Aug 14, 2019 3:08 pm

Well done!!!
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Sat Oct 19, 2019 3:31 pm

I would suggest checking for "twin" puzzles and for minimality, if not already done.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Sat Oct 19, 2019 7:14 pm

I meant producing 18s by 19s which by chance have a redundant clue.
"Twins" are puzzles with same exterior (cell values for the initially non-given cells) but different interior (some givens are changed). They are easy to produce by a single solver call. For small number of givens they are not very frequent but make a bridge to a valid puzzle that differs from the original by several values at once.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby dobrichev » Tue Feb 11, 2020 1:41 pm

Hi Mathimagics,

If I understand your post correctly, you are investigating correlation between a low-clue grids and their respective lexicographically minimal band.

Since grid consists of 6 bands I see no reason to take only one of them.
See this post for alternative approaches for 17s that take into account all 6 bands.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Make Puzzles Not War

Postby dobrichev » Thu Feb 23, 2023 3:29 am

I'm glad the project is active.
dobrichev
2016 Supporter
 
Posts: 1871
Joined: 24 May 2010

Re: Low/Hi Clue Thresholds

Postby eleven » Mon Oct 21, 2019 8:40 pm

Strange post, don't need you anymore, thanks ? Hopefully i misunderstood this.
eleven
 
Posts: 3235
Joined: 10 February 2008

PreviousNext

Return to General