Patterns Game Strategies

Interactive on-site game threads go here

Re: Patterns Game Strategies

Postby 1to9only » Fri Nov 02, 2018 10:34 pm

champagne wrote:Apparently 1to9only intensively searched the 4.5-8.1 area.

For the end-game in 0329, rather than turn off the computer after 3 days, I switched to a 'random' strategy - using gsf to generate (from the dealer pattern) 1000 random puzzles, using these as seeds (the strategy being that no one else was using these as seeds!), and running the search overnight!!

It yielded a few trumps, the ED=6.8/6.8/6.6 played this morning was found this way. I may tweak this strategy for future games!

The strategy is not good at the start of the game, it yields diamonds too slowly... From having run this a few times now, it also does not produce many high rated puzzles, but it is useful searching the mid ranges...
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

how 999_Springs found the 5.3

Postby Pat » Wed Dec 05, 2018 1:13 pm

User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

re: summary of winning posts

Postby Pat » Mon Dec 17, 2018 1:07 pm

m_b_metcalf wrote:

    I also attach the latest version of my
    summary of winning posts

in game 333,
999_Springs found the first-ever 5.3

this may require an adjustment in your table,
to accomodate ratings such as 6.5/5.3/2.6

    ( or a similar 7.2 --
    which could be lost
    as we quickly get better 7.2
    )
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: Patterns Game Strategies

Postby 999_Springs » Mon Dec 17, 2018 7:32 pm

lol if someone actually found a EP=5.3 i would seriously buy you a drink (or two drinks for ED=5.3). since EP=4.9 or 5.1 haven't been played yet i highly doubt that would happen. maybe if someone constructs a puzzle by hand specifically for it

also mike's table has zeros for all possible numbers to one decimal place, not just all ratings, so he doesn't have to do anything

by my count here are the 2 highest ratings for each ER in the weird mid ranges (following patterns game rules about counting puzzles for rarity)
4.5/4.5/4.5x1 4.5/4.5/4.4x1
4.6/4.6/4.6x1 4.6/4.6/4.0x2
4.7/4.7/4.7x1 4.7/4.7/3.8x3
4.8/4.8/3.4x8
4.9/4.7/2.8x1 4.9/4.5/2.6x1
5.0/5.0/5.0x12
5.1/3.4/2.6x1 5.1/2.6/2.6x1
5.2/5.2/5.2x5
5.3/1.2/1.2x1
5.4/5.4/5.4x8
5.6/5.4/5.4x3
5.7/5.4/5.4x1 5.7/5.4/3.0x1
5.8/4.7/3.4x1 5.8/4.6/3.4x1
5.9/4.6/3.0x1 5.9/4.5/3.4x1
6.0/4.7/3.4x1 6.0/4.6/3.4x1
6.1/5.2/5.2x1 6.1/3.8/3.4x1
6.2/6.2/6.2x66
6.5/6.5/3.8x1 6.5/6.5/3.6x3
999_Springs
 
Posts: 591
Joined: 27 January 2007
Location: In the toilet, flushing down springs, one by one.

Postby Pat » Tue Dec 18, 2018 8:15 am

999_Springs wrote:

    lol if someone actually found a EP=5.3---

    since EP=4.9 or 5.1 haven't been played yet
    i highly doubt that would happen

re x/5.3/z, right, low chance

    i was merely pointing out the danger
    that 7.2/5.3/z ( or similar )
    could be discarded

as for x/4.9/z,
it was found very late
( and thus not played )

User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Re: Patterns Game Strategies

Postby m_b_metcalf » Tue Dec 18, 2018 11:19 am

Attached is my latest summary of the submitted and winning posts. There are sometimes tiny discrepancies between me and g.r.emlin because I ignore all 'more' submissions, and there were also some glitches around game 40 when g.r.emlin was unwell.

I notice that 999_Springs lists eight 5.4 diamonds. I find only seven, but there were also at least an additional three submitted as 'more'. As he pointed out, my tables can accommodate all ratings from 1.0/1.0/1.0 to 12.0/12.0/12.0.

The 5.3 is there in solitary glory.

Hope that's all of some use,


Mike
Attachments
fplayed.txt
All submissions
(182.04 KiB) Downloaded 190 times
fout.txt
Winning submissions
(107.34 KiB) Downloaded 186 times
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13583
Joined: 15 May 2006
Location: Berlin

Re: Patterns Game Strategies

Postby 1to9only » Sun Jan 06, 2019 2:33 pm

