g-whips and g-braids

Advanced methods and approaches for solving Sudoku puzzles

Re: g-whips and g-braids

Postby denis_berthier » Mon Sep 12, 2011 12:03 pm

pjb wrote:I saw this puzzle somewhere given as a great example of POM analysis. Following basics, POM first finds two 3's at 1,1 and 4,4, and then no less than 20 9's. After this the puzzle solves easily.


As you may have guessed from my previous posts, what I'm interested in is comparing various ratings of puzzles based on various coherent families of rules.
All the consistent rating systems I've studied, give the same rating to almost all (in the sense of unbiased stats) the puzzles.
In this exceptional example, it appears that the following two ratings both give the same result, 5:
1) the gW rating
2) a tentative rating that would be based only on basic interactions, generalized Subsets (with Finned, Franken and Kraken Fish) and XYZ-Wing .

I'm curious: what's the maximum size of the patterns used in your POM solution?

As for the number of candidates eliminated by a single pattern, this has never impressed me much: often, people like to exhibit artificially big patterns by aggregating smaller ones; as a result, most of, if not all, their eliminations could be done by simpler patterns. Notice that this is the case in the Hodoku solution (but Hodoku is a great solver anyway !)
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: g-whips and g-braids

Postby pjb » Tue Oct 25, 2011 10:36 am

denis_berthier wrote:
I'm curious: what's the maximum size of the patterns used in your POM solution?


I gave up identifying patterns as 'a', 'b', etc when I realized there are up to 2000 or more patterns for a number in some puzzles. So I ended up numbering patterns as '0001', '0002' etc, to accommodate that many. As far as I know, the program can generate all possible patterns in any puzzle I've tested it on. If you're interested, the program displays all possible patterns for a number in the output box for the patterns - contradiction method.

Thanks for your interest
pjb
pjb
2014 Supporter
 
Posts: 2552
Joined: 11 September 2011
Location: Sydney, Australia

An extremely rare case of difference in W, B and gB ratings

Postby denis_berthier » Thu Sep 20, 2012 8:12 am



An extremely rare large difference in W, B and gB ratings


Together with his implementation of whips in javascript, Mauricio has proposed a puzzle
http://forum.enjoysudoku.com/whip-solver-in-javascript-t30678.html#p220337
with interesting properties:
- it has a whip of length 31
- its B rating is only 19.

Code: Select all
+-------+-------+-------+
| . . . | . . 1 | . . 2 |
| . . . | . 3 . | . 4 . |
| . . 5 | 2 . . | 1 . . |
+-------+-------+-------+
| . . 3 | 6 . . | . 1 . |
| . 2 . | . 7 . | . . 8 |
| 9 . . | . . 5 | 7 . . |
+-------+-------+-------+
| . . 9 | . . 7 | . . . |
| . 8 . | 9 . . | . . 4 |
| 3 . . | . 4 . | . 8 . |
+-------+-------+-------+


The purpose of this post is to show that the rating is largely improved if g-whips are allowed: gW = 12
This puzzle is therefore not only an extremely rare example of an extremely long whip but also one of an extremely large difference in ratings.

In the following g-whip solution, what I now call bivalue-chains are activated. They are what I called previously nrc-chains (i.e. what some would call chains of bivalue/bilocal cells - but as in the supersymmetric view of whips, rc, rn, cn and bn cells are all on the same footing, there is no reason to make any difference between bivalue and bilocal).

Hidden Text: Show
***** SudoRules 15d.1.12 based on CSP-Rules 1.2, config: gW *****
000001002000030040005200100003600010020070008900005700009007000080900004300040080
24 givens, 220 candidates, 1433 csp-links and 1433 links. Initial density = 1.49
g-whip[6]: b2n4{r3c6 r1c4} – c3n4{r1 r456} – r6n4{c2 c3} – b4n8{r6c3 r4c1} – r3n8{c1 c5} – c6n8{r3 .} ==> r3c6 ≠ 6, r3c6 ≠ 9
g-whip[6]: b4n8{r6c3 r4c1} - r3n8{c1 c456} - c6n8{r2 r3} - b2n4{r3c6 r1c4} - c3n4{r1 r5} - r6n4{c3 .} ==> r6c3 <> 6, r6c3 <> 1
whip[11]: r8n1{c1 c5} - r9c4{n1 n5} - c2n5{r9 r4} - b4n7{r4c2 r4c1} - b4n8{r4c1 r6c3} - r6c5{n8 n2} - r4n2{c6 c7} - b6n4{r4c7 r5c7} - b4n4{r5c3 r6c2} - c3n4{r6 r1} - c4n4{r1 .} ==> r7c2 <> 1
whip[12]: r6n4{c2 c4} - r4n4{c6 c7} - b6n2{r4c7 r6c8} - r6n3{c8 c9} - r6n6{c9 c2} - r6n1{c2 c5} - r5c4{n1 n3} - r5c6{n3 n9} - r4n9{c6 c9} - r2n9{c9 c2} - c2n1{r2 r9} - r8n1{c1 .} ==> r5c3 <> 4
g-whip[5]: c3n4{r1 r6} - b4n8{r6c3 r4c1} - r3n8{c1 c456} - c6n8{r2 r3} - b2n4{r3c6 .} ==> r1c2 <> 4
g-whip[5]: c3n4{r1 r6} - b4n8{r6c3 r4c1} - r3n8{c1 c456} - c6n8{r2 r3} - b2n4{r3c6 .} ==> r1c1 <> 4
whip[10]: c3n4{r1 r6} - b4n8{r6c3 r4c1} - b1n8{r1c1 r2c3} - b1n2{r2c3 r2c1} - c1n7{r2 r8} - c2n7{r9 r4} - b4n5{r4c2 r5c1} - c1n1{r5 r7} - b9n1{r7c9 r9c9} - b9n7{r9c9 .} ==> r1c3 <> 7
whip[11]: c3n7{r9 r2} - b1n2{r2c3 r2c1} - b1n1{r2c1 r2c2} - c2n7{r2 r4} - r9n7{c2 c9} - b9n1{r9c9 r7c9} - c1n1{r7 r5} - b4n5{r5c1 r4c1} - r4c9{n5 n9} - r5n9{c8 c6} - r2n9{c6 .} ==> r8c1 <> 7
g-whip[11]: b1n2{r2c1 r2c3} - c3n8{r2 r6} - c3n4{r6 r1} - r3n4{c2 c6} - r3n8{c6 c5} - b8n8{r7c5 r7c4} - b8n3{r7c4 r8c6} - r5c6{n3 n9} - c8n9{r5 r123} - r2n9{c9 c2} - b1n1{r2c2 .} ==> r2c1 <> 8
whip[12]: b9n1{r7c9 r9c9} - r9c4{n1 n5} - c2n5{r9 r4} - r4c9{n5 n9} - b5n9{r4c6 r5c6} - r2n9{c6 c2} - c2n1{r2 r6} - r5c3{n1 n6} - r5c1{n6 n4} - r5n1{c1 c4} - b5n3{r5c4 r6c4} - r6n4{c4 .} ==> r7c9 <> 5
whip[12]: r3c6{n8 n4} - b1n4{r3c2 r1c3} - r6c3{n4 n8} - c4n8{r6 r7} - b8n3{r7c4 r8c6} - r5c6{n3 n9} - r4c5{n9 n2} - r6c5{n2 n1} - b8n1{r8c5 r9c4} - c2n1{r9 r2} - r2n9{c2 c9} - c8n9{r3 .} ==> r3c5 <> 8

whip[4]: c3n8{r1 r6} - c3n4{r6 r1} - r3n4{c2 c6} - r3n8{c6 .} ==> r1c1 <> 8
whip[10]: r3n8{c1 c6} - b2n4{r3c6 r1c4} - b1n4{r1c3 r3c2} - b1n3{r3c2 r1c2} - r1n7{c2 c8} - r2n7{c9 c4} - b2n5{r2c4 r1c5} - r1n9{c5 c7} - b9n9{r9c7 r9c9} - b9n7{r9c9 .} ==> r3c1 <> 7
whip[11]: r3n7{c9 c2} - b1n3{r3c2 r1c2} - b1n9{r1c2 r2c2} - r2n7{c2 c4} - c9n7{r2 r9} - b9n9{r9c9 r9c7} - r1n9{c7 c5} - b2n5{r1c5 r1c4} - r9c4{n5 n1} - b5n1{r5c4 r6c5} - c2n1{r6 .} ==> r1c8 <> 7
whip[12]: b9n9{r9c7 r9c9} - r4c9{n9 n5} - r2n5{c9 c4} - r9c4{n5 n1} - c5n1{r8 r6} - c2n1{r6 r2} - r2n9{c2 c6} - r3c5{n9 n6} - r1c5{n6 n8} - c5n9{r1 r4} - b5n2{r4c5 r4c6} - c6n8{r4 .} ==> r9c7 <> 5
whip[12]: r6c3{n4 n8} - c1n8{r4 r3} - r3c6{n8 n4} - r4n4{c6 c7} - b6n2{r4c7 r6c8} - r6c5{n2 n1} - r5c4{n1 n3} - r5c6{n3 n9} - b6n9{r5c8 r4c9} - r2n9{c9 c2} - c2n1{r2 r9} - r8n1{c1 .} ==> r5c1 <> 4

whip[4]: b4n5{r5c1 r4c2} - b4n7{r4c2 r4c1} - c1n8{r4 r3} - c1n4{r3 .} ==> r7c1 <> 5
g-whip[8]: r4c9{n5 n9} - b5n9{r4c6 r5c6} - r5n4{c6 c4} - b5n3{r5c4 r6c4} - b5n1{r6c4 r6c5} - r8n1{c5 c123} - c2n1{r9 r2} - r2n9{c2 .} ==> r5c7 <> 5
whip[12]: r5n5{c1 c8} - r4c9{n5 n9} - r5n9{c8 c6} - r2n9{c6 c2} - c2n1{r2 r9} - r8n1{c1 c5} - c4n1{r9 r6} - b5n3{r6c4 r5c4} - c4n4{r5 r1} - c3n4{r1 r6} - r6c2{n4 n6} - r5c3{n6 .} ==> r5c1 <> 1
biv-chain[3]: r5c1{n5 n6} - r1c1{n6 n7} - r4n7{c1 c2} ==> r4c2 <> 5
whip[1]: c2n5{r9 .} ==> r8c1 <> 5
whip[4]: b7n4{r7c1 r7c2} - b7n5{r7c2 r9c2} - r9c4{n5 n1} - b9n1{r9c9 .} ==> r7c1 <> 1
whip[6]: r6n2{c8 c5} - r7n2{c5 c1} - b7n4{r7c1 r7c2} - b7n5{r7c2 r9c2} - r9c4{n5 n1} - b5n1{r5c4 .} ==> r8c8 <> 2
whip[7]: c1n1{r8 r2} - c1n2{r2 r7} - b7n4{r7c1 r7c2} - b7n5{r7c2 r9c2} - c2n1{r9 r6} - b5n1{r6c5 r5c4} - r9c4{n1 .} ==> r8c1 <> 6
whip[9]: b7n5{r7c2 r9c2} - r9c4{n5 n1} - r5n1{c4 c3} - b4n6{r5c3 r5c1} - b4n5{r5c1 r4c1} - r4c9{n5 n9} - r5n9{c8 c6} - r2n9{c6 c2} - c2n1{r2 .} ==> r7c2 <> 6
g-whip[11]: b7n4{r7c1 r7c2} - b7n5{r7c2 r9c2} - r9c4{n5 n1} - b5n1{r5c4 r6c5} - r6c2{n1 n6} - r6n4{c2 c4} - r5c4{n4 n3} - r5c6{n3 n9} - c8n9{r5 r123} - r2n9{c9 c2} - c2n1{r2 .} ==> r4c1 <> 4
whip[5]: b2n7{r2c4 r1c4} - r1n4{c4 c3} - c1n4{r3 r7} - c1n2{r7 r8} - c1n1{r8 .} ==> r2c1 <> 7
whip[5]: r7c2{n5 n4} - c1n4{r7 r3} - b2n4{r3c6 r1c4} - b2n7{r1c4 r2c4} - b2n5{r2c4 .} ==> r7c5 <> 5
whip[6]: r7c2{n5 n4} - b4n4{r6c2 r6c3} - r1n4{c3 c4} - b2n7{r1c4 r2c4} - c4n5{r2 r9} - r8n5{c5 .} ==> r7c8 <> 5
whip[6]: b2n5{r1c5 r2c4} - r7n5{c4 c2} - r9n5{c2 c9} - r4n5{c9 c1} - c1n7{r4 r1} - b2n7{r1c4 .} ==> r1c7 <> 5
whip[6]: r7c2{n5 n4} - b4n4{r6c2 r6c3} - r1n4{c3 c4} - b2n7{r1c4 r2c4} - c4n5{r2 r9} - r8n5{c5 .} ==> r7c7 <> 5
whip[5]: b9n7{r9c9 r8c8} - b9n5{r8c8 r8c7} - c5n5{r8 r1} - r2n5{c4 c9} - r4c9{n5 .} ==> r9c9 <> 9
hidden-single-in-a-block ==> r9c7 = 9
whip[6]: c6n3{r8 r5} - r5n9{c6 c8} - r4c9{n9 n5} - c8n5{r5 r1} - b9n5{r8c8 r8c7} - c5n5{r8 .} ==> r8c8 <> 3
whip[6]: c1n1{r2 r8} - c1n2{r8 r7} - b9n2{r7c7 r8c7} - r8n3{c7 c6} - c6n6{r8 r9} - b8n2{r9c6 .} ==> r2c1 <> 6
whip[2]: r8c1{n2 n1} - r2c1{n1 .} ==> r7c1 <> 2
whip[7]: c5n5{r1 r8} - r9c4{n5 n1} - r5n1{c4 c3} - c2n1{r6 r2} - r2n9{c2 c9} - r4c9{n9 n5} - b9n5{r9c9 .} ==> r1c5 <> 9
biv-chain[2]: c5n9{r3 r4} - r5n9{c6 c8} ==> r3c8 <> 9
biv-chain[3]: c5n9{r3 r4} - b6n9{r4c9 r5c8} - r1n9{c8 c2} ==> r3c2 <> 9
whip[4]: c5n5{r1 r8} - c7n5{r8 r4} - r4c9{n5 n9} - c8n9{r5 .} ==> r1c8 <> 5
whip[1]: b3n5{r2c9 .} ==> r2c4 <> 5
whip[4]: r8n7{c3 c8} - c8n5{r8 r5} - r4n5{c7 c1} - b4n7{r4c1 .} ==> r9c2 <> 7
whip[1]: b7n7{r9c3 .} ==> r2c3 <> 7
whip[4]: r8n7{c3 c8} - c8n5{r8 r5} - r5c1{n5 n6} - r5c3{n6 .} ==> r8c3 <> 1
whip[4]: c8n7{r3 r8} - c8n5{r8 r5} - r4n5{c7 c1} - b4n7{r4c1 .} ==> r3c2 <> 7
whip[1]: r3n7{c9 .} ==> r2c9 <> 7
whip[4]: c5n5{r1 r8} - c8n5{r8 r5} - c7n5{r4 r2} - b3n8{r2c7 .} ==> r1c5 <> 8
whip[6]: r9c4{n5 n1} - r5n1{c4 c3} - c2n1{r6 r2} - b1n9{r2c2 r1c2} - c8n9{r1 r5} - r4c9{n9 .} ==> r9c9 <> 5
whip[1]: b9n5{r8c7 .} ==> r8c5 <> 5
hidden-single-in-a-column ==> r1c5 = 5
biv-chain[2]: b2n9{r2c6 r3c5} - b2n6{r3c5 r2c6} ==> r2c6 <> 8
whip[2]: c1n8{r4 r3} - c6n8{r3 .} ==> r4c5 <> 8
whip[3]: r9c6{n2 n6} - r8c5{n6 n1} - r8c1{n1 .} ==> r8c6 <> 2
whip[4]: b9n2{r7c7 r8c7} - r8c1{n2 n1} - c5n1{r8 r6} - c5n8{r6 .} ==> r7c5 <> 2
whip[1]: r7n2{c8 .} ==> r8c7 <> 2
whip[4]: r2n5{c7 c9} - r4c9{n5 n9} - r5n9{c8 c6} - r2c6{n9 .} ==> r2c7 <> 6
whip[4]: r2c6{n6 n9} - r2c9{n9 n5} - r4c9{n5 n9} - r5n9{c8 .} ==> r2c2 <> 6, r2c3 <> 6
biv-chain[5]: r6c9{n3 n6} - r2n6{c9 c6} - r3c5{n6 n9} - r4c5{n9 n2} - r6n2{c5 c8} ==> r6c8 <> 3
whip[5]: r1n9{c8 c2} - b1n3{r1c2 r3c2} - b1n6{r3c2 r3c1} - r3n8{c1 c6} - r3n4{c6 .} ==> r1c8 <> 6
biv-chain[6]: c9n1{r7 r9} - b9n7{r9c9 r8c8} - c8n5{r8 r5} - c1n5{r5 r4} - r4n8{c1 c6} - c5n8{r6 r7} ==> r7c5 <> 1
biv-chain[3]: r5n1{c3 c4} - c5n1{r6 r8} - c1n1{r8 r2} ==> r2c3 <> 1
whip[4]: r8n7{c3 c8} - r8n5{c8 c7} - r2c7{n5 n8} - r2c3{n8 .} ==> r8c3 <> 2
whip[2]: r8n1{c5 c1} - r8n2{c1 .} ==> r8c5 <> 6
whip[2]: r2n6{c9 c6} - b8n6{r9c6 .} ==> r7c9 <> 6
whip[3]: r9n7{c9 c3} - b7n1{r9c3 r8c1} - b7n2{r8c1 .} ==> r9c9 <> 1
hidden-single-in-a-block ==> r7c9 = 1
biv-chain[5]: b3n8{r1c7 r2c7} - r2n5{c7 c9} - r2n6{c9 c6} - c5n6{r3 r7} - r7n8{c5 c4} ==> r1c4 <> 8
whip[3]: r4c2{n7 n4} - c3n4{r6 r1} - r1c4{n4 .} ==> r1c2 <> 7
whip[4]: b6n4{r5c7 r4c7} - r4c2{n4 n7} - r2n7{c2 c4} - r1c4{n7 .} ==> r5c4 <> 4
whip[2]: c3n4{r6 r1} - c4n4{r1 .} ==> r6c2 <> 4
whip[2]: r5c3{n6 n1} - r6c2{n1 .} ==> r5c1 <> 6
singles ==> r5c1 = 5, r8c8 = 5, r9c9 = 7, r3c8 = 7, r8c3 = 7
whip[2]: r2n6{c9 c6} - r8n6{c6 .} ==> r1c7 <> 6
whip[1]: b3n6{r3c9 .} ==> r6c9 <> 6
singles ==> r6c9 = 3, r3c2 = 3
whip[1]: r1n6{c1 .} ==> r3c1 <> 6
biv-chain[3]: b4n6{r5c3 r6c2} - r1c2{n6 n9} - c8n9{r1 r5} ==> r5c8 <> 6
singles ==> r5c8 = 9, r4c9 = 5, r1c8 = 3, r1c7 = 8, r2c7 = 5, r1c2 = 9
whip[2]: c2n6{r9 r6} - c8n6{r6 .} ==> r7c1 <> 6
singles to the end
GRID SOLVED. rating-type = gW, MOST COMPLEX RULE = Whip[12]
694751832
172839546
835264179
743698215
526173498
918425763
459387621
287916354
361542987
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: g-whips and g-braids

