4 ms·
This is an ideal problem for constraint solving. If there is one thing constraint solving does well it is make NP-Hard problems more manageable. I wrote up a qu
by barristan 14y ago
This is an ideal problem for constraint solving. If there is one thing constraint solving does well it is make NP-Hard problems more manageable. I wrote up a quick solution to the first puzzle in sabr (1), you can see what the puzzle result looks like here (2). The key insight is: "each color must be surrounded by exactly two of its color, unless it is on an end, in which case it is surrounded by exactly one" after that it's just a matter of coding it up. It's not much extra work to go from here to a generator, which I may make later if I have time. Cool puzzle game, I like it ;D.
1) https://github.com/dbunker/SABR/blob/master/module/other-test/general/Adrift/adrift.tb https://github.com/dbunker/SABR/blob/master/module/other-tes...
2) https://github.com/dbunker/SABR/blob/master/module/other-test/general/Adrift/adrift-expected.txt https://github.com/dbunker/SABR/blob/master/module/other-tes...