From Patterns Game:
qiuyanzhe wrote:All I could get are 2.0, 2.3, 6.7 and 4.5 puzzles with EP=ED=1.2, and a 2.3/2.3/2.3 one.

From the dealer puzzle (initial seed), most do {-3+3} (remove 3 numbers, add 3 numbers) operations, and rate the generated puzzles, e.g.

Code: Select all
..1...2...32...45.64.....37...6.1.......4.......8.3...37.....28.54...96...6...1..
                                                             |       |    |
..1...2...32...45.64.....37...6.1.......4.......8.3...37.....48.54...36...9...1.. ED=7.3/1.2/1.2

Code: Select all
..1...2...32...45.64.....37...6.1.......4.......8.3...37.....28.54...96...6...1..
                              |                        |                  |
..1...2...32...45.64.....37...2.1.......4.......8.3...36.....28.54...96...9...1.. ED=7.2/1.2/1.2

Code: Select all
..1...2...32...45.64.....37...6.1.......4.......8.3...37.....28.54...96...6...1..
                              | |                               |
..1...2...32...45.64.....37...5.9.......4.......8.3...37.....28.24...96...6...1.. ED=5.6/1.2/1.2

Then, one of the generated puzzle is used as the next seed, repeat...

Some do all or a combination of: {-1+1}, {-2+2}, {-3+3}, {-4+4}, {-5+5}, etc...

Edit: The puzzles generated from seed need checking for being minimal and having unique solution, I think the 3 examples above are valid submissions!
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Patterns Game Strategies

Postby Hajime » Wed May 26, 2021 9:14 am

My program to search for pattern puzzles with a high ED scores is failing ....

the input is a string s of 81 chars with "."-s and "0"-s ; a "." is a free cell and a "0" is a pattern cell.
the fill- and test- subs are BFBT recursive routines
after each digit placement "solve naked/hidden singles" is called repeatedly until "error" or "no further cells solved"

Code: Select all
fill each "0" of s with a valid candidate 1-9, result in string p
   if all "0" replaced with 1-9
     unique=0
     fill  each "." of p with a valid candidate 1-9 in string q
       if all "." filled
            unique=unique+1
            if unique>=2 then discard this p
       end if
     end fill "."
     if unique=1 and test minimal p
           write p to file f
     end if
   end if
end fill "0"


the file f with puzzles is offered to PGExplainer.

Sadly this tactic is not very successful. It can create 10M puzzles in a night but only 2K valid and minimal and a handful !! not with a ED=x.x/1.2/1.2 .
A puzzle is a filled pattern where all "0" are replaced by 1-9 and is unique and is minimal.
Is using some vicinity algorithm the only way to go?
User avatar
Hajime
 
Posts: 1349
Joined: 20 April 2018
Location: Fryslân

Re: Patterns Game Strategies

Postby m_b_metcalf » Wed May 26, 2021 9:30 am

Well, as a first step, after "if all "0" filled with 1-9" you could invoke a singles test: if singles solves any cells, you can reject the combination immediately, eliminating x.x/1.2/1.2 at source.

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13583
Joined: 15 May 2006
Location: Berlin

Re: Patterns Game Strategies

Postby 1to9only » Wed May 26, 2021 10:08 am

Hajime wrote:fill each "0" of s with a valid candidate 1-9, result in string p

I trust you're pencilmarking along the way, and "valid candidate 1-9" means from the pencilmarks.

Hajime wrote:the input is a string s of 81 chars with "."-s and "0"-s ; a "." is a free cell and a "0" is a pattern cell.

I've never started from a pattern grid (of . for empties and 0 of X for givens) - I start with the dealer puzzle (or a random puzzle generated from the dealer puzzle) and do the {-1+1}, {-2+2}, {-3+3} vincinity searches. {-4+4} is also possible. Repeat using one of the generated puzzle (the highest rated!).
User avatar
1to9only
 
Posts: 4175
Joined: 04 April 2018

Re: Patterns Game Strategies

Postby m_b_metcalf » Wed May 26, 2021 1:28 pm

Generating ab initio does allow one to build in all sorts of tricks. For example, I asked my generator to produce puzzles with symmetry of givens for this pattern, and it spat out four pearls in five minutes, the highest being:
Code: Select all
 1 . 2 3 . . . . .
 . 5 . . . 8 . . .
 8 . . . . . 7 . .
 7 . . 1 . . 2 . .
 . . . . 5 . . . 6
 . 2 . . . 9 . 4 .
 . . 3 8 . . 1 . .
 . . . . . 6 . . 2
 . . . . 4 . . 8 .   ED=9.5/9.5/3.4, perfect symmetry of givens.