Postby Mauricio » Thu Sep 20, 2012 10:16 pm

Complementing the previous post, I decided to make my gBraid solver output the solution in humand readable form, the gBraid rating of the puzzle is 11:

Hidden Text: Show
Code: Select all
000001002000030040005200100003600010020070008900005700009007000080900004300040080
Minirow and minicolumn assignments
 61) r3c6<>6,  gBraid[6]  n4b2{r3c6 r1c4} - n4r6{c4 c123} - n4{r5 r6}c3 - n8b4{r6c3 r4c1} - n8r3{c1 c5} - n8{r2 .}c6
 62) r3c6<>9,  gBraid[6]  n4b2{r3c6 r1c4} - n4r6{c4 c123} - n4{r5 r6}c3 - n8b4{r6c3 r4c1} - n8r3{c1 c5} - n8{r2 .}c6
 63) r6c3<>1,  gBraid[6]  n8b4{r6c3 r4c1} - n8r3{c1 c456} - n8{r2 r3}c6 - n4b2{r3c6 r1c4} - n4r6{c4 c2} - n4{r5 .}c3
 64) r6c3<>6,  gBraid[6]  n8b4{r6c3 r4c1} - n8r3{c1 c456} - n8{r2 r3}c6 - n4b2{r3c6 r1c4} - n4r6{c4 c2} - n4{r5 .}c3
 65) r9c9<>5,  gBraid[8]  {n5 n9}r4c9 - {n5 n1}r9c4 - n9r5{c8 c6} - n1{r8 r6}c5 - n1r8{c5 c123} - n1{r7 r2}c2 - n9r2{c2 c7} - n9r9{c7 .}
 66) r1c5<>8, gBraid[10]  {n8 n4}r3c6 - n8r7{c5 c4} - n3b8{r7c4 r8c6} - {n3 n9}r5c6 - {n9 n2}r4c5 - {n2 n1}r6c5 - n1r8{c5 c123} - n1{r9 r2}c2 - n9r2{c2 c789} - n9{r3 .}c8
 67) r1c7<>9, gBraid[10]  n8{r1 r2}c7 - n9{r3 r5}c8 - {n9 n5}r4c9 - n5r2{c9 c4} - n7{r2 r1}c4 - n4b2{r1c4 r3c6} - {n4 n3}r5c6 - n3{r6 r7}c4 - n8r7{c4 c5} - n8b2{r3c5 .}
 68) r3c5<>8, gBraid[10]  {n8 n4}r3c6 - n8r7{c5 c4} - n3b8{r7c4 r8c6} - {n3 n9}r5c6 - {n9 n2}r4c5 - {n2 n1}r6c5 - n1r8{c5 c123} - n1{r9 r2}c2 - n9r2{c2 c789} - n9{r3 .}c8
 69) r1c1<>8,  gBraid[5]  n8r3{c1 c6} - n8{r2 r6}c3 - n4b2{r3c6 r1c4} - n4r6{c4 c2} - n4{r5 .}c3
 70) r1c7<>5,  gBraid[5]  n5r2{c9 c4} - n7{r2 r1}c4 - n8r1{c4 c3} - n8r3{c1 c6} - n4b2{r3c6 .}
 71) r2c1<>8,  gBraid[5]  n8r3{c1 c6} - n8{r1 r6}c3 - n4b2{r3c6 r1c4} - n4r6{c4 c2} - n4{r5 .}c3
 72) r3c1<>7,  gBraid[6]  n8r3{c1 c6} - n4r3{c6 c2} - {n4 n6}r1c1 - {n6 n8}r1c3 - {n8 n3}r1c7 - n3r3{c9 .}
 73) r1c8<>7,  gBraid[9]  n7r3{c9 c2} - n3{r3 r1}c2 - n9r1{c2 c5} - n5r1{c5 c4} - {n5 n1}r9c4 - n1{r8 r6}c5 - n1{r9 r7}c9 - n1{r7 r2}c2 - n9{r2 .}c2
 74) r7c5<>5,  gBraid[9]  {n5 n1}r9c4 - n1{r8 r6}c5 - n8{r6 r4}c5 - n2b5{r4c5 r4c6} - n9b5{r4c6 r5c6} - n9{r5 r123}c8 - n9r2{c9 c2} - n1{r2 r7}c2 - n1r8{c3 .}
 75) r8c8<>3,  gBraid[9]  n3{r8 r5}c6 - n3{r5 r1}c7 - n9r5{c6 c789} - n8{r1 r2}c7 - {n9 n5}r4c9 - n5r2{c9 c4} - n7{r2 r1}c4 - n4b2{r1c4 r3c6} - n8b2{r3c6 .}
 76) r2c7<>9, gBraid[10]  n9{r3 r5}c8 - {n9 n5}r4c9 - n5r2{c9 c4} - n7{r2 r1}c4 - n4b2{r1c4 r3c6} - {n4 n3}r5c6 - n8r3{c6 c1} - n8{r2 r6}c3 - n8{r6 r7}c4 - n3{r7 .}c4
 77) r5c1<>4,  gBraid[9]  n4r6{c3 c4} - n5r5{c1 c789} - {n5 n9}r4c9 - n9r5{c8 c6} - n9r2{c6 c2} - n3b5{r5c6 r5c4} - n1b5{r5c4 r6c5} - n1r8{c5 c123} - n1{r9 .}c2
 78) r5c3<>4, gBraid[10]  {n4 n8}r6c3 - n4{r5 r4}c7 - n2b6{r4c7 r6c8} - {n2 n1}r6c5 - {n1 n3}r5c4 - {n3 n9}r5c6 - n9r4{c5 c9} - n9r2{c9 c2} - n1{r2 r789}c2 - n1r8{c3 .}
 79) r1c1<>4,  gBraid[4]  n4r3{c2 c6} - n8r3{c6 c1} - n8{r2 r6}c3 - n4{r6 .}c3
 80) r1c2<>4,  gBraid[4]  n4r3{c1 c6} - n8r3{c6 c1} - n8{r2 r6}c3 - n4{r6 .}c3
 81) r7c1<>5,  gBraid[4]  n5{r9 r4}c2 - n7r4{c2 c1} - n4{r4 r3}c1 - n8{r3 .}c1
 82) r7c1<>1,  gBraid[7]  n4r7{c1 c2} - n1r8{c3 c5} - {n1 n5}r9c4 - n5{r9 r4}c2 - {n5 n6}r5c1 - {n6 n7}r1c1 - n7r4{c1 .}
 83) r1c3<>7,  gBraid[6]  {n7 n6}r1c1 - n4{r1 r6}c3 - n8{r6 r2}c3 - {n8 n4}r3c1 - {n4 n2}r7c1 - n2r2{c1 .}
 84) r5c7<>5,  gBraid[8]  {n5 n9}r4c9 - n9r5{c8 c6} - n9r2{c6 c2} - n4r5{c6 c4} - n3b5{r5c4 r6c4} - n1b5{r6c4 r6c5} - n1r8{c5 c123} - n1{r9 .}c2
 85) r8c1<>7,  gBraid[8]  n7{r9 r2}c3 - n2r2{c3 c1} - n1r2{c1 c2} - n1{r2 r5}c1 - n5r5{c1 c8} - {n5 n9}r4c9 - n9r2{c9 c6} - n9r5{c6 .}
 86) r8c8<>2,  gBraid[9]  n2r6{c8 c5} - n2r7{c5 c1} - n1{r6 r789}c5 - n4r7{c1 c2} - {n1 n5}r9c4 - n5{r9 r4}c2 - n7r4{c2 c1} - n4{r4 r3}c1 - n8{r3 .}c1
 87) r7c2<>1, gBraid[10]  n1r8{c3 c5} - {n1 n5}r9c4 - n5{r9 r4}c2 - n7r4{c2 c1} - n8{r4 r3}c1 - {n8 n4}r3c6 - n4r4{c6 c7} - n2b6{r4c7 r6c8} - {n2 n8}r6c5 - n8r4{c6 .}
 88) r7c9<>5,  gBraid[9]  {n5 n9}r4c9 - n1{r7 r9}c9 - n9r5{c8 c6} - {n1 n5}r9c4 - n9r2{c6 c2} - n5r8{c5 c1} - n1{r2 r6}c2 - {n1 n6}r5c1 - {n6 .}r5c3
 89) r9c7<>5,  gBraid[9]  {n5 n1}r9c4 - n9r9{c7 c9} - n1{r8 r6}c5 - {n9 n5}r4c9 - n1{r6 r2}c2 - n5r2{c9 c4} - n9r2{c2 c6} - {n9 n6}r1c5 - {n6 .}r3c5
 90) r1c4<>8, gBraid[11]  n8r7{c4 c5} - n7{r1 r2}c4 - n8{r1 r2}c7 - n5r2{c7 c9} - {n5 n9}r4c9 - {n9 n2}r4c5 - {n2 n1}r6c5 - n1r8{c5 c123} - n1{r9 r2}c2 - n9r2{c2 c6} - n9r5{c6 .}
 91) r1c2<>7,  gBraid[9]  n7r4{c2 c1} - n8{r4 r3}c1 - {n8 n4}r3c6 - {n4 n5}r1c4 - {n5 n1}r9c4 - n1{r8 r6}c5 - n1{r6 r2}c2 - n9{r2 r3}c2 - n3{r3 .}c2
 92) r4c2<>5,  gBraid[8]  {n5 n9}r4c9 - n7r4{c2 c1} - n5{r4 r2}c9 - n7r1{c1 c4} - {n7 n8}r2c4 - {n8 n6}r2c7 - {n6 n9}r2c6 - n9r5{c6 .}
 93) r789c2==5
 94) r456c1==5
 95) r9c2<>7,  gBraid[6]  n7r4{c2 c1} - n7r8{c3 c8} - n5r9{c2 c4} - n5r8{c5 c7} - n5r2{c7 c9} - n5r4{c9 .}
 96) r789c3==7
 97) r8c7<>5,  gBraid[9]  n5{r8 r1}c5 - n5r2{c4 c9} - {n5 n9}r4c9 - n5r4{c9 c1} - n8{r4 r3}c1 - n8r1{c3 c7} - {n8 n6}r2c7 - n6b2{r2c6 r3c5} - n9{r3 .}c5
 98) r9c9<>1,  gBraid[3]  {n1 n5}r9c4 - n5r8{c5 c8} - n7b9{r8c8 .}
 99) r7c9==1,  n1{. r7}c9
