Bram28 / LEGUP

Logic Engine for Grid-Using Puzzles - a better way to learn formal logic
GNU Affero General Public License v3.0
2 stars 8 forks source link

Nurikabe: Fill in Black and Fill in White #61

Closed Bram28 closed 9 years ago

Bram28 commented 9 years ago

Here are two enhancements:

  1. The currently existing Fill in Black rule only works for a single black cell being surrounded by blacks (or edges). However, it would be good to extend this rule so it works for larger regions as well. That is, the rule can become: If some region of blanks is surrounded by all blacks and edges, and there are no white cells in that regions, then the whole region should be made black (see nurikabefillinblack proof for an example; I would like the last step to check out ok as well). And yes, I know: when you are dealing with such larger regions, the result will have to contain a 2*2 region and hence a contradiction, but it is not obvious until you actually fill them in, and you can't do that with the existing rule, and without it, you'd have to go through at least one application of a case rule, which is annoying.
  2. We should also have a Fill in White rule (many rules in Nurikabe come in pairs like that): if a bunch of cells are surrounded by all white cells (or edges), then that region should be all white (see nurikabefillinwhite proof for an example; again, I would like the last step to check out, using a Fill in White rule)... as long as there is at least one black cell outside of that white enclosure (because it is possible, though extremely unlikely, to have a Nurikabe puzzle with all white along the edge)
saltzl commented 9 years ago

My mistake, I closed the wrong issue

Bram28 commented 9 years ago

Sam: Please change it such that the user is not required to fill in all blacks of the isolated region; if the user fills in only some of them, it should still check out ok.