Such symmetric puzzles are often good seeds for vicinty searches.

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13583
Joined: 15 May 2006
Location: Berlin

Re: Patterns Game Strategies

Postby Hajime » Wed May 26, 2021 2:45 pm

in the first "step" I generate a filled pattern, replacing "0" by givens, indeed trusting my pencilmarks:
Code: Select all
7 . 2 1 . . . . .
. 5 . . . 2 . . .
4 . . . . . 1 . .
9 . . 6 . . 7 . .
. . . . 3 . . . 4
. 2 . . . 8 . 5 .
. . 1 7 . . 6 . .
. . . . . 5 . . 8
. . . . 1 . . 2 . ED=1.5/1.2/1.2
or
Code: Select all
7 . 2 1 . . . . .
. 5 . . . 2 . . .
4 . . . . . 1 . .
9 . . 6 . . 7 . .
. . . . 3 . . . 4
. 2 . . . 8 . 5 .
. . 1 7 . . 6 . .
. . . . . 4 . . 7
. . . . 9 . . 8 . ED=8.2/1.2/1.2
Note the very small difference in the last 4 givens.
@m_b_metcalf : neglecting the x.x/1/2/1.2 is not making the algorithm any smarter or faster. What is the difference "Generating ab initio ... puzzles with symmetry of givens for this pattern, and it spat out four pearls in five minutes" between the 1st and 2nd diagonal-symmetric puzzle? My program does not spat out this in the whole night. What do you do extra?
@1to9only: how do you distinguish between the 1st and 2nd puzzle. They are both valid.
And I do not have the ED-rating in my program
Repeat using one of the generated puzzle (the highest rated!).
is not an option.
My remarks are not a critic to your suggestions. I am eager to understand why "vicinity" {-1+1} and {-2,+2} is more successful than my approach.
User avatar
Hajime
 
Posts: 1349
Joined: 20 April 2018
Location: Fryslân

Re: Patterns Game Strategies

Postby champagne » Wed May 26, 2021 3:06 pm

Hajime wrote:Is using some vicinity algorithm the only way to go?


All tests show that the vicinity is a very efficient way.
The full scan is very slow (I am currently scanning all solution grids to check if all 17 clues are known)

I think that in the game, all players have a specific way to produce seeds and different choices to loop for the next cycle, but all apply more or less a vicinity search.

Changing up to 4 clues is feasible with files of significant size. Changing more than 4 clues is already very slow. I used to change 1 to 3 clues. (1 clue with huge files of non minimal puzzles.)

Note seeds have not to be valid nor minimal. I experienced a seed generation based on the symmetry of given, keeping all "valid puzzles". Others (JPF??) can produce seeds using a random generator.
champagne
2017 Supporter
 
Posts: 7352
Joined: 02 August 2007
Location: France Brittany

Re: Patterns Game Strategies

Postby m_b_metcalf » Wed May 26, 2021 3:22 pm

Hajime wrote:@m_b_metcalf : neglecting the x.x/1/2/1.2 is not making the algorithm any smarter or faster.

Why not? You don't then need to check whether the candidate puzzle is unique and minimal but you can press on with other combinations. Of course, this singles check must be made immediately after your step "if all "0" replaced with 1-9".

Hajime wrote:What is the difference "Generating ab initio ... puzzles with symmetry of givens for this pattern, and it spat out four pearls in five minutes" between the 1st and 2nd diagonal-symmetric puzzle? My program does not spat out this in the whole night. What do you do extra?

In this very special case, I impose the conditions that
1) p(j, i) = 10-p(i, j) for all clues below the diagonal,
2) no value on the diagonal appears asymmetrically off the diagonal.

As stated, this is a very special case, but with some patterns a fast way of generating good seeds.

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13583
Joined: 15 May 2006
Location: Berlin

Re: Patterns Game Strategies

Postby m_b_metcalf » Wed May 26, 2021 3:43 pm

champagne wrote:
Hajime wrote:Is using some vicinity algorithm the only way to go?

All tests show that the vicinity is a very efficient way.
The full scan is very slow

This is true. However, for the Patterns Game the full scan be 'steered', for instance by imposing a symmetry condition or the condition that no value within a horizontal band repeats, and so on... There are also fast checks for multiple solutions (fewer than eight distinct values) or minimality that can be carried out immediately after "if all "0" replaced with 1-9", as I listed in a recent post elsewhere.

Mike

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13583
Joined: 15 May 2006
Location: Berlin

PreviousNext

Return to Interactive games