100) r7c789==1
101) r3c2<>7,  gBraid[7]  {n7 n4}r4c2 - n7{r3 r8}c8 - n5r8{c8 c5} - n5r9{c4 c2} - {n5 n6}r7c2 - {n6 n1}r6c2 - n1{r6 .}c5
102) r3c789==7
103) r5c1<>1,  gBraid[7]  n5r5{c1 c8} - {n5 n9}r4c9 - n9r5{c7 c6} - n9r2{c6 c2} - n1r2{c2 c3} - n1r8{c3 c5} - n5r8{c5 .}
104) r8c3<>1,  gBraid[2]  n1r5{c3 c4} - n1r9{c4 .}
105) r2c3<>1,  gBraid[3]  n1r5{c3 c4} - n1r9{c4 c2} - n1r6{c2 .}
106) r5c8<>5,  gBraid[6]  {n5 n9}r4c9 - n9r5{c7 c6} - n9r2{c6 c2} - n1r2{c2 c1} - n1r8{c1 c5} - n5r8{c5 .}
107) r5c1==5,  n5r5{. c1}
108) r4c789==5
109) r5c123==5
110) r6c2<>4,  gBraid[2]  n1b4{r6c2 r5c3} - n6b4{r5c3 .}
111) r5c4<>4,  gBraid[2]  n4r1{c4 c3} - n4r6{c3 .}
112) r1c2<>6,  gBraid[4]  {n6 n1}r6c2 - {n1 n5}r9c2 - {n5 n1}r9c4 - n1r5{c4 .}
113) r2c2<>6,  gBraid[4]  {n6 n1}r6c2 - {n1 n5}r9c2 - {n5 n1}r9c4 - n1r5{c4 .}
114) r3c2<>6,  gBraid[4]  {n6 n1}r6c2 - {n1 n5}r9c2 - {n5 n1}r9c4 - n1r5{c4 .}
115) r7c2<>6,  gBraid[4]  {n6 n1}r6c2 - n1r5{c3 c4} - {n1 n5}r9c4 - {n5 .}r9c2
116) r8c1<>6,  gBraid[5]  n1{r8 r2}c1 - n2r2{c1 c3} - n6b1{r2c3 r1c3} - n4{r1 r6}c3 - n8{r6 .}c3
117) r8c6<>2,  gBraid[4]  {n2 n1}r8c1 - n1r9{c3 c4} - {n1 n3}r5c4 - n3{r5 .}c6
118) r3c8<>9,  gBraid[7]  {n9 n6}r3c5 - n7r3{c8 c9} - n3r3{c9 c2} - {n3 n9}r1c2 - {n9 n5}r1c5 - n5r8{c5 c8} - n7{r8 .}c8
119) r1c5<>9,  gBraid[7]  n5{r1 r8}c5 - {n5 n1}r9c4 - {n1 n3}r5c4 - {n3 n8}r7c4 - {n8 n4}r6c4 - {n4 n9}r5c6 - n9{r5 .}c8
120) r2c4<>5,  gBraid[3]  {n5 n6}r1c5 - {n6 n7}r1c1 - n7r2{c2 .}
121) r2c789==5
122) r1c456==5
123) r789c8==5
124) r1c7<>3,  gBraid[5]  {n3 n9}r1c2 - n8{r1 r2}c7 - n5r2{c7 c9} - {n5 n9}r4c9 - n9{r5 .}c8
125) r1c8<>6,  gBraid[2]  n3r1{c8 c2} - n9r1{c2 .}
126) r6c8<>3,  gBraid[3]  {n3 n9}r1c8 - {n9 n6}r5c8 - {n6 .}r6c9
127) r5c7<>3,  gBraid[4]  {n3 n6}r6c9 - {n6 n9}r5c8 - {n9 n3}r1c8 - n3{r3 .}c9
128) r789c7==3
129) r7c7<>2,  gBraid[5]  n3r7{c7 c4} - {n3 n1}r5c4 - n8r7{c4 c5} - {n8 n2}r6c5 - n2r4{c6 .}
130) r2c7<>6,  gBraid[5]  {n6 n3}r7c7 - n3r8{c7 c6} - n6{r8 r9}c6 - n6{r9 r6}c2 - n6{r6 .}c9
131) r8c5<>2,  gBraid[5]  n2r6{c5 c8} - n5r8{c5 c8} - {n5 n6}r7c8 - {n6 n3}r7c7 - {n3 .}r8c7
132) r1c3<>6,  gBraid[6]  {n6 n5}r1c5 - n6{r3 r7}c1 - n5r8{c5 c8} - {n5 n2}r7c8 - {n2 n6}r6c8 - n6r5{c7 .}
133) r2c3<>8,  gBraid[2]  {n8 n4}r1c3 - {n4 .}r6c3
134) r4c7<>4,  gBraid[4]  n4r5{c7 c6} - {n4 n8}r3c6 - n8r2{c4 c7} - n5{r2 .}c7
135) r5c7==4,  n4{. r5}c7
136) r5c789==4
137) r3c2<>9,  gBraid[3]  n9r1{c2 c8} - n9r5{c8 c6} - n9r2{c6 .}
138) r3c8<>6,  gBraid[3]  n7r3{c8 c9} - n3{r3 r6}c9 - n6b6{r6c9 .}
139) r8c8<>6,  gBraid[3]  n5r8{c8 c5} - {n5 n6}r1c5 - n6{r1 .}c7
140) r2c2<>1,  gBraid[4]  {n1 n6}r6c2 - n6r5{c3 c8} - n9{r5 r1}c8 - n9{r1 .}c2
singles
Most difficult rule: gBraid[11]
Mauricio
 
Posts: 1175
Joined: 22 March 2006

Re: g-whips and g-braids

Postby denis_berthier » Fri Sep 21, 2012 5:25 am

Mauricio wrote:I have updated the solver, now it can also solve using gBraids, I propose as a test case the following puzzle, gB=6 and not even a single vanilla Braid can be applied.
Code: Select all
001002003000030040200500100004006001070000080100900700002007006050080000300200900


OK, but g-braids are not necessary, g-whips are enough.
g-bivalue chains appearing in the following path are g-whips without distant z- or t-candidates.

Hidden Text: Show
***** SudoRules 16.2 based on CSP-Rules 1.2, config: gW *****
001002003000030040200500100004006001070000080100900700002007006050080000300200900
24 givens, 213 candidates, 1289 csp-links and 1289 links. Initial density = 1.43
g-biv-chain[4]: r5n2{c5 c789} - c8n2{r4 r8} - r8n1{c8 c456} - c5n1{r9 .} ==> r5c5 <> 4, r5c5 <> 5
g-biv-chain[4]: c8n2{r8 r456} - r5n2{c7 c5} - c5n1{r5 r789} - r8n1{c6 .} ==> r8c8 <> 3, r8c8 <> 7
g-whip[4]: c8n2{r4 r8} - r8n1{c8 c456} - c5n1{r7 r5} - r5n2{c5 .} ==> r4c7 <> 2
g-whip[4]: c8n2{r6 r8} - r8n1{c8 c456} - c5n1{r7 r5} - r5n2{c5 .} ==> r6c9 <> 2
g-whip[4]: c5n1{r7 r5} - r5n2{c5 c789} - c8n2{r4 r8} - r8n1{c8 .} ==> r7c4 <> 1
g-whip[4]: c5n1{r9 r5} - r5n2{c5 c789} - c8n2{r4 r8} - r8n1{c8 .} ==> r9c6 <> 1
whip[5]: r4c7{n5 n3} - b9n3{r8c7 r7c8} - r7n5{c8 c5} - r9c6{n5 n4} - r7c4{n4 .} ==> r5c7 <> 5, r1c7 <> 5, r2c7 <> 5
biv-chain[3]: r6c9{n4 n5} - c7n5{r4 r7} - b9n8{r7c7 r9c9} ==> r9c9 <> 4
whip[5]: r7c4{n4 n3} - r8n3{c6 c7} - b9n4{r8c7 r8c9} - r6c9{n4 n5} - r4c7{n5 .} ==> r7c5 <> 4, r7c1 <> 4
whip[4]: r1n5{c8 c1} - c1n4{r1 r8} - b9n4{r8c9 r7c7} - c7n5{r7 .} ==> r4c8 <> 5, r6c8 <> 5
whip[4]: b7n1{r9c2 r7c2} - b7n4{r7c2 r8c1} - b9n4{r8c9 r7c7} - b9n8{r7c7 .} ==> r9c2 <> 8
whip[5]: c1n4{r1 r8} - b9n4{r8c9 r7c7} - c7n5{r7 r4} - r4c1{n5 n9} - r7c1{n9 .} ==> r1c1 <> 8
whip[5]: c1n4{r1 r8} - b9n4{r8c9 r7c7} - c7n5{r7 r4} - r4c1{n5 n8} - r7c1{n8 .} ==> r1c1 <> 9
whip[5]: r1n5{c8 c1} - c1n4{r1 r8} - c1n7{r8 r2} - c1n6{r2 r5} - r6n6{c3 .} ==> r1c8 <> 6
whip[5]: r7c4{n4 n3} - r8n3{c6 c7} - b9n4{r8c7 r8c9} - r6c9{n4 n5} - r4c7{n5 .} ==> r7c2 <> 4
whip[3]: b9n8{r9c9 r7c7} - r7n4{c7 c4} - r9c6{n4 .} ==> r9c9 <> 5
whip[3]: c7n8{r2 r7} - c7n5{r7 r4} - c9n5{r5 .} ==> r2c9 <> 8
whip[4]: c1n4{r8 r1} - r1n5{c1 c8} - b9n5{r7c8 r7c7} - b9n4{r7c7 .} ==> r8c4 <> 4, r8c6 <> 4
whip[4]: r7n4{c7 c4} - r7n3{c4 c8} - b9n5{r7c8 r9c8} - r9c6{n5 .} ==> r7c7 <> 8
hidden-single-in-a-block ==> r9c9 = 8
whip[4]: r4c7{n3 n5} - r7c7{n5 n4} - r7c4{n4 n3} - r8n3{c6 .} ==> r5c7 <> 3
g-biv-chain[4]: b9n4{r7c7 r8c789} - c1n4{r8 r1} - r1n5{c1 c8} - b9n5{r7c8 .} ==> r7c7 <> 3
biv-chain[2]: c7n3{r4 r8} - r7n3{c8 c4} ==> r4c4 <> 3
g-whip[4]: r1n5{c1 c8} - b9n5{r7c8 r7c7} - b9n4{r7c7 r8c789} - c1n4{r8 .} ==> r1c1 <> 6
g-whip[4]: r1n5{c1 c8} - b9n5{r7c8 r7c7} - b9n4{r7c7 r8c789} - c1n4{r8 .} ==> r1c1 <> 7
whip[3]: r1n7{c5 c8} - b9n7{r9c8 r8c9} - c1n7{r8 .} ==> r2c4 <> 7
whip[4]: b7n8{r7c1 r7c2} - b7n1{r7c2 r9c2} - b7n4{r9c2 r8c1} - c1n7{r8 .} ==> r2c1 <> 8
whip[5]: b1n4{r1c2 r3c2} - b1n3{r3c2 r3c3} - r3n8{c3 c6} - b5n8{r6c6 r4c4} - c4n7{r4 .} ==> r1c4 <> 4
whip[6]: r4c7{n3 n5} - r7c7{n5 n4} - r8n4{c9 c1} - c1n7{r8 r2} - c1n6{r2 r5} - r6n6{c3 .} ==> r6c8 <> 3
whip[1]: b6n3{r4c7 .} ==> r4c2 <> 3
whip[4]: b3n2{r2c9 r2c7} - b3n8{r2c7 r1c7} - c7n6{r1 r5} - r6c8{n6 .} ==> r5c9 <> 2
biv-chain[3]: b3n5{r1c8 r2c9} - c9n2{r2 r8} - b9n7{r8c9 r9c8} ==> r9c8 <> 5
whip[1]: b9n5{r7c7 .} ==> r7c5 <> 5
biv-chain[3]: b3n5{r1c8 r2c9} - c9n2{r2 r8} - b9n7{r8c9 r9c8} ==> r1c8 <> 7
whip[1]: r1n7{c4 .} ==> r3c5 <> 7
biv-chain[3]: r9c3{n6 n7} - c8n7{r9 r3} - c8n6{r3 r6} ==> r6c3 <> 6
biv-chain[3]: b9n3{r7c8 r8c7} - r4c7{n3 n5} - b9n5{r7c7 r7c8} ==> r7c8 <> 1
whip[4]: c2n3{r3 r6} - r6n6{c2 c8} - r3c8{n6 n7} - r3c9{n7 .} ==> r3c2 <> 9
whip[5]: r9c3{n6 n7} - b9n7{r9c8 r8c9} - r2n7{c9 c1} - r2n5{c1 c9} - c9n2{r2 .} ==> r2c3 <> 6
whip[5]: r1c8{n9 n5} - r1c1{n5 n4} - b7n4{r8c1 r9c2} - b7n1{r9c2 r7c2} - r7c5{n1 .} ==> r1c5 <> 9
whip[4]: r7c1{n9 n8} - r4c1{n8 n5} - r1n5{c1 c8} - r1n9{c8 .} ==> r2c1 <> 9
whip[4]: b3n8{r1c7 r2c7} - b3n2{r2c7 r2c9} - b3n5{r2c9 r1c8} - r1n9{c8 .} ==> r1c2 <> 8
whip[4]: r1n9{c2 c8} - r3c9{n9 n7} - r3c8{n7 n6} - r6n6{c8 .} ==> r1c2 <> 6
biv-chain[3]: r1c2{n4 n9} - r1c8{n9 n5} - r1c1{n5 n4} ==> r3c2 <> 4
whip[1]: r3n4{c6 .} ==> r1c5 <> 4
whip[4]: b2n9{r3c6 r2c6} - r8n9{c6 c1} - b7n4{r8c1 r9c2} - r1c2{n4 .} ==> r3c3 <> 9
biv-chain[5]: r9c3{n6 n7} - b9n7{r9c8 r8c9} - r3c9{n7 n9} - r1n9{c8 c2} - c2n4{r1 r9} ==> r9c2 <> 6
whip[2]: c8n6{r3 r6} - c2n6{r6 .} ==> r3c3 <> 6
whip[4]: b2n4{r3c6 r3c5} - c5n9{r3 r7} - r7n1{c5 c2} - r9c2{n1 .} ==> r9c6 <> 4
naked-single ==> r9c6 = 5
whip[4]: r6c9{n4 n5} - b5n5{r6c5 r4c5} - b5n7{r4c5 r4c4} - b5n8{r4c4 .} ==> r6c6 <> 4
whip[3]: c3n8{r2 r6} - r6c6{n8 n3} - c2n3{r6 .} ==> r3c2 <> 8
biv-chain[3]: b1n3{r3c2 r3c3} - r3n8{c3 c6} - r6c6{n8 n3} ==> r6c2 <> 3
hidden-single-in-a-column ==> r3c2 = 3
whip[1]: b1n6{r2c1 .} ==> r2c7 <> 6, r2c4 <> 6
biv-chain[3]: r9n6{c3 c5} - c4n6{r8 r1} - c7n6{r1 r5} ==> r5c3 <> 6
whip[1]: c3n6{r9 .} ==> r8c1 <> 6
biv-chain[3]: r9n6{c3 c5} - r3n6{c5 c8} - c8n7{r3 r9} ==> r9c3 <> 7
singles ==> r9c3 = 6, r8c4 = 6, r9c8 = 7, r8c8 = 1
whip[1]: b8n1{r9c5 .} ==> r5c5 <> 1
naked-single ==> r5c5 = 2
biv-chain[2]: c4n4{r5 r7} - c4n3{r7 r5} ==> r5c4 <> 1
singles ==> r5c6 = 1, r2c4 = 1, r3c6 = 4, r3c3 = 8, r3c9 = 7
biv-chain[2]: r6n6{c2 c8} - r6n2{c8 c2} ==> r6c2 <> 8
singles to the end

