Problem 3042. Fill-a-pix - Solution Checker
Fill-a-pix is a logic puzzle game similar to Pic-a-Pix (aka Logic art) and Minesweeper. An example starting board is shown below on the left with the completed board shown to its right. Each number in the board indicates how many surrounding cells, including itself, are to be filled in. There are (up to) nine total cells associated with each number: four immediately adjacent (up, down, left, and right), four diagonally adjacent (one touching each corner), and the central cell (where the number is located).
Based on this logic, all 0's and 9's are determinant, as all nine cells are either empty or filled, respectively, for these numbers. Also, all 6's on the board edges and 4's in the corners should be completely filled in, as they only involve 6 or 4 cells, respectively.


For this problem, you will be provided with various boards and solutions to each board. Write a function to determine if the solution is correct for the given board. The board will be filled with NaN's where there are no number clues; these cells should not be checked. The solution board will be filled with 1's (filled) and 0's (empty).
A related problem is Fill-a-pix - Solver (basic).
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Indexing IV
- 15 Problems
- 28 Finishers
- Hard limit function
- How to reverse spdiags?
- Combine Data With Gaps
- Sum My Indices
- Longest Sequence of NaNs
- Find the same and successive values in a vector
- Pancake sorting - minimum flips.
- Elements with highest local average
- Neither minima nor maxima
- How to reverse spdiags?
- Find indices of diagonal elements
- Find Elements in Range
- Find the same and successive values in a vector
- Find the distance between runs
- Split array into pieces according to corresponding array
- How close to a hole
- Pancake sorting
- Pancake sorting - minimum flips.
- Combine Data With Gaps
- Sum My Indices
- Longest Sequence of NaNs
Problem Recent Solvers20
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!