Problem 3043. Fill-a-pix - Solver (basic)
Nan or -1 (test 5) for non clue cells ?
Thanks for the catch. I've updated that test case.
Now, the biggie. Implement a solver for advanced FAP. I never managed to create one that worked on all problems.
I was working on it last night, but it's tabled for now. I can't quite figure out how to solve the advanced logic portion that propagates along adjacent clues (including diagonal) to solve cells outside of that clue's reach.
Good problem but too difficult for a first contact. Maybe a first basic problem with small boards and/or clear cues (0/9). And after only, a more difficult one.
If anyone is interested more in these games, I've made quite a few of them on Sporcle.com. for the first of four Fill-a-pix (aka, mosaic logic puzzle) playlists.
I wouldn't call this problem basic since it is very similar to solving a nonogram, which is np-hard, but it is possible to solve this problem in this current instance with logical thinking only. With more complex boards of this game, it is not enough because it would have more than one possible solution or no solution.
@Rafael S.T. Vieira: while you are correct (along with Jean-Marie) in stating that the problem is not easy, the "basic" indicates, as you rightly mention, that simple logic applied to surrounding cells is all that is needed to solve this sort of puzzle. Of course, there are more complex boards wherein the "basic" logic is insufficient to completely solve them.
It appears that the link I supplied earlier was lost. Here it is again:
Problem Recent Solvers9
Back to basics 6 - Column Vector
Sum the numbers on the main diagonal
More from this Author139
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!