491872653
567139842
238564197
984756321
675321489
123948765
812497536
759683214
346215978


As your previous example, this shows that obstructions to the extension of a partial whip [which are the main resolution pattern in my approach] can be overcome by two main techniques, involving two different kinds of mild branching: braids and g-whips [where branching is localised in a single step]. From all the examples I've studied, the g-whip technique is much more powerful than the braid one (although none of the two subsumes the other).
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: g-whips and g-braids

Postby Mauricio » Thu Oct 04, 2012 2:24 am

denis_berthier wrote:From all the examples I've studied, the g-whip technique is much more powerful than the braid one (although none of the two subsumes the other).
OK. Since I don't have a gWhip solver, may I propose a few examples for you to examine? The first ones are puzzles not solvable by whips that have low B-rating (7,6,6,8, respectively).

Code: Select all
000000001020003040004050300000030100006700080070002005007800900040010020800006000
000001002000020030004500600006050700070600008300008060005200800010005040700080009
000001002010030040005400600003500700040000020100008009002900100030060007600007090
000000001000002030004050600000700080001008002060090700002007009030900040500060800
For the third one, not even a single whip can be found.

This one has B-rating=29 and gB-rating=28, which surprises me, since I would think that the gB-rating would be a lot lower for difficult puzzles that the B-rating.
Code: Select all
001002003000010040500300100006007002010000080700900300007006008090040000300700500

gB solution: Show
Code: Select all
1)r2c7<>9, Braid[12]  {n9 n4}r4c7 - {n4 n2}r7c7 - n4{r6 r9}c9 - n9{r9 r5}c9 - n9r4{c8 c1} - n9r1{c1 c5} - n9{r3 r9}c6 - n1r9{c6 c8} - {n1 n5}r4c8 - n5r1{c8 c4} - {n5 n1}r7c4 - n1r4{c4 .}
2)r5c7<>9, gBraid[12]  {n9 n4}r4c7 - n9r4{c8 c1} - {n4 n2}r7c7 - n4{r6 r9}c9 - n9{r9 r123}c9 - n9r1{c8 c5} - n9{r3 r9}c6 - n1r9{c6 c8} - {n1 n5}r4c8 - n5r1{c8 c4} - {n5 n1}r7c4 - n1r4{c4 .}
3)r2c3<>2, gBraid[15]  n3r2{c3 c2} - n3{r2 r5}c3 - n7r2{c2 c789} - n9{r5 r3}c3 - n7{r3 r8}c8 - {n9 n6}r3c9 - {n6 n1}r8c9 - n1r9{c8 c6} - n1r6{c6 c8} - n6r6{c8 c5} - n6{r6 r9}c8 - n2r6{c5 c2} - {n6 n2}r8c7 - n2{r8 r7}c1 - n1r7{c1 .}
4)r4c2<>4, Braid[16]  {n4 n9}r4c7 - n3r4{c2 c5} - n3b4{r4c2 r5c3} - n3r7{c5 c8} - n9r5{c3 c1} - n9r7{c8 c5} - n9r1{c5 c8} - n9r9{c8 c9} - n4r9{c9 c3} - n4r3{c3 c6} - {n4 n5}r5c6 - n9r3{c6 c3} - {n9 n8}r2c3 - n8r3{c2 c5} - n7{r3 r1}c5 - n5{r1 .}c5
5)r2c3<>8, gBraid[16]  n3r2{c3 c2} - n3{r2 r5}c3 - n8{r2 r1}c7 - n7r2{c2 c789} - n9{r5 r3}c3 - n7{r3 r8}c8 - {n9 n6}r3c9 - {n6 n1}r8c9 - n1r9{c8 c6} - n1r6{c6 c8} - n9{r9 r2}c6 - n9r1{c5 c8} - {n9 n5}r4c8 - {n5 n8}r4c2 - n8r9{c2 c5} - n8{r8 .}c4
6)r7c8<>1, gBraid[28]  n1r4{c8 c4} - n3r7{c8 c5} - n1r9{c9 c6} - n1{r7 r8}c1 - n3{r7 r8}c8 - n9r7{c5 c7} - n3{r8 r5}c6 - n6b7{r8c1 r9c2} - n7{r8 r123}c8 - {n6 n2}r9c8 - n7r2{c9 c2} - n2{r8 r2}c7 - n8{r2 r1}c7 - {n8 n4}r1c2 - n4r3{c3 c6} - n4r7{c2 c1} - n4{r1 r5}c4 - n9{r3 r2}c6 - {n4 n8}r9c3 - n2{r7 r5}c1 - n2r6{c3 c5} - n6b5{r6c5 r5c5} - n6r3{c5 c789} - {n6 n5}r2c9 - n5r5{c9 c3} - {n5 n8}r6c2 - n8r3{c2 c5} - n8r4{c5 .}
7)r7c1<>4, Whip[4]  n1r7{c1 c4} - n1r4{c4 c8} - n1r9{c8 c9} - n4r9{c9 .}
8)r5c3<>4, Whip[10]  n4{r4 r1}c1 - n4{r1 r4}c4 - n1r4{c4 c8} - n1b5{r4c4 r6c6} - n1r9{c6 c9} - n4r9{c9 c2} - n6r9{c2 c8} - {n6 n5}r6c8 - n5b4{r6c3 r4c2} - n3b4{r4c2 .}
9)r1c7<>9, Braid[14]  {n9 n4}r4c7 - n8{r1 r2}c7 - {n4 n2}r7c7 - n4{r6 r9}c9 - {n2 n1}r7c1 - n9{r9 r5}c9 - {n1 n5}r7c4 - n9r4{c8 c1} - {n5 n6}r2c4 - {n6 n2}r2c1 - {n2 n4}r5c1 - {n4 n2}r5c4 - n2r8{c4 c3} - n5r8{c3 .}
10)r7c8<>2, gBraid[14]  {n2 n1}r7c1 - n2{r8 r2}c7 - n3{r7 r8}c8 - {n1 n5}r7c4 - n8{r2 r1}c7 - n7{r8 r123}c8 - {n5 n4}r7c2 - n7r2{c9 c2} - {n7 n6}r1c2 - {n6 n4}r1c4 - n6{r2 r8}c1 - n2{r8 r5}c1 - {n2 n6}r5c4 - n6{r5 .}c7
11)r8c6<>1, gBraid[10]  n1{r7 r4}c4 - n3{r8 r5}c6 - n3b8{r8c6 r7c5} - {n3 n9}r7c8 - n5b8{r7c5 r789c4} - {n9 n5}r4c8 - n5r1{c8 c5} - n9r1{c5 c1} - n5r5{c5 c3} - n9{r5 .}c3
12)r9c8<>1, Whip[2]  n1r4{c8 c4} - n1{r6 .}c6
13)r4c8<>9, gBraid[12]  {n9 n4}r4c7 - {n9 n3}r7c8 - n1r4{c8 c4} - n3r8{c8 c6} - n1{r6 r9}c6 - n9{r9 r123}c6 - n9r1{c5 c1} - {n9 n3}r2c3 - n4{r1 r5}c1 - {n4 n5}r5c6 - n5r4{c5 c2} - n3{r4 .}c2
14)r6c6<>8, Whip[7]  n1b5{r6c6 r4c4} - {n1 n5}r4c8 - {n5 n3}r4c5 - n3r5{c6 c3} - {n3 n9}r2c3 - {n9 n5}r2c6 - n5r1{c5 .}
15)r2c9<>6, Braid[8]  n5b3{r2c9 r1c8} - {n5 n1}r4c8 - {n1 n6}r6c8 - n6r9{c8 c2} - n6r3{c2 c5} - n6{r8 r1}c1 - n9r1{c1 c5} - n7{r1 .}c5
16)r6c6<>5, gBraid[10]  n1{r6 r9}c6 - n1b5{r6c6 r4c4} - {n1 n5}r4c8 - n5r5{c9 c3} - n5r8{c3 c4} - n3b4{r5c3 r4c2} - {n3 n8}r4c5 - n8b8{r9c5 r8c6} - n8r3{c6 c123} - n8{r2 .}c1
17)r7c5<>5, Braid[9]  n3r7{c5 c8} - n9r7{c8 c7} - n4b9{r7c7 r9c9} - n1r9{c9 c6} - {n1 n4}r6c6 - n1{r8 r4}c4 - {n1 n5}r4c8 - n5r1{c8 c4} - n4{r1 .}c4
18)r4c4<>5, gWhip[8]  n5{r6 r1}c5 - n5r2{c6 c9} - n5r5{c9 c3} - n9{r5 r123}c3 - n9r1{c1 c8} - {n9 n3}r7c8 - n3r8{c8 c6} - n5r8{c6 .}
19)r2c2<>6, gBraid[9]  n6{r1 r8}c1 - n7r2{c2 c789} - n7{r3 r8}c8 - {n7 n1}r8c9 - n3r8{c8 c6} - n1r9{c9 c6} - n8{r9 r123}c6 - {n8 n5}r2c4 - n5b8{r8c4 .}
20)r4c2<>8, Braid[9]  n3r4{c2 c5} - n8r6{c3 c5} - n3{r4 r2}c2 - n5r4{c5 c8} - {n3 n9}r2c3 - n5{r6 r2}c9 - {n5 n8}r2c6 - n8r3{c6 c3} - n8r9{c3 .}
21)r8c6<>8, Braid[9]  n3{r8 r5}c6 - n5{r5 r2}c6 - n5r1{c5 c8} - {n5 n1}r4c8 - {n1 n6}r6c8 - n1r6{c9 c6} - {n1 n9}r9c6 - {n9 n2}r9c5 - {n2 .}r9c8
22)r8c8<>1, gBraid[9]  {n1 n5}r4c8 - n3r8{c8 c6} - {n5 n3}r4c2 - {n5 n6}r6c8 - n5b8{r8c6 r789c4} - n5r1{c4 c5} - n7{r1 r3}c5 - n6{r3 r5}c5 - n3r5{c5 .}
23)r456c8==1
24)r9c9<>6, Whip[5]  n1r9{c9 c6} - {n1 n4}r6c6 - {n4 n5}r6c9 - {n5 n1}r4c8 - n1r6{c8 .}
25)r1c8<>6, Braid[9]  n6r9{c8 c2} - n6r3{c2 c5} - n6r6{c5 c9} - n7{r3 r1}c5 - {n7 n8}r1c7 - {n8 n4}r1c2 - n4r3{c3 c6} - n4r6{c6 c3} - n4{r5 .}c1
26)r5c4<>5, Braid[9]  n5r7{c4 c2} - n5r4{c2 c8} - n1r4{c8 c4} - {n1 n2}r7c4 - n1{r6 r9}c6 - {n2 n8}r8c4 - {n8 n9}r9c5 - {n9 n4}r9c9 - n4r7{c7 .}
27)r9c9<>9, Whip[9]  n1r9{c9 c6} - {n1 n4}r6c6 - n1r6{c6 c8} - {n1 n5}r4c8 - {n5 n6}r6c9 - {n6 n7}r3c9 - n7{r3 r1}c5 - n5r1{c5 c4} - n4{r1 .}c4
28)r3c8<>9, Braid[6]  n9{r2 r5}c9 - {n9 n4}r4c7 - n9{r5 r2}c3 - n9{r2 r9}c6 - n1r9{c6 c9} - n4{r9 .}c9
29)r1c7<>7, gWhip[8]  n7r5{c7 c9} - n9{r5 r123}c9 - {n9 n5}r1c8 - {n5 n1}r4c8 - n1r6{c8 c6} - n1r9{c6 c9} - n4{r9 r6}c9 - n5{r6 .}c9
30)r1c5<>8, Braid[7]  {n8 n6}r1c7 - n7{r1 r3}c5 - n6r3{c5 c2} - n8r3{c2 c3} - n8r6{c3 c2} - n8{r4 r8}c1 - n6{r8 .}c1
31)r2c7<>7, gWhip[8]  n7r5{c7 c9} - n9{r5 r123}c9 - {n9 n5}r1c8 - {n5 n1}r4c8 - n1r6{c8 c6} - n1r9{c6 c9} - n4{r9 r6}c9 - n5{r6 .}c9
32)r1c8<>9, gWhip[7]  {n9 n3}r7c8 - n3r8{c8 c6} - n5b8{r8c6 r789c4} - n5r1{c4 c5} - n7r1{c5 c2} - n7r2{c2 c9} - n5r2{c9 .}
33)r789c8==9
34) r4c7==9,  n9{. r4}c7
35)r7c5<>2, Whip[2]  n3r7{c5 c8} - n9r7{c8 .}
36)r2c2<>3, Whip[4]  {n3 n9}r2c3 - n9r1{c1 c5} - {n9 n3}r7c5 - n3r4{c5 .}
37) r2c3==3,  n3r2{. c3}
38) r4c2==3,  n3{. r4}c2
39)r6c5<>5, Braid[4]  n5b4{r6c3 r5c3} - n9{r5 r3}c3 - n5{r5 r2}c9 - n9{r2 .}c9
40)r6c8<>5, Whip[4]  n5{r5 r2}c9 - n9{r2 r3}c9 - n9{r3 r5}c3 - n5b4{r5c3 .}
41)r1c4<>5, Whip[4]  n5{r1 r4}c8 - n1r4{c8 c4} - {n1 n4}r6c6 - n4{r5 .}c4
42)r5c5<>5, Whip[2]  n5r1{c5 c8} - n5r4{c8 .}
43)r5c7<>6, Braid[4]  {n6 n1}r6c8 - {n1 n5}r4c8 - {n1 n4}r6c6 - {n4 .}r6c9
44)r5c9<>6, Braid[4]  {n6 n1}r6c8 - {n1 n5}r4c8 - {n1 n4}r6c6 - {n4 .}r6c9
45)r5c456==6
46)r1c5<>5, Whip[4]  n7{r1 r3}c5 - n6{r3 r5}c5 - n3r5{c5 c6} - n5b5{r5c6 .}
47) r1c8==5,  n5r1{. c8}
48) r4c8==1,  {. n1}r4c8
49) r6c8==6,  {. n6}r6c8
50) r4c5==5,  n5r4{. c5}
51) r6c6==1,  n1r6{. c6}
52) r9c9==1,  n1r9{. c9}
53) r9c2==6,  n6r9{. c2}
54) r9c3==4,  n4r9{. c3}
55) r7c7==4,  n4r7{. c7}
56) r5c7==7,  {. n7}r5c7
57)r9c456==8
58)r3c5<>7, Whip[3]  n6r3{c5 c9} - {n6 n7}r8c9 - n7{r8 .}c8
59) r1c5==7,  n7{. r1}c5
60) r1c1==9,  n9r1{. c1}
61) r5c3==9,  n9r5{. c3}
62) r5c9==5,  n5r5{. c9}
63) r6c9==4,  {. n4}r6c9
64) r2c1==6,  n6{. r2}c1
65)r1c2<>8, Whip[3]  {n8 n2}r3c3 - n2r2{c2 c7} - n8{r2 .}c7
66) r1c2==4,  {. n4}r1c2
67) r3c6==4,  n4r3{. c6}
68) r5c6==3,  {. n3}r5c6
69) r8c6==5,  {. n5}r8c6
70) r2c4==5,  n5r2{. c4}
71) r7c2==5,  n5r7{. c2}
72) r6c3==5,  n5r6{. c3}
73) r8c8==3,  n3r8{. c8}
74) r7c8==9,  {. n9}r7c8
75) r7c5==3,  {. n3}r7c5
76) r9c8==2,  {. n2}r9c8
77) r3c8==7,  {. n7}r3c8
78) r2c9==9,  {. n9}r2c9
79) r2c6==8,  {. n8}r2c6
80) r1c4==6,  {. n6}r1c4
81) r1c7==8,  {. n8}r1c7
82) r2c7==2,  {. n2}r2c7
83) r2c2==7,  {. n7}r2c2
84) r3c5==9,  {. n9}r3c5
85) r3c9==6,  {. n6}r3c9
86) r8c7==6,  {. n6}r8c7
87) r8c9==7,  {. n7}r8c9
88) r9c5==8,  {. n8}r9c5
89) r6c5==2,  {. n2}r6c5
90) r5c4==4,  {. n4}r5c4
91) r4c4==8,  {. n8}r4c4
92) r4c1==4,  {. n4}r4c1
93) r5c1==2,  {. n2}r5c1
94) r5c5==6,  {. n6}r5c5
95) r6c2==8,  {. n8}r6c2
96) r3c2==2,  {. n2}r3c2
97) r3c3==8,  {. n8}r3c3
98) r7c1==1,  {. n1}r7c1
99) r7c4==2,  {. n2}r7c4
100) r8c1==8,  {. n8}r8c1
101) r8c3==2,  {. n2}r8c3
102) r8c4==1,  {. n1}r8c4
103) r9c6==9,  {. n9}r9c6
Most difficult rule: gBraid[28]
Time elapsed: 2220.706 seconds
You can use my solver to obtain the braids solution in less that 20 seconds on any respectable PC.
Mauricio
 
