# nurikabe / docs / Nurikabe_Strategies.txt

 ```Shlomi Fish 31629f7 2012-05-15 Shlomi Fish 11b7b75 2012-07-02 Shlomi Fish 31629f7 2012-05-15 Shlomi Fish f78ef4e 2012-06-02 Shlomi Fish 31629f7 2012-05-15 Shlomi Fish 81f89c6 2012-05-17 Shlomi Fish 910862d 2012-05-18 Shlomi Fish f78ef4e 2012-06-02 Shlomi Fish 11b7b75 2012-07-02 Shlomi Fish 967aa9d 2012-08-08 ``` ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81``` ```# vim:ft=txt #. Proximity analysis - some cells can be eliminated because they are not reachable (also consider that white cells of certain islands interfere with the extent of different islands). #. A straight row or column of black cells can be tested for black cells in its middle which will place two white cells and so one can conclude that they are white. #. If you have something like: |[B][G][B] |[G][G][B] ----------------- Then it is evident that the upper [G] (Gray/Unknown) has to be white, or else the lower [G]s will also all be black. #. Cells between two islands (either diagonally or in a one-cell vertical or horiozntal spacing) must be black, or else the two islands will be joined. #. Filling-style strategy: if past a certain geometery (that is within the limits of its number), an island can only expand into one cell, then that cell will be white. #. If an Island reaches certain points which consume all of its number, then its white edge points can be marked with black in the opposite direction to its extent. #. One cannot have a loop or a path of white cells (including diagonal ones) from one edge of the board to the other, which contains black cells inside, because this will prevent the black cells from being contiguous. - Alternative phrasing: a polymino of black cells that can only expand into a single grey cell will expand there. #. Sometimes extending an \$N -1 island to a white cell in proximity to one of its cells will cause the remaining cells to form a 4*4 black region. As a result, this white cell must be black. #. Often when there's a situation like: [W][G][G] [B][B][B] We can see that the island should expand into the leftmost gray/unknown cell or else it will need to take a costly detour which will consume the rest of its number. #. Islands that can expand in several different manners must mark all the common black cells inflected by these ways in this way. For example: +------ |[2][G] |[G][G] The lower-right [G] cell must be black because it will be black whether the 2 expands to the right or to the bottom. In addition, if we have: x1 x2 x3 x4 y1 [B][B][B] y2 [B][4][W][B] y3 [B][G][W][B] y4 [G][G][B] The the 4-cell region can only expand into (x2,y3) or (x3,y4) so [G](x2,y4) must be black. #. If marking a cell as white will make it reachable only by one island, and as a result they will form a parly-diagonal loop of white cells, which will segment the black master region, then the cell must be black. #. If we have something like: x1 x2 x3 y1 [2W][G][B] y2 [ G][G][B] The if [G](x1,y2) is white, then (x2,y1) and (x2,y2) will be black which will form a 2*2 region of black cells which is impossible. ```