Hexcells is a game based off of Minesweeper played on hexagons. (Full disclosure: I have nothing to do with Hexcells. In fact I don't really like the game.) Most of Hexcells rules can be pretty easily expressed in Generalized Minesweeper (Minesweeper played on an arbitrary graph). The one that is most difficult is the {X}
and -X-
rules.
The {X}
rule tells us that a cell borders X
mines and that all of these mines border each other in a continuous path. For example if we had the board:
? ?
? {3} ?
? ?
The 6 possibilities for mine placement would be
* . . . . . . * * * * *
* {3} . * {3} . . {3} * . {3} * . {3} * * {3} .
* . * * * * . * . . . .
Your goal is to implement the rule {3}
in generalized Minesweeper.
Specifics
Generalized Minesweeper is Minesweeper played on an arbitrary graph. The graph has two types of vertex, an "indicator" or a "value". A value can be either on or off (a mine or a dud) however its state is unknown to the player. An indicator tells the player how many adjacent vertices are on (mines) and does not count as a mine itself.
For example the following board for Generalized Minesweeper tells us that cells A and B are either both mines or neither of them are mines.
(In the diagram indicators are marked in gray while values are white)
Unlike in normal minesweeper where you click values that are off to reveal indicators, there is no such mechanic in Generalized Minesweeper. A player simply determines for what states of the graph can satisfy its indicator.
Your goal is to build a structure in Generalized Minesweeper such that there are 6 specific cells that can only have states that fulfill as if they were connected with the Hexcells rule {3}
. When you write your solution you should not have specific values in mind for value cells. (In answer to H.PWiz's question it is allowed that some value cells might be deducible from the state, but you can always improve your score by removing such cells)
Scoring
You answers will be scored by the number of vertices in the final graph minus 6 (for the 6 inputs) with a lower score being better. If two answers tie in this metric the tie breaker will be the number of edges.
Solvability
This problem is solvable, I have a solution to this problem and I will post it once this challenge is a week old.
{3}
rule" says "all of these mines border each other in a continuous path" - without edges there is no path. \$\endgroup\${3}
". They need not be connected \$\endgroup\$