Posts: 1175
Joined: 22 March 2006

Re: g-whips and g-braids

Postby denis_berthier » Mon Oct 08, 2012 10:19 am

Hi Maurico,

I've been away for some time.

You're really good at finding examples with exceptional properties.
Err, do you want the resolution paths with g-whips ?
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: An example of a puzzle solved by g-whips but not by whip

Postby yzfwsf » Sun Jul 31, 2022 6:52 am

denis_berthier wrote:I'll consider here Arto Inkala's "AI broken brick" (SER = 9.6):
4...6..7.......6...3...2..17....85...1.4......2.95..........7.5..91...3...3.4..8.

Code: Select all
Hidden Single: 4 in c6 => r2c6=4
Locked Candidates 1 (Pointing): 7 in b7 => r2c2<>7
ALS Discontinuous Nice Loop: 5r5c3 = r123c3 - (5=89)r12c2 - (9=4685)b4p2369 => r5c3=5
ALS AIC Type 1: (8=469)b4p239 - (9=58)r12c2 => r123c3<>8
Whip[9]: Supposing 3r6c9 would cause cell r5c5 to be empty => r6c9<>3
3r6c9 - 7r6(c9=c6) - 1b5(p9=p2) - 3r4(c5=c4) - r5c6(3=6) - r8c6(6=5) - r9c6(5=9) - 9r7(c5=c8) - r5c8(9=2) - r5c5(2=.)
Whip[10]: Supposing 6r9c1 would causes 1 to disappear in Row 9 => r9c1<>6
6r9c1 - 6r3(c1=c3) - r4c3(6=4) - r6c3(4=8) - r6c1(8=3) - 6b4(p7=p2) - 6c4(r4=r7) - 6r8(c6=c9) - 4c9(r8=r6) - r6c7(4=1) - 1r9(c7=.)
Whip[13]: Supposing 6r7c1 would causes 1 to disappear in Column 6 => r7c1<>6
6r7c1 - 6r3(c1=c3) - r4c3(6=4) - r6c3(4=8) - r6c1(8=3) - 6b4(p7=p2) - 6c4(r4=r9) - 6r8(c6=c9) - 4c9(r8=r6) - r6c7(4=1) - 1r9(c7=c1) - r7c3(1=2) - r1c3(2=1) - 1c6(r1=.)
Whip[13]: Supposing 5r9c4 would causes 9 to disappear in Column 7 => r9c4<>5
5r9c4 - 5c6(r8=r1) - 1r1(c6=c3) - 1r2(c1=c5) - 1r4(c5=c8) - 1c7(r6=r9) - r9c1(1=2) - 2c3(r7=r2) - 7c3(r2=r3) - 6r3(c3=c1) - 5r3(c1=c8) - r2c8(5=9) - 9c1(r2=r5) - 9c7(r5=.)
Locked Candidates 2 (Claiming): 5 in c4 => r1c6<>5
Whip[13]: Supposing 2r9c9 would causes 3 to disappear in Column 4 => r9c9<>2
2r9c9 - r8c7(2=4) - 4r3(c7=c8) - 5c8(r3=r2) - 2b3(p5=p1) - r1c3(2=1) - 1c6(r1=r6) - 1c7(r6=r9) - 9r9(c7=c6) - r1c6(9=3) - r7c6(3=6) - 6c4(r9=r4) - 2c4(r4=r7) - 3c4(r7=.)
Whip[13]: Supposing 6r7c3 would cause cell r9c6 to be empty => r7c3<>6
6r7c3 - 6c2(r9=r4) - 6c4(r4=r9) - 6r8(c6=c9) - r9c9(6=9) - 9r4(c9=c8) - 9r5(c7=c1) - 3c1(r5=r6) - 8b4(p7=p9) - 4b4(p9=p3) - 4c9(r4=r6) - 7r6(c9=c6) - r8c6(7=5) - r9c6(5=.)
Whip[15]: Supposing 2r8c9 would causes 3 to disappear in Box 3 => r8c9<>2
2r8c9 - r8c7(2=4) - 4r3(c7=c8) - 5c8(r3=r2) - 2b3(p5=p1) - r1c3(2=1) - 1c6(r1=r6) - 1r4(c5=c8) - 2b6(p2=p5) - 9c8(r5=r7) - 9r9(c9=c6) - 5c6(r9=r8) - 7c6(r8=r5) - r5c5(7=3) - 3r4(c4=c9) - 3b3(p6=.)
Whip[17]: Supposing 2r1c7 would causes 9 to disappear in Row 1 => r1c7<>2
2r1c7 - r1c3(2=1) - 1r2(c1=c5) - 1r4(c5=c8) - 1c7(r6=r9) - 2b9(p7=p2) - r8c7(2=4) - r8c9(4=6) - r9c9(6=9) - 9r4(c9=c2) - 4c2(r4=r7) - r7c3(4=8) - 8r8(c2=c5) - 2r8(c5=c1) - 2c3(r7=r2) - 7r2(c3=c4) - r3c5(7=9) - 9r1(c6=.)
Whip[13]: Supposing 2r4c9 would causes 2 to disappear in Box 5 => r4c9<>2
2r4c9 - 2r1(c9=c3) - 1r1(c3=c6) - 1c5(r2=r4) - 3r4(c5=c4) - 3c6(r6=r7) - 9c6(r7=r9) - 9r7(c5=c8) - r5c8(9=6) - r4c8(6=4) - 4r6(c9=c3) - 8c3(r6=r7) - r7c5(8=2) - 2b5(p5=.)
Whip[13]: Supposing 6r6c9 would cause cell r9c9 to be empty => r6c9<>6
6r6c9 - 7c9(r6=r5) - 7b5(p6=p9) - 1c6(r6=r1) - r1c3(1=2) - 2c9(r1=r2) - 8c9(r2=r1) - 3b3(p3=p1) - 9r1(c7=c2) - 9c1(r3=r5) - 6r5(c1=c6) - r8c6(6=5) - r9c6(5=9) - r9c9(9=.)
Whip[15]: Supposing 4r6c9 would causes 2 to disappear in Box 6 => r6c9<>4
4r6c9 - 7c9(r6=r5) - 7b5(p6=p9) - 1c6(r6=r1) - r1c3(1=2) - 2c9(r1=r2) - 8c9(r2=r1) - 3c9(r1=r4) - 3c7(r6=r1) - 9r1(c7=c2) - 9r4(c2=c8) - 9r2(c8=c5) - 9r7(c5=c6) - 3c6(r7=r5) - r5c5(3=2) - 2b6(p5=.)
Grouped AIC Type 2: (2=4)r8c7 - r8c9 = r4c9 - r4c23 = (4-8)r6c3 = r7c3 - r7c45 = 8r8c5 => r8c5<>2
Whip[8]: Supposing 3r1c4 would causes 2 to disappear in Box 6 => r1c4<>3
3r1c4 - 3r2(c5=c9) - 3r4(c9=c5) - 1r4(c5=c8) - 1r6(c7=c6) - r1c6(1=9) - 9c5(r3=r7) - 2c5(r7=r5) - 2b6(p6=.)
Whip[8]: Supposing 2r9c7 would causes 2 to disappear in Box 8 => r9c7<>2
2r9c7 - 1b9(p7=p2) - 9b9(p2=p9) - 6b9(p9=p6) - 4c9(r8=r4) - 4r6(c8=c3) - 8c3(r6=r7) - r7c1(8=2) - 2b8(p2=.)
Whip[9]: Supposing 6r4c8 would causes 1 to disappear in Row 4 => r4c8<>6
6r4c8 - r4c3(6=4) - 4c9(r4=r8) - 6b9(p6=p9) - 6c4(r9=r7) - 6c2(r7=r8) - 7c2(r8=r9) - r9c4(7=2) - 2r4(c4=c5) - 1r4(c5=.)
Whip[12]: Supposing 8r2c5 would cause cell r3c5 to be empty => r2c5<>8
8r2c5 - 8c4(r3=r7) - r1c4(8=5) - r3c4(5=7) - 7r2(c4=c3) - 1r2(c3=c1) - r7c1(1=2) - 2r9(c1=c4) - 6c4(r9=r4) - r4c3(6=4) - r4c2(4=9) - 9c1(r5=r3) - r3c5(9=.)
Whip[12]: Supposing 9r4c8 would causes 6 to disappear in Column 4 => r4c8<>9
9r4c8 - 1r4(c8=c5) - 2r4(c5=c4) - 2c5(r5=r7) - 9r7(c5=c6) - 3b8(p3=p1) - 3r4(c4=c9) - 3c7(r6=r1) - 3r2(c9=c5) - 9b2(p5=p8) - 9c7(r3=r9) - r9c9(9=6) - 6c4(r9=.)
Whip[5]: Supposing 9r2c9 would causes 1 to disappear in Column 6 => r2c9<>9
9r2c9 - 9r4(c9=c2) - 9r1(c2=c6) - 9r9(c6=c7) - 1c7(r9=r6) - 1c6(r6=.)
Whip[12]: Supposing 2r2c8 would causes 9 to disappear in Row 4 => r2c8<>2
2r2c8 - 2r1(c9=c3) - 1r1(c3=c6) - 1c5(r2=r4) - 2r4(c5=c4) - 3r4(c4=c9) - r2c9(3=8) - r1c9(8=9) - r9c9(9=6) - r9c4(6=7) - r9c2(7=5) - r2c2(5=9) - 9r4(c2=.)
Locked Candidates 1 (Pointing): 2 in b3 => r5c9<>2
Whip[6]: Supposing 5r2c4 would causes 3 to disappear in Box 2 => r2c4<>5
5r2c4 - 5r1(c4=c2) - 5r3(c1=c8) - r2c8(5=9) - 9r1(c9=c6) - 1b2(p3=p5) - 3b2(p5=.)
Whip[10]: Supposing 4r4c8 would cause cell r3c8 to be empty => r4c8<>4
4r4c8 - r4c3(4=6) - r4c2(6=9) - r4c9(9=3) - r4c4(3=2) - r4c5(2=1) - 1c6(r6=r1) - 3r1(c6=c7) - 9r1(c7=c9) - r2c8(9=5) - r3c8(5=.)
Whip[11]: Supposing 5r2c1 would causes 9 to disappear in Column 6 => r2c1<>5
5r2c1 - r2c8(5=9) - r2c2(9=8) - r1c2(8=9) - 9r4(c2=c9) - 9c7(r5=r9) - 1c7(r9=r6) - 1c6(r6=r1) - 1c5(r2=r4) - 3r4(c5=c4) - 3c6(r6=r7) - 9c6(r7=.)
Whip[11]: Supposing 4r7c8 would causes 8 to disappear in Row 3 => r7c8<>4
4r7c8 - 4r3(c8=c7) - 4b6(p7=p3) - 9r4(c9=c2) - 4b4(p2=p9) - r4c3(4=6) - 6r3(c3=c1) - 9b1(p7=p4) - r2c8(9=5) - 5r3(c8=c4) - r1c4(5=8) - 8r3(c5=.)
Locked Candidates 2 (Claiming): 4 in r7 => r8c2<>4
Whip[5]: Supposing 6r7c2 would causes 9 to disappear in Row 4 => r7c2<>6
6r7c2 - 4c2(r7=r4) - r4c3(4=6) - 6c4(r4=r9) - r9c9(6=9) - 9r4(c9=.)
Whip[9]: Supposing 9r9c7 would causes 3 to disappear in Box 2 => r9c7<>9
9r9c7 - 1b9(p7=p2) - 1r4(c8=c5) - 1c6(r6=r1) - 9c6(r1=r7) - 6r7(c6=c4) - 3b8(p1=p2) - 2c5(r7=r5) - r4c4(2=3) - 3b2(p4=.)
Naked Single: r9c7=1
ALS Discontinuous Nice Loop: 5r8c16 = r3c1 - (5=89)r12c2 - r4c2 = r4c9 - r9c9 = (9-5)r9c6 = 5r8c6 => r8c2<>5
Whip[7]: Supposing 9r1c2 would causes 1 to disappear in Box 2 => r1c2<>9
9r1c2 - 9r4(c2=c9) - 9c7(r5=r3) - 9r2(c8=c5) - 1c5(r2=r4) - 3r4(c5=c4) - 3b2(p4=p3) - 1b2(p3=.)
Naked Pair: in r1c2,r1c4 => r1c7<>8,r1c9<>8,
ALS Discontinuous Nice Loop: 8r35c7 = r5c1 - (8=467)r346c3 - (7=589)b2p178 - r1c6 = r1c79 - (9=458)b3p578 => r6c7<>8
Discontinuous Nice Loop: 5r2c8 = (5-4)r3c8 = r3c7 - (4=3)r6c7 - (3=9)r1c7 - (9=5)r2c8 => r2c8=5
XY-Chain: (4=9)r3c8 - (9=3)r1c7 - (3=4)r6c7 => r3c7,r6c8<>4
Hidden Single: 4 in r3 => r3c8=4
AIC Type 1: (8=7)r8c5 - r8c2 = (7-5)r9c2 = r1c2 - (5=8)r1c4 => r3c5,r7c4<>8
Grouped Discontinuous Nice Loop: 8r3c7 = r2c9 - (8=9)r2c2 - r4c2 = r4c9 - r9c9 = r9c6 - r1c6 = r1c79 - (9=8)r3c7 => r3c7=8
Locked Candidates 1 (Pointing): 9 in b3 => r1c6<>9
Locked Candidates 1 (Pointing): 9 in b2 => r7c5<>9
Hidden Pair: 78 in r5c9,r6c9 => r5c9<>369
Finned Swordfish:6c249\r489 fr7c4 => r89c6<>6
Grouped AIC Type 2: 2r5c5 = r5c78 - (2=1)r4c8 - r4c5 = r2c5 - (1=3)r1c6 - r1c7 = r56c7 - r4c9 = 3r4c45 => r5c5<>3
ALS Discontinuous Nice Loop: 2r789c1 = r2c1 - (2=3)r2c9 - (3=57891)b2p14578 - (1=34692)r4c23459 - (2=7)r5c5 - (7=8)r8c5 - (8=5672)b7p4578 => r2c1,r7c3<>2
ALS Discontinuous Nice Loop: 2r79c4 = r4c4 - (2=7)r5c5 - (7=1369)r1567c6 - r7c8 = (9-2)r5c8 = r5c5,r7c8 - r7c5 = 2r79c4 => r4c4,r7c5<>2
Hidden Pair: 12 in r4c5,r4c8 => r4c5<>3
ALS Discontinuous Nice Loop: 6r7c46 = r7c8 - (6=1)r6c8 - (1=367)b5p169 - (7=59)r89c6 - (9=123486)r7c123456 => r7c8,r9c4<>6
Locked Candidates 2 (Claiming): 6 in c8 => r4c9<>6
XY-Chain: (5=7)r3c4 - (7=2)r9c4 - (2=5)r9c1 => r3c1<>5
Hidden Single: 5 in r3 => r3c4=5
Hidden Single: 5 in r1 => r1c2=5
Hidden Single: 8 in r1 => r1c4=8
XY-Chain: (2=9)r7c8 - (9=6)r9c9 - (6=7)r9c2 - (7=2)r9c4 => r7c4<>2
Hidden Single: 2 in c4 => r9c4=2
Hidden Single: 7 in c4 => r2c4=7
Hidden Single: 7 in r3 => r3c3=7
Hidden Single: 6 in r3 => r3c1=6
Full House: r3c5=9
Naked Single: r9c1=5
Hidden Single: 5 in r8 => r8c6=5
Locked Candidates 1 (Pointing): 6 in b7 => r4c2<>6
Locked Pair: in r1c3,r2c3 => r2c1<>1,r7c3<>1,
Hidden Single: 1 in r7 => r7c1=1
Hidden Single: 2 in r7 => r7c8=2
Hidden Single: 2 in r4 => r4c5=2
Hidden Single: 1 in r4 => r4c8=1
Hidden Single: 2 in r5 => r5c7=2
Hidden Single: 1 in r6 => r6c6=1
Hidden Single: 1 in r1 => r1c3=1
Hidden Single: 2 in r1 => r1c9=2
Hidden Single: 9 in r1 => r1c7=9
Full House: r1c6=3
Full House: r2c5=1
Full House: r2c9=3
Hidden Single: 2 in r2 => r2c3=2
Hidden Single: 3 in r4 => r4c4=3
Full House: r7c4=6
Hidden Single: 6 in r4 => r4c3=6
Hidden Single: 3 in r5 => r5c1=3
Hidden Single: 8 in r5 => r5c9=8
Hidden Single: 9 in r5 => r5c8=9
Full House: r6c8=6
Hidden Single: 9 in r4 => r4c2=9
Full House: r4c9=4
Hidden Single: 9 in r2 => r2c1=9
Full House: r2c2=8
Hidden Single: 6 in r5 => r5c6=6
Full House: r5c5=7
Hidden Single: 3 in r6 => r6c7=3
Full House: r8c7=4
Full House: r6c9=7
Hidden Single: 4 in r6 => r6c3=4
Full House: r6c1=8
Full House: r8c1=2
Full House: r7c3=8
Hidden Single: 3 in r7 => r7c5=3
Full House: r8c5=8
Hidden Single: 4 in r7 => r7c2=4
Full House: r7c6=9
Full House: r9c6=7
Hidden Single: 7 in r8 => r8c2=7
Full House: r8c9=6
Full House: r9c2=6
Full House: r9c9=9
yzfwsf
 
