RSW wrote:Yes, I'd realized this problem almost as soon as I implemented the colouring scheme. A possible solution to the ambiguity is that when a candidate is eliminated from a cell due to a particular technique, then a colour could be assigned on a priority basis. When the cell is completely solved, then the colour associated with the technique having the highest difficulty level could be used. Or, I may abandon the colours altogether.
I wouldn't abandon them altogether. With some tweaking your approach would work as a nice visual aid to analyze a solved puzzle afterwards. When used like that the colors could be associated with the eliminated candidates directly, and the above-mentioned problem would be avoided. I'd actually like such a feature giving an idea of how difficult each elimination was and marking the bottlenecks of the puzzle. Such a coloring scheme would work well with your candidate circles which, by the way, can also be used to encode lots of more useful information (like I do when solving harder puzzles on p&p).
So, I think it could be a nice post-game analysis tool. However, while still solving it's more important to have visual aids that help the player advance the puzzle, and I don't think this one does (plus it disrupts other coloring methods that do). While the game is on, I wouldn't waste valuable grid real-estate for something that doesn't directly help the player. Of course it could be an optionally selectable view, but as the default view it seems less useful and possibly confusing.
It depends a lot on how easy it is to implement. I prefer to focus on the basics first, but if I happen to think of an easy way to implement a more advanced technique, then I'll go ahead and do it. Since computers do things differently than humans, some techniques that are difficult for a human to grasp, may have a simple mathematical or logical basis that is easy to code into a program, and vice versa.
Of course. There lies a potential conflict, however. If you want your program to help a human player learn advanced techniques, you should concentrate on techniques that are humanly applicable (or preferable) and visual aids that help with them. That's a very different (and probably harder) problem than writing a program that solves a puzzle as efficiently as possible on its own. It seems to me that your approach is still a bit ambivalent about which way it's leaning, but I could be wrong.
Like you, I don't like having to resort to techniques that lean towards T&E. I'd rather stick with purely logical techniques.
Strictly speaking, T&E
is a purely logical technique (especially if no T&S steps are accepted). It's just not very elegant or fun, or even efficient when recognizable solving patterns are around. A more valid comparison can be made between T&E and pattern-based techniques, but even they are just two sides of the same coin. The distinctive difference between them is that T&E starts with an assumption, and the only thing that can be concluded is the validity of that assumption (best case is a contradiction that proves the assumption false; other cases are worthless unless T&S is accepted). On the other hand, (most) patterns prove something about external candidates and depend on no assumptions (the pattern and its logic is valid even if there's nothing to eliminate). Every pattern-based elimination can be achieved with T&E, however, and it's also a simple way to double-check them (just assume the to-be-eliminated candidate ON and see if you get a contradiction). To me APE seems more like a multi-case T&E procedure than a pattern-based technique.
Last night, while ruminating on what to implement next, I thought of a straightforward way to do XYZ-wings. So, that's probably now at the top of the priority list.
The ease of implementing is a valid way to prioritize; nothing wrong with that strategy. However, I'd probably go with something else if the priority is to implement techniques that have the most solving potential and/or are easiest for human players. XYZ-Wing is one of the rarest techniques I've used in manual solving, and even then it's rarely effective. You'd probably get more bang for the buck with several other simple patterns that are more common, easier to spot, and usually more effective.
Generally speaking, instead of coding a zillion named patterns as separate entities I'd probably figure out a way to implement generic AICs as soon as possible, because almost all of those patterns are short AICs anyway (including XYZ-Wings, just with an ALS twist). Once that's working, then the special cases can be associated with their common pattern names without coding each one separately. That was my approach for manual solving too.
If individual patterns are prioritized, the top three (+1) of my list would probably be:
- UR Type 1 (very common and often easiest to spot, even without candidates; Types 2 and 4 also easy)
- X-Wing (very common and easy to spot, even without candidates)
- Skyscraper (very common, and easy to learn after X-Wing; seems to be the king of Turbot Fishes)
- BUG+1 (not that common, but a trivial way to solve a puzzle when available)
In my experience, those simple techniques alone solve most of the easiest non-basic puzzles. After that it's more of a matter of taste what comes next.