.
Hi gifmenger
welcome on this forum.
Thermometers are a very bad visual representation of inequality constraints.
A much simpler way to see a thermometer is merely as a set of inequalities between adjacent cells [unless you mean they increase by 1 only?????).
As a result, the game is Futoshiki + block constraints (and this thread should better be in the "other logic games" section.
My Futoshiki solver (a part of my general CSP solver CSP-Rules) doesn't have a variant with block constraints (which could be called Sudoshiki), but I tried it on this puzzle.
asc-chains correspond to the thermometers (except that they can bend)
hills and valleys correspond to taking into account two thermometers meeting at some point.
Both are build automatically (and trivially) from the inequalities.
(solve 9
"................................................................................."
"------<<-->>>>----->><<<<<---->>---->><<-----<<->>--->>---->>->>>>--<<--"
"->>------->><<>>----->>--->>><<->>->>>-->>->>---------<<->>>----->>-----"
)
***********************************************************************************************
*** FutoRules 2.1.s based on CSP-Rules 2.1.s, config = W+S
*** Using CLIPS 6.32-r813
*** Running on MacBookPro Retina Mid-2012 i7 2.7GHz, 16GB 1600MHz DDR3, MacOS 10.15.7
*** Download from:
https://github.com/denis-berthier/CSP-Rules-V2.1***********************************************************************************************
asc[2]: r4c9<r3c9<r2c9 ==> r4c9≠9, r4c9≠8, r3c9≠9, r3c9≠1, r2c9≠2, r2c9≠1
asc[2]: r6c6<r5c6<r4c6 ==> r6c6≠9, r6c6≠8, r5c6≠9, r5c6≠1, r4c6≠2, r4c6≠1
asc[3]: r6c6<r5c6<r5c5<r4c5 ==> r6c6≠7, r5c6≠8, r5c5≠9, r5c5≠2, r5c5≠1, r4c5≠3, r4c5≠2, r4c5≠1
asc[2]: r3c6<r2c6<r1c6 ==> r3c6≠9, r3c6≠8, r2c6≠9, r2c6≠1, r1c6≠2, r1c6≠1
asc[3]: r3c6<r2c6<r2c5<r1c5 ==> r3c6≠7, r2c6≠8, r2c5≠9, r2c5≠2, r2c5≠1, r1c5≠3, r1c5≠2, r1c5≠1
asc[4]: r3c6<r2c6<r2c5<r2c4<r2c3 ==> r3c6≠6, r2c6≠7, r2c5≠8, r2c4≠9, r2c4≠3, r2c4≠2, r2c4≠1, r2c3≠4, r2c3≠3, r2c3≠2, r2c3≠1
asc[3]: r7c5<r6c5<r5c5<r4c5 ==> r7c5≠9, r7c5≠8, r7c5≠7, r6c5≠9, r6c5≠8, r6c5≠1
asc[2]: r6c4<r7c4<r8c4 ==> r8c4≠2, r8c4≠1, r7c4≠9, r7c4≠1, r6c4≠9, r6c4≠8
asc[3]: r6c4<r5c4<r4c4<r3c4 ==> r6c4≠7, r5c4≠9, r5c4≠8, r5c4≠1, r4c4≠9, r4c4≠2, r4c4≠1, r3c4≠3, r3c4≠2, r3c4≠1
asc[2]: r8c3<r7c3<r6c3 ==> r8c3≠9, r8c3≠8, r7c3≠9, r7c3≠1, r6c3≠2, r6c3≠1
asc[3]: r8c3<r7c3<r7c2<r7c1 ==> r8c3≠7, r7c3≠8, r7c2≠9, r7c2≠2, r7c2≠1, r7c1≠3, r7c1≠2, r7c1≠1
asc[3]: r5c2<r6c2<r7c2<r7c1 ==> r6c2≠9, r6c2≠8, r6c2≠1, r5c2≠9, r5c2≠8, r5c2≠7
asc[2]: r5c2<r4c2<r3c2 ==> r4c2≠9, r4c2≠1, r3c2≠2, r3c2≠1
asc[2]: r5c2<r4c2<r4c3 ==> r4c3≠2, r4c3≠1
asc[2]: r4c1<r3c1<r2c1 ==> r4c1≠9, r4c1≠8, r3c1≠9, r3c1≠1, r2c1≠2, r2c1≠1
asc[2]: r9c5<r9c6<r9c7 ==> r9c7≠2, r9c7≠1, r9c6≠9, r9c6≠1, r9c5≠9, r9c5≠8
asc[4]: r9c3<r9c2<r8c2<r7c2<r7c1 ==> r9c3≠9, r9c3≠8, r9c3≠7, r9c3≠6, r9c2≠9, r9c2≠8, r9c2≠7, r9c2≠1, r8c2≠9, r8c2≠8, r8c2≠2, r8c2≠1, r7c2≠3, r7c1≠4
asc[2]: r9c3<r9c2<r9c1 ==> r9c1≠2, r9c1≠1
asc[3]: r8c9<r8c8<r8c7<r9c7 ==> r9c7≠3, r8c9≠9, r8c9≠8, r8c9≠7, r8c8≠9, r8c8≠8, r8c8≠1, r8c7≠9, r8c7≠2, r8c7≠1
asc[2]: r8c6<r8c5<r8c4 ==> r8c6≠9, r8c6≠8, r8c5≠9, r8c5≠1
asc[3]: r7c8<r7c7<r8c7<r9c7 ==> r7c8≠9, r7c8≠8, r7c8≠7, r7c7≠9, r7c7≠8, r7c7≠1
asc[2]: r7c8<r7c7<r7c6 ==> r7c6≠2, r7c6≠1
asc[2]: r6c6<r6c7<r6c8 ==> r6c8≠2, r6c8≠1, r6c7≠9, r6c7≠1
asc[4]: r5c7<r5c8<r4c8<r3c8<r2c8 ==> r5c8≠9, r5c8≠8, r5c8≠7, r5c8≠1, r5c7≠9, r5c7≠8, r5c7≠7, r5c7≠6, r4c8≠9, r4c8≠8, r4c8≠2, r4c8≠1, r3c8≠9, r3c8≠3, r3c8≠2, r3c8≠1, r2c8≠4, r2c8≠3, r2c8≠2, r2c8≠1
asc[5]: r5c7<r5c8<r4c8<r3c8<r3c9<r2c9 ==> r5c8≠6, r5c7≠5, r4c8≠7, r3c9≠4, r3c9≠3, r3c9≠2, r3c8≠8, r2c9≠5, r2c9≠4, r2c9≠3
asc[3]: r5c7<r5c8<r4c8<r4c7 ==> r4c7≠3, r4c7≠2, r4c7≠1
asc[2]: r5c7<r5c8<r5c9 ==> r5c9≠2, r5c9≠1
asc[3]: r4c9<r4c8<r3c8<r2c8 ==> r4c9≠7
asc[4]: r4c9<r4c8<r3c8<r3c9<r2c9 ==> r4c9≠6
asc[3]: r3c6<r3c7<r3c8<r2c8 ==> r3c7≠9, r3c7≠8, r3c7≠1
asc[4]: r3c6<r3c7<r3c8<r3c9<r2c9 ==> r3c7≠7
asc[3]: r3c6<r3c5<r2c5<r1c5 ==> r3c5≠9, r3c5≠8, r3c5≠1
asc[4]: r3c6<r3c5<r2c5<r2c4<r2c3 ==> r3c5≠7
asc[2]: r2c7<r2c6<r1c6 ==> r2c7≠9, r2c7≠8
asc[3]: r2c7<r2c6<r2c5<r1c5 ==> r2c7≠7
asc[4]: r2c7<r2c6<r2c5<r2c4<r2c3 ==> r2c7≠6
asc[2]: r1c7<r1c8<r1c9 ==> r1c9≠2, r1c9≠1, r1c8≠9, r1c8≠1, r1c7≠9, r1c7≠8
valley[5]: r3c4>r4c4>r5c4>r6c4<r7c4<r8c4 ==> r6c4≠6, r6c4≠5
hill[4]: r5c2<r6c2<r7c2>r8c2>r9c2 ==> r7c2≠4
str-asc[1]: r7c2<r7c1 ==> r7c1≠5
valley[4]: r3c2>r4c2>r5c2<r6c2<r7c2 ==> r5c2≠6
valley[5]: r3c4>r3c5>r3c6<r3c7<r3c8<r3c9 ==> r3c6≠5
- Code: Select all
Resolution state after Singles and whips[1]:
123456789 123456789 123456789 123456789 456789 3456789 1234567 2345678 3456789
3456789 123456789 56789 45678 34567 23456 12345 56789 6789
2345678 3456789 123456789 456789 23456 1234 23456 4567 5678
1234567 2345678 3456789 345678 456789 3456789 456789 3456 12345
123456789 12345 123456789 234567 345678 234567 1234 2345 3456789
123456789 234567 3456789 1234 234567 123456 2345678 3456789 123456789
6789 5678 234567 2345678 123456 3456789 234567 123456 123456789
123456789 34567 123456 3456789 2345678 1234567 345678 234567 123456
3456789 23456 12345 123456789 1234567 2345678 456789 123456789 123456789
521 candidates, 4695 csp-links and 7494 links. Density = 5.53%
x-wing-in-columns: n1{c5 c8}{r7 r9} ==> r9c9≠1, r9c4≠1, r9c3≠1, r7c9≠1
str-asc[1]: r9c3<r9c2 ==> r9c2≠2
str-asc[1]: r9c2<r9c1 ==> r9c1≠3
str-asc[1]: r9c2<r8c2 ==> r8c2≠3
whip[2]: r2n1{c7 c2} - r2n2{c2 .} ==> r2c7≠3, r2c7≠4, r2c7≠5
whip[2]: r4n1{c1 c9} - r4n2{c9 .} ==> r4c1≠3, r4c1≠4, r4c1≠5, r4c1≠6, r4c1≠7
whip[4]: r8c7{n8 n3} - r7c7{n7 n2} - r5c7{n2 n1} - r2c7{n1 .} ==> r9c7≠4
whip[4]: r2c5{n6 n7} - r2c4{n7 n8} - r2c9{n8 n9} - r2c3{n9 .} ==> r2c6≠6
g-whip[5]: c4n1{r6 r1} - c4n2{r1 r9} - r7c4{n2 n4+} - c4n3{r7 r4} - r5c4{n3 .} ==> r6c4≠4
whip[3]: r6c7{n8 n2} - r6c6{n6 n1} - r6c4{n1 .} ==> r6c8≠3
whip[7]: r3n1{c6 c3} - r3n2{c3 c1} - r3n3{c1 c2} - r4c2{n8 n2} - r5c2{n5 n1} - r2n1{c2 c7} - r2n2{c7 .} ==> r3c6≠4
whip[3]: r5c6{n7 n2} - r6c6{n6 n1} - r3c6{n1 .} ==> r4c6≠3
g-whip[7]: c7n9{r9 r4} - c7n8{r4 r6} - r8c7{n8 n6-} - c7n7{r8 r1} - r1c8{n6 n8} - r1c9{n7 n9} - c5n9{r1 .} ==> r9c7≠6
g-whip[7]: c7n9{r9 r4} - c7n8{r4 r6} - r8c7{n8 n5-} - c7n7{r8 r1} - r1c8{n6 n8} - r1c9{n7 n9} - c5n9{r1 .} ==> r9c7≠5
g-whip[11]: r7c7{n7 n2} - r2c7{n2 n1} - r5c7{n1 n4} - r5c8{n3 n5} - r4c8{n5 n6} - r3c8{n6 n7} - r3c9{n6 n8} - r2c9{n8 n9} - r2c8{n9 n8} - r1c8{n8 n5-} - r1c7{n7 .} ==> r8c7≠3
- Code: Select all
Final resolution state:
123456789 123456789 123456789 123456789 456789 3456789 1234567 2345678 3456789
3456789 123456789 56789 45678 34567 2345 12 56789 6789
2345678 3456789 123456789 456789 23456 123 23456 4567 5678
12 2345678 3456789 345678 456789 456789 456789 3456 12345
123456789 12345 123456789 234567 345678 234567 1234 2345 3456789
123456789 234567 3456789 123 234567 123456 2345678 456789 123456789
6789 5678 234567 2345678 123456 3456789 234567 123456 23456789
123456789 4567 123456 3456789 2345678 1234567 45678 234567 123456
456789 3456 2345 23456789 1234567 2345678 789 123456789 23456789
Without the block constraints, it doesn't give much; the eliminations done by asc-chains are trivial; I've proven in [PBCS] that they are equivalent to whips[1] (I keep them here for illustration).
But this can give you an idea of the kind of rules used.
I tried to inject the final resolution state into SudoRules (the representations are compatible) in order to take advantage of the block constraints; it allows more eliminations, but it's not enough for a solution. In this puzzle, mixing the two kinds of constraints is necessary.