Posts: 844
Joined: 16 April 2019

Re: g-whips and g-braids

Postby denis_berthier » Sun Jul 31, 2022 7:05 am

.
Code: Select all
Resolution state after Singles and whips[1]:
   +----------------------+----------------------+----------------------+
   ! 4      589    1258   ! 358    6      1359   ! 2389   7      2389   !
   ! 12589  589    12578  ! 3578   13789  4      ! 6      259    2389   !
   ! 5689   3      5678   ! 578    789    2      ! 489    459    1      !
   +----------------------+----------------------+----------------------+
   ! 7      469    46     ! 236    123    8      ! 5      12469  23469  !
   ! 35689  1      568    ! 4      237    367    ! 2389   269    236789 !
   ! 368    2      468    ! 9      5      1367   ! 1348   146    34678  !
   +----------------------+----------------------+----------------------+
   ! 1268   468    12468  ! 2368   2389   369    ! 7      12469  5      !
   ! 2568   45678  9      ! 1      278    567    ! 24     3      246    !
   ! 1256   567    3      ! 2567   4      5679   ! 129    8      269    !
   +----------------------+----------------------+----------------------+
210 candidates.
185 g-candidates, 1050 csp-glinks and 624 non-csp glinks

The start is identical, but divergence occurs faster than in your previous examples:
Code: Select all
whip[4]: r5n5{c3 c1} - b4n9{r5c1 r4c2} - r1c2{n9 n8} - r2c2{n8 .} ==> r1c3≠5
whip[4]: r5n5{c3 c1} - b4n9{r5c1 r4c2} - r1c2{n9 n8} - r2c2{n8 .} ==> r2c3≠5
whip[4]: r5n5{c3 c1} - b4n9{r5c1 r4c2} - r1c2{n9 n8} - r2c2{n8 .} ==> r3c3≠5
hidden-single-in-a-column ==> r5c3=5
whip[9]: r6n7{c9 c6} - b5n1{r6c6 r4c5} - r4n3{c5 c4} - r5c6{n3 n6} - r8c6{n6 n5} - r9c6{n5 n9} - r7n9{c6 c8} - r5c8{n9 n2} - r5c5{n2 .} ==> r6c9≠3
whip[10]: r3n6{c1 c3} - r4c3{n6 n4} - r6c3{n4 n8} - r6c1{n8 n3} - b4n6{r6c1 r4c2} - c4n6{r4 r7} - r8n6{c6 c9} - c9n4{r8 r6} - r6c7{n4 n1} - r9n1{c7 .} ==> r9c1≠6
whip[13]: c6n5{r9 r1} - r1n1{c6 c3} - r2n1{c3 c5} - b5n1{r4c5 r6c6} - c7n1{r6 r9} - r9c1{n1 n2} - b1n2{r2c1 r2c3} - c3n7{r2 r3} - r3n6{c3 c1} - r3n5{c1 c8} - r2c8{n5 n9} - c1n9{r2 r5} - c7n9{r5 .} ==> r9c4≠5
whip[1]: b8n5{r9c6 .} ==> r1c6≠5
whip[13]: r3n6{c1 c3} - r4c3{n6 n4} - r6c3{n4 n8} - r6c1{n8 n3} - b4n6{r6c1 r4c2} - c4n6{r4 r9} - r8n6{c6 c9} - c9n4{r8 r6} - r6c7{n4 n1} - c6n1{r6 r1} - r1c3{n1 n2} - r7c3{n2 n1} - c8n1{r7 .} ==> r7c1≠6
whip[15]: r4c3{n6 n4} - r6c3{n4 n8} - r3c3{n8 n7} - r3n6{c3 c1} - b4n6{r6c1 r4c2} - c4n6{r4 r9} - r8n6{c6 c9} - c9n4{r8 r6} - r6n7{c9 c6} - r8c6{n7 n5} - r9c6{n5 n9} - r9c9{n9 n2} - r9c7{n2 n1} - r6n1{c7 c8} - r6n6{c8 .} ==> r7c3≠6
g-whip[15]: c7n1{r9 r6} - c6n1{r6 r1} - c5n1{r2 r4} - c8n1{r4 r7} - b9n9{r7c8 r9c9} - c6n9{r9 r7} - c6n3{r7 r456} - r4n3{c5 c9} - c7n3{r6 r1} - r1n9{c7 c2} - r4n9{c2 c8} - r2n9{c8 c5} - r2n3{c5 c4} - r2n7{c4 c3} - c3n1{r2 .} ==> r9c7≠2
g-whip[18]: r4n1{c8 c5} - c6n1{r6 r1} - c6n9{r1 r789} - r7n9{c5 c6} - c6n3{r7 r456} - r4n3{c5 c9} - r4n2{c9 c4} - r5c5{n2 n7} - r6n7{c6 c9} - c9n4{r6 r8} - r8c7{n4 n2} - r8c5{n2 n8} - r3c5{n8 n9} - r2c5{n9 n3} - r1n3{c6 c7} - c7n9{r1 r9} - r9n1{c7 c1} - r9n2{c1 .} ==> r4c8≠9
whip[5]: r4n9{c9 c2} - r1n9{c2 c6} - c6n1{r1 r6} - c7n1{r6 r9} - r9n9{c7 .} ==> r2c9≠9
g-whip[10]: c5n1{r2 r4} - c6n1{r6 r1} - b2n3{r1c6 r123c4} - r4n3{c4 c9} - r4n9{c9 c2} - r2c2{n9 n5} - r1c2{n5 n8} - r1n9{c2 c789} - r2c8{n9 n2} - r2c9{n2 .} ==> r2c5≠8
g-whip[14]: r4n1{c8 c5} - c6n1{r6 r1} - b2n9{r1c6 r123c5} - r7n9{c5 c6} - c6n3{r7 r456} - r4n3{c5 c9} - r4n9{c9 c2} - b4n4{r4c2 r456c3} - r7n4{c3 c2} - r7n6{c2 c4} - r7n3{c4 c5} - b8n8{r7c5 r8c5} - c5n2{r8 r5} - r4c4{n2 .} ==> r7c8≠1
hidden-single-in-a-block ==> r9c7=1
whip[5]: c6n5{r8 r9} - r9n9{c6 c9} - r4n9{c9 c2} - r2c2{n9 n8} - r1c2{n8 .} ==> r8c2≠5
whip[7]: r4n9{c2 c9} - c7n9{r5 r3} - b2n9{r3c5 r2c5} - b2n1{r2c5 r1c6} - b5n1{r6c6 r4c5} - r4n3{c5 c4} - b2n3{r1c4 .} ==> r1c2≠9
whip[5]: r1c2{n8 n5} - r2c2{n5 n9} - b4n9{r4c2 r5c1} - b4n8{r5c1 r6c1} - c1n3{r6 .} ==> r1c3≠8
whip[5]: r1c2{n8 n5} - r2c2{n5 n9} - b4n9{r4c2 r5c1} - b4n8{r5c1 r6c1} - c1n3{r6 .} ==> r2c3≠8
whip[5]: r1c2{n8 n5} - r2c2{n5 n9} - b4n9{r4c2 r5c1} - b4n8{r5c1 r6c1} - c1n3{r6 .} ==> r3c3≠8
whip[8]: r1c2{n5 n8} - r2c2{n8 n9} - b4n9{r4c2 r5c1} - c1n3{r5 r6} - b4n8{r6c1 r6c3} - r6c7{n8 n4} - r3n4{c7 c8} - c8n5{r3 .} ==> r2c1≠5
whip[9]: r1c2{n8 n5} - r2c2{n5 n9} - b4n9{r4c2 r5c1} - c1n3{r5 r6} - b4n8{r6c1 r6c3} - r6c7{n8 n4} - r3c7{n4 n9} - c8n9{r2 r7} - c5n9{r7 .} ==> r3c1≠8
t-whip[10]: b7n5{r9c1 r9c2} - r1c2{n5 n8} - r2c2{n8 n9} - r4n9{c2 c9} - b9n9{r9c9 r7c8} - c5n9{r7 r3} - c6n9{r1 r9} - r9n7{c6 c4} - r3n7{c4 c3} - r3n6{c3 .} ==> r3c1≠5
whip[1]: c1n5{r9 .} ==> r9c2≠5
z-chain[3]: b7n6{r9c2 r8c1} - r3c1{n6 n9} - b4n9{r5c1 .} ==> r4c2≠6
whip[1]: c2n6{r9 .} ==> r8c1≠6
z-chain[5]: r3n8{c5 c7} - r3n4{c7 c8} - c8n5{r3 r2} - c2n5{r2 r1} - b1n8{r1c2 .} ==> r2c4≠8
whip[8]: r3c1{n9 n6} - r3c3{n6 n7} - r3c5{n7 n8} - c4n8{r3 r7} - c3n8{r7 r6} - r6c1{n8 n3} - r5c1{n3 n9} - c7n9{r5 .} ==> r3c8≠9
whip[10]: r3c1{n9 n6} - r3c3{n6 n7} - r3c5{n7 n8} - c4n8{r3 r7} - c3n8{r7 r6} - r6c1{n8 n3} - r5c1{n3 n9} - c8n9{r5 r7} - b8n9{r7c5 r9c6} - r1n9{c6 .} ==> r3c7≠9
whip[8]: r8c7{n2 n4} - r3c7{n4 n8} - c5n8{r3 r7} - c3n8{r7 r6} - b6n8{r6c7 r5c9} - c9n7{r5 r6} - c9n4{r6 r4} - b4n4{r4c2 .} ==> r8c5≠2
whip[9]: r3c7{n8 n4} - r8c7{n4 n2} - r1n2{c7 c3} - r1n1{c3 c6} - r1n9{c6 c7} - b3n3{r1c7 r2c9} - b2n3{r2c4 r1c4} - r4n3{c4 c5} - c5n1{r4 .} ==> r1c9≠8
whip[9]: r2n3{c5 c9} - r4n3{c9 c5} - r4n1{c5 c8} - r6n1{c8 c6} - r1c6{n1 n9} - r1c9{n9 n2} - r4n2{c9 c4} - b8n2{r7c4 r7c5} - c5n9{r7 .} ==> r1c4≠3
naked-pairs-in-a-row: r1{c2 c4}{n5 n8} ==> r1c7≠8
t-whip[4]: r1c4{n5 n8} - r3n8{c5 c7} - r3n4{c7 c8} - c8n5{r3 .} ==> r2c4≠5
whip[8]: r8c7{n2 n4} - r3c7{n4 n8} - r2c9{n8 n3} - r1n3{c9 c6} - r2c4{n3 n7} - r9c4{n7 n6} - r7c6{n6 n9} - b9n9{r7c8 .} ==> r9c9≠2
whip[7]: c2n7{r8 r9} - b7n6{r9c2 r7c2} - c2n4{r7 r4} - r4c3{n4 n6} - c4n6{r4 r9} - r9c9{n6 n9} - r4n9{c9 .} ==> r8c2≠8
whip[8]: r1c2{n8 n5} - r2c2{n5 n9} - r4n9{c2 c9} - r9n9{c9 c6} - c6n5{r9 r8} - r8c1{n5 n2} - b9n2{r8c9 r7c8} - r7n9{c8 .} ==> r2c1≠8
whip[1]: b1n8{r2c2 .} ==> r7c2≠8
singles: c2{n5 n8}{r1 r2} ==> r2c2≠9, r4c2=9
whip[1]: c2n4{r8 .} ==> r7c3≠4
whip[6]: r8c5{n8 n7} - r3c5{n7 n9} - c1n9{r3 r2} - c1n1{r2 r7} - r7c3{n1 n2} - b1n2{r1c3 .} ==> r7c5≠8
whip[8]: r8c7{n2 n4} - r3c7{n4 n8} - c5n8{r3 r8} - r8c1{n8 n5} - c6n5{r8 r9} - r9n9{c6 c9} - r1c9{n9 n3} - r2c9{n3 .} ==> r8c9≠2
z-chain[6]: b9n2{r8c7 r7c8} - b9n9{r7c8 r9c9} - b3n9{r1c9 r2c8} - c8n5{r2 r3} - r3n4{c8 c7} - r8c7{n4 .} ==> r1c7≠2
whip[8]: r9c1{n2 n5} - r8c1{n5 n8} - c5n8{r8 r3} - b3n8{r3c7 r2c9} - b3n2{r2c9 r1c9} - b3n3{r1c9 r1c7} - c7n9{r1 r5} - r5n8{c7 .} ==> r2c1≠2
whip[1]: c1n2{r9 .} ==> r7c3≠2
biv-chain[3]: r1n1{c6 c3} - r2c1{n1 n9} - r3n9{c1 c5} ==> r1c6≠9
whip[1]: r1n9{c9 .} ==> r2c8≠9
whip[1]: c6n9{r9 .} ==> r7c5≠9
biv-chain[4]: c6n9{r7 r9} - r9n5{c6 c1} - r9n2{c1 c4} - r7c5{n2 n3} ==> r7c6≠3
g-whip[2]: r4n3{c9 c456} - c6n3{r6 .} ==> r1c9≠3
swordfish-in-columns: n3{c1 c6 c7}{r5 r6 r1} ==> r5c9≠3, r5c5≠3
biv-chain[3]: c9n3{r4 r2} - r1c7{n3 n9} - r1c9{n9 n2} ==> r4c9≠2
biv-chain[3]: c7n9{r5 r1} - b3n3{r1c7 r2c9} - b3n8{r2c9 r3c7} ==> r5c7≠8
finned-swordfish-in-columns: n8{c3 c7 c4}{r7 r6 r3} ==> r3c5≠8
hidden-single-in-a-column ==> r8c5=8
naked-pairs-in-a-block: b7{r8c1 r9c1}{n2 n5} ==> r7c1≠2
hidden-pairs-in-a-column: c4{n5 n8}{r1 r3} ==> r3c4≠7
biv-chain[3]: r9c2{n6 n7} - r8n7{c2 c6} - b8n5{r8c6 r9c6} ==> r9c6≠6
biv-chain[4]: r3c8{n4 n5} - r2c8{n5 n2} - r1c9{n2 n9} - b9n9{r9c9 r7c8} ==> r7c8≠4
hidden-single-in-a-row ==> r7c2=4
biv-chain[4]: b8n5{r9c6 r8c6} - r8n7{c6 c2} - c2n6{r8 r9} - r9c9{n6 n9} ==> r9c6≠9
stte
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: g-whips and g-braids

Postby yzfwsf » Tue Aug 02, 2022 9:50 pm

If I also adopt the length first strategy, I will get the following solution path.
Code: Select all
Hidden Single: 4 in c6 => r2c6=4
Locked Candidates 1 (Pointing): 7 in b7 => r2c2<>7
Whip[4]: Supposing 5r1c3 will result in all candidates in cell r2c2 being impossible => r1c3<>5
5r1c3 - 5r5(c3=c1) - 9b4(p4=p2) - r1c2(9=8) - r2c2(8=.)
Whip[4]: Supposing 5r2c3 will result in all candidates in cell r2c2 being impossible => r2c3<>5
5r2c3 - 5r5(c3=c1) - 9b4(p4=p2) - r1c2(9=8) - r2c2(8=.)
Whip[4]: Supposing 5r3c3 will result in all candidates in cell r2c2 being impossible => r3c3<>5
5r3c3 - 5r5(c3=c1) - 9b4(p4=p2) - r1c2(9=8) - r2c2(8=.)
Hidden Single: 5 in c3 => r5c3=5
Whip[9]: Supposing 3r6c9 will result in all candidates in cell r5c5 being impossible => r6c9<>3
3r6c9 - 7r6(c9=c6) - 1b5(p9=p2) - 3r4(c5=c4) - r5c6(3=6) - r8c6(6=5) - r9c6(5=9) - 9r7(c5=c8) - r5c8(9=2) - r5c5(2=.)
Whip[10]: Supposing 6r9c1 would causes 1 to disappear in Row 9 => r9c1<>6
6r9c1 - 6r3(c1=c3) - r4c3(6=4) - r6c3(4=8) - r6c1(8=3) - 6b4(p7=p2) - 6c4(r4=r7) - 6r8(c6=c9) - 4c9(r8=r6) - r6c7(4=1) - 1r9(c7=.)
Whip[13]: Supposing 6r7c1 would causes 1 to disappear in Column 6 => r7c1<>6
6r7c1 - 6r3(c1=c3) - r4c3(6=4) - r6c3(4=8) - r6c1(8=3) - 6b4(p7=p2) - 6c4(r4=r9) - 6r8(c6=c9) - 4c9(r8=r6) - r6c7(4=1) - 1r9(c7=c1) - r7c3(1=2) - r1c3(2=1) - 1c6(r1=.)
Whip[13]: Supposing 5r9c4 would causes 9 to disappear in Column 7 => r9c4<>5
5r9c4 - 5c6(r8=r1) - 1r1(c6=c3) - 1r2(c1=c5) - 1r4(c5=c8) - 1c7(r6=r9) - r9c1(1=2) - 2c3(r7=r2) - 7c3(r2=r3) - 6r3(c3=c1) - 5r3(c1=c8) - r2c8(5=9) - 9c1(r2=r5) - 9c7(r5=.)
Locked Candidates 2 (Claiming): 5 in c4 => r1c6<>5
Whip[15]: Supposing 6r7c3 will result in all candidates in cell r6c1 being impossible => r7c3<>6
6r7c3 - r4c3(6=4) - r6c3(4=8) - r3c3(8=7) - 6r3(c3=c1) - 6b4(p7=p2) - 6c4(r4=r9) - 6r8(c6=c9) - 4c9(r8=r6) - 7r6(c9=c6) - r8c6(7=5) - r9c6(5=9) - r9c9(9=2) - r9c7(2=1) - r6c7(1=3) - r6c1(3=.)
g-Whip[15]: Supposing 2r9c7 would causes 1 to disappear in Column 3 => r9c7<>2
2r9c7 - 1c7(r9=r6) - 1c6(r6=r1) - 1c5(r2=r4) - 1c8(r4=r7) - 9b9(p2=p9) - 9c6(r9=r7) - 3c6(r7=r56) - 3r4(c4=c9) - 3c7(r5=r1) - 9r1(c7=c2) - 9r4(c2=c8) - 9r2(c8=c5) - 3b2(p5=p4) - 7r2(c4=c3) - 1c3(r2=.)
g-Whip[18]: Supposing 8r2c5 would causes 1 to disappear in Row 9 => r2c5<>8
8r2c5 - 1c5(r2=r4) - 1c6(r6=r1) - 3b2(p3=p14) - 3r4(c4=c9) - 3r2(c9=c4) - r1c4(3=5) - 8c4(r1=r7) - r3c4(8=7) - 7r2(c4=c3) - 1b1(p6=p4) - r7c1(1=2) - r9c1(2=5) - 5c2(r8=r2) - 9r2(c2=c89) - 9r1(c9=c2) - 9r4(c2=c8) - 9c7(r5=r9) - 1r9(c7=.)
g-Whip[18]: Supposing 9r4c8 would causes 2 to disappear in Row 9 => r4c8<>9
9r4c8 - 1r4(c8=c5) - 1c6(r6=r1) - 9c6(r1=r79) - 9r7(c5=c6) - 3c6(r7=r56) - 3r4(c4=c9) - 2r4(c9=c4) - r5c5(2=7) - 7r6(c6=c9) - 4c9(r6=r8) - r8c7(4=2) - r8c5(2=8) - r3c5(8=9) - r2c5(9=3) - 3r1(c4=c7) - 9c7(r1=r9) - 1r9(c7=c1) - 2r9(c1=.)
Whip[5]: Supposing 9r2c9 would causes 1 to disappear in Column 6 => r2c9<>9
9r2c9 - 9r4(c9=c2) - 9r1(c2=c6) - 9r9(c6=c7) - 1c7(r9=r6) - 1c6(r6=.)
g-Whip[14]: Supposing 1r7c8 will result in all candidates in cell r8c6 being impossible => r7c8<>1
1r7c8 - 1r4(c8=c5) - 1c6(r6=r1) - 9c6(r1=r79) - 9r7(c5=c6) - 3c6(r7=r56) - 3r4(c4=c9) - 9r4(c9=c2) - 4c2(r4=r78) - 4r7(c3=c2) - 6r7(c2=c4) - r4c4(6=2) - r9c4(2=7) - r9c6(7=5) - r8c6(5=.)
Hidden Single: 1 in b9 => r9c7=1
Whip[5]: Supposing 5r8c2 will result in all candidates in cell r2c2 being impossible => r8c2<>5
5r8c2 - 5r9(c1=c6) - 9r9(c6=c9) - 9r4(c9=c2) - r1c2(9=8) - r2c2(8=.)
Whip[7]: Supposing 9r1c2 would causes 1 to disappear in Box 2 => r1c2<>9
9r1c2 - 9r4(c2=c9) - 9c7(r5=r3) - 9r2(c8=c5) - 1c5(r2=r4) - 3r4(c5=c4) - 3b2(p4=p3) - 1b2(p3=.)
Whip[5]: Supposing 8r1c3 would causes 8 to disappear in Box 4 => r1c3<>8
8r1c3 - r1c2(8=5) - r2c2(5=9) - 9c1(r3=r5) - 3c1(r5=r6) - 8b4(p7=.)
Whip[5]: Supposing 8r2c3 would causes 8 to disappear in Box 4 => r2c3<>8
8r2c3 - r1c2(8=5) - r2c2(5=9) - 9c1(r3=r5) - 3c1(r5=r6) - 8b4(p7=.)
Whip[5]: Supposing 8r3c3 would causes 8 to disappear in Box 4 => r3c3<>8
8r3c3 - r1c2(8=5) - r2c2(5=9) - 9c1(r3=r5) - 3c1(r5=r6) - 8b4(p7=.)
Whip[8]: Supposing 5r2c1 would causes 5 to disappear in Box 3 => r2c1<>5
5r2c1 - r1c2(5=8) - r2c2(8=9) - 9c1(r3=r5) - 3c1(r5=r6) - 8b4(p7=p9) - r6c7(8=4) - 4r3(c7=c8) - 5b3(p8=.)
Whip[9]: Supposing 8r3c1 would causes 9 to disappear in Column 8 => r3c1<>8
8r3c1 - r1c2(8=5) - r2c2(5=9) - 9c1(r2=r5) - 3c1(r5=r6) - 8b4(p7=p9) - r6c7(8=4) - r3c7(4=9) - 9c5(r3=r7) - 9c8(r7=.)
Whip[10]: Supposing 5r3c1 would causes 5 to disappear in Box 7 => r3c1<>5
5r3c1 - r1c2(5=8) - r2c2(8=9) - 9r4(c2=c9) - 9r9(c9=c6) - 9r1(c6=c7) - r3c8(9=4) - r3c7(4=8) - r3c4(8=7) - 7r9(c4=c2) - 5b7(p8=.)
Locked Candidates 2 (Claiming): 5 in c1 => r9c2<>5
Grouped Discontinuous Nice Loop: 6r789c2 = (6-9)r4c2 = r2c2 - (9=6)r3c1 - r8c1 = 6r789c2 => r4c2,r8c1<>6
Grouped AIC Type 1: 8r3c45 = (8-4)r3c7 = (4-5)r3c8 = r3c4 - r1c4 = (5-8)r1c2 = 8r2c12 => r2c4<>8
Whip[8]: Supposing 9r3c8 will result in all candidates in cell r3c7 being impossible => r3c8<>9
9r3c8 - r3c1(9=6) - r3c3(6=7) - r3c5(7=8) - 8c4(r1=r7) - 8c3(r7=r6) - r6c1(8=3) - r6c7(3=4) - r3c7(4=.)
Whip[10]: Supposing 9r3c7 would causes 9 to disappear in Row 1 => r3c7<>9
9r3c7 - r3c1(9=6) - r3c3(6=7) - r3c5(7=8) - 8c4(r1=r7) - 8c3(r7=r6) - r6c1(8=3) - r5c1(3=9) - 9r4(c2=c9) - 9r9(c9=c6) - 9r1(c6=.)
Whip[8]: Supposing 2r8c5 would causes 4 to disappear in Box 3 => r8c5<>2
2r8c5 - r8c7(2=4) - r3c7(4=8) - 8c5(r3=r7) - 8c3(r7=r6) - 8r5(c1=c9) - 7c9(r5=r6) - 4r6(c9=c8) - 4b3(p8=.)
Whip[9]: Supposing 8r1c9 will result in all candidates in cell r3c7 being impossible => r1c9<>8
8r1c9 - r1c2(8=5) - r1c4(5=3) - 3r2(c5=c9) - 3r4(c9=c5) - 1c5(r4=r2) - r1c6(1=9) - r1c7(9=2) - r8c7(2=4) - r3c7(4=.)
Whip[9]: Supposing 3r1c4 would causes 9 to disappear in Box 8 => r1c4<>3
3r1c4 - 3r2(c5=c9) - 3r4(c9=c5) - 1r4(c5=c8) - 1r6(c8=c6) - r1c6(1=9) - r1c9(9=2) - 2r4(c9=c4) - 2c5(r5=r7) - 9b8(p2=.)
Naked Pair: in r1c2,r1c4 => r1c7<>8,
Grouped AIC Type 1: 5r2c8 = (5-4)r3c8 = (4-8)r3c7 = r3c45 - (8=5)r1c4 => r2c4<>5
Whip[8]: Supposing 9r2c8 would causes 5 to disappear in Box 3 => r2c8<>9
9r2c8 - 9c7(r1=r5) - 9c1(r5=r3) - 6r3(c1=c3) - r4c3(6=4) - r6c3(4=8) - 8c7(r6=r3) - 4r3(c7=c8) - 5b3(p8=.)
Locked Candidates 1 (Pointing): 9 in b3 => r1c6<>9
Locked Candidates 1 (Pointing): 9 in b2 => r7c5<>9
Grouped AIC Type 2: 4r3c8 = (4-8)r3c7 = (8-3)r2c9 = r2c45 - (3=1)r1c6 - r6c6 = 1r6c8 => r6c8<>4
Whip[4]: Supposing 2r2c1 will result in all candidates in cell r2c3 being impossible => r2c1<>2
2r2c1 - r1c3(2=1) - r1c6(1=3) - r2c4(3=7) - r2c3(7=.)
Locked Candidates 2 (Claiming): 2 in c1 => r7c3<>2
Whip[7]: Supposing 6r4c9 would causes 6 to disappear in Box 9 => r4c9<>6
6r4c9 - r6c8(6=1) - 1c6(r6=r1) - 1c5(r2=r4) - 3r4(c5=c4) - 3c6(r6=r7) - 9r7(c6=c8) - 6b9(p2=.)
Whip[8]: Supposing 2r9c9 would causes 9 to disappear in Box 9 => r9c9<>2
2r9c9 - r8c7(2=4) - r3c7(4=8) - r2c9(8=3) - 3r1(c7=c6) - r2c4(3=7) - r9c4(7=6) - r7c6(6=9) - 9b9(p2=.)
Whip[7]: Supposing 8r8c2 would causes 9 to disappear in Row 9 => r8c2<>8
8r8c2 - r1c2(8=5) - r2c2(5=9) - 9r4(c2=c9) - r9c9(9=6) - 6r8(c9=c6) - 5c6(r8=r9) - 9r9(c6=.)
Whip[8]: Supposing 2r1c7 will result in all candidates in cell r1c3 being impossible => r1c7<>2
2r1c7 - 9r1(c7=c9) - 9b9(p9=p2) - 9c6(r7=r9) - 5r9(c6=c1) - 2r9(c1=c4) - 2r7(c5=c1) - 1r7(c1=c3) - r1c3(1=.)
Grouped AIC Type 1: (2=4)r8c7 - r3c7 = (4-5)r3c8 = (5-2)r2c8 = 2r12c9 => r8c9<>2
Whip[8]: Supposing 8r2c1 would causes 5 to disappear in Box 8 => r2c1<>8
8r2c1 - r1c2(8=5) - r2c2(5=9) - 9r4(c2=c9) - 9r9(c9=c6) - 9r7(c6=c8) - 2b9(p2=p4) - r8c1(2=5) - 5b8(p6=.)
Locked Candidates 1 (Pointing): 8 in b1 => r7c2<>8
Locked Triple: in r7c2,r8c2,r9c2 => r7c3<>4,r4c2<>4,
Naked Single: r4c2=9
Whip[5]: Supposing 8r7c5 will result in all candidates in cell r8c5 being impossible => r7c5<>8
8r7c5 - r7c3(8=1) - 1c1(r7=r2) - 9r2(c1=c5) - r3c5(9=7) - r8c5(7=.)
AIC Type 2: (3=2)r7c5 - r9c4 = (2-5)r9c1 = (5-9)r9c6 = 9r7c6 => r7c6<>3
Swordfish:3r247\c459  => r5c59,r1c9<>3
XY-Chain: (4=5)r3c8 - (5=2)r2c8 - (2=9)r1c9 - (9=6)r9c9 - (6=4)r8c9 => r7c8<>4
Hidden Single: 4 in r7 => r7c2=4
XY-Chain: (7=6)r9c2 - (6=9)r9c9 - (9=2)r1c9 - (2=1)r1c3 - (1=3)r1c6 - (3=7)r2c4 => r9c4<>7
Locked Candidates 2 (Claiming): 7 in c4 => r2c5<>7,r3c5<>7
XY-Chain: (3=2)r7c5 - (2=6)r9c4 - (6=9)r9c9 - (9=2)r1c9 - (2=1)r1c3 - (1=3)r1c6 => r2c5<>3
Naked Pair: in r2c1,r2c5 => r2c3<>1,
XY-Cycle: (2=7)r2c3 - (7=6)r3c3 - (6=9)r3c1 - (9=8)r3c5 - (8=4)r3c7 - (4=5)r3c8 - (5=2)r2c8 => r2c9<>2,r3c4<>8
X-Chain: 8r6c3 = r7c3 - r7c4 = r1c4 - r3c5 = 8r3c7 => r6c7<>8
XY-Chain: (8=5)r1c4 - (5=7)r3c4 - (7=3)r2c4 - (3=8)r2c9 - (8=4)r3c7 - (4=3)r6c7 - (3=9)r1c7 - (9=2)r1c9 - (2=5)r2c8 - (5=8)r2c2 => r1c2<>8
Hidden Single: 8 in r1 => r1c4=8
Hidden Single: 5 in r1 => r1c2=5
Hidden Single: 5 in r2 => r2c8=5
Hidden Single: 2 in r2 => r2c3=2
Hidden Single: 2 in r1 => r1c9=2
Hidden Single: 9 in r1 => r1c7=9
Hidden Single: 3 in r1 => r1c6=3
Full House: r1c3=1
Hidden Single: 1 in r2 => r2c5=1
Hidden Single: 3 in r2 => r2c9=3
Hidden Single: 7 in r2 => r2c4=7
Hidden Single: 8 in r2 => r2c2=8
Full House: r2c1=9
Hidden Single: 5 in r3 => r3c4=5
Full House: r3c5=9
Hidden Single: 7 in r3 => r3c3=7
Full House: r3c1=6
Hidden Single: 8 in r3 => r3c7=8
Full House: r3c8=4
Hidden Single: 1 in r4 => r4c8=1
Hidden Single: 1 in r6 => r6c6=1
Hidden Single: 7 in r6 => r6c9=7
Hidden Single: 1 in r7 => r7c1=1
Hidden Single: 8 in r7 => r7c3=8
Hidden Single: 8 in r6 => r6c1=8
Hidden Single: 8 in r5 => r5c9=8
Hidden Single: 9 in r5 => r5c8=9
Hidden Single: 6 in r5 => r5c6=6
Hidden Single: 6 in r4 => r4c3=6
Full House: r6c3=4
Full House: r5c1=3
Hidden Single: 4 in r4 => r4c9=4
Hidden Single: 7 in r5 => r5c5=7
Full House: r5c7=2
Hidden Single: 3 in r6 => r6c7=3
Full House: r6c8=6
Full House: r8c7=4
Full House: r7c8=2
Hidden Single: 6 in r7 => r7c4=6
Hidden Single: 3 in r7 => r7c5=3
Full House: r7c6=9
Hidden Single: 3 in r4 => r4c4=3
Full House: r4c5=2
Full House: r9c4=2
Full House: r8c5=8
Hidden Single: 2 in r8 => r8c1=2
Full House: r9c1=5
Hidden Single: 5 in r8 => r8c6=5
Full House: r9c6=7
Hidden Single: 7 in r8 => r8c2=7
Full House: r8c9=6
Full House: r9c2=6
Full House: r9c9=9

But,wow ,Seriously slow down the puzzle solving speed, taking 57 seconds (T6500 2.1GHZ, A 13 year old CPU),
If you use techniques first but search for the shortest chain, it will take 9 seconds,
and if you use techniques first and the chain length is not limited, it will take 1.4 seconds.
This shows that g-whip is much more time-consuming than whip.
yzfwsf
 
Posts: 844
Joined: 16 April 2019

Re: g-whips and g-braids

Postby denis_berthier » Wed Aug 03, 2022 4:03 am

yzfwsf wrote:If I also adopt the length first strategy, I will get the following solution path.
But,wow ,Seriously slow down the puzzle solving speed, taking 57 seconds (T6500 2.1GHZ, A 13 year old CPU),
If you use techniques first but search for the shortest chain, it will take 9 seconds,
and if you use techniques first and the chain length is not limited, it will take 1.4 seconds.
This shows that g-whip is much more time-consuming than whip.

If you adopt DFS, you'll get a solution in milliseconds.
g-whips are slower than whips because there are many more rlcs to consider at each extension step. The counterpart is, they can solve more puzzles.
As for the solving strategies, all depends on one's purposes. "Techniques-first" doesn't make much sense to me, except in some particular cases. BTW, I have implemented this partly in CSP-Rules, with function solve-w-preferences; if I extended this function, it could be used to implement a full techniques-first strategy; but I don't see the point.

That being said, congrats for your speed times - in all the cases.
For the simplest-first strategy, it's about 6 times faster than SudoRules on a similar machine (which is not surprising, considering that CSP-Rules is built on an inference engine and is therefore partly interpreted). As far as I can remember, it's about the same speed gain as Paul Isaacson's solver (in C++, If I remember well).
Anyway, don't worry too much about speed. Nobody cares to wait 1 minute or more for the solution of such a difficult puzzle.

Note that Mauricio had a still faster (also simplest-first) solver based on dancing links but, unfortunately, it seems nobody has kept a copy of it and Mauricio doesn't answer any PM. At that time, I wasn't very interested, because it lacked any possibility of mixing various techniques: il was only whips, or only braids, or only g-whips or only g-braids (I'm not even sure the last one worked).
denis_berthier
2010 Supporter
 
Posts: 3967
Joined: 19 June 2007
Location: Paris

Re: g-whips and g-braids

Postby Mauricio » Wed Aug 03, 2022 3:47 pm

Hello to all again

It seems that my implementation of whips and braids in javascript is required, I have uploaded it again at https://whips.webcindario.com/.

It is the same version that I made several years ago, it uses a different notation that the one suggested by Denis, sorry, in my opinion is still understandable. I believe it is bugged somewhere, but now I do not have the time or knowledge to correct it; be aware that I never got to prove that the implementation of whips works, since I did not understand why it works, but it seems to work, it was only a modification of the implementation of braids.

The implementation of braids may be bugged, since for some puzzles, its g-braid rating is bigger that its braid rating, and that is something I believe should not be possible.
Mauricio
 
Posts: 1175
Joined: 22 March 2006

Re: g-whips and g-braids

Postby m_b_metcalf » Wed Aug 03, 2022 8:24 pm

Mauricio wrote:Hello to all again

After seven years: welcome back!
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13577
Joined: 15 May 2006
Location: Berlin

Re: g-whips and g-braids

Postby yzfwsf » Wed Aug 03, 2022 8:58 pm

Mauricio wrote:I just learned a bit of javascript and decided to translate my C code for whips, here is the result

....................................Deleted.....................................

The puzzle has to be a string of length 81, with 0 as nongivens.

Comments are welcome.

Edit: Just checked and it works in Firefox 12(Windows), Chrome 21 (Windows), Safari 5.1.7 (Windows) but not in IE 9.
Last edited by Mauricio on Tue Jun 21, 2022 12:55 pm, edited 2 times in total.

Maybe he's been here all along. :)
yzfwsf
 
Posts: 844
Joined: 16 April 2019

Re: g-whips and g-braids

Postby yzfwsf » Thu Aug 04, 2022 12:42 am

Hi denis_berthier:
Can you test this puzzle?My need to use large memory mode.Can you test this puzzle? My solver needs to use large memory mode. Means the total nodes are more than 20000.
Code: Select all
.6.7..3.......5..98...3..1..3.8..4....4..1..79..5...2..4...72..2..9.......8.5..6.


btw:
yzfwsf wrote:Seriously slow down the puzzle solving speed, taking 57 seconds (T6500 2.1GHZ, A 13 year old CPU)
Now,6.2 seconds.
yzfwsf
 
Posts: 844
Joined: 16 April 2019

PreviousNext

Return to Advanced solving techniques