I wrote some code to take a triangle graph as input and SAT-solve to output a colored subgraph. Edges may be removed by the solver, but no triangle can have more than one edge missing.
The SAT rules prevent a lot of degenerate tiles. One advanced SAT rule is that a single tile is not allowed to have "rigid lines" which don't intersect.
Is there a search technique that can explore unit graphs like the rigid edge graph above?
I have the usual rules in my searcher, and added a simple new rule:
If vertex a has 4 neighbors vertices, it cannot have rigid edges to two opposite vertices.
In the diagram above, vertex a has 4 neighbor vertices, including rigid edges to opposite neighbors b, c.
This is prohibited because the 4 neighbor vertices form a quadrilateral, and one of the "paths" along the quadrilateral from b to c will be greater in length than path along the rigid edge.
- define "fattening" to be the required curving of an edge when a tile has an edge-neighbour and a vertex-neighbour that are the same colour
- the graph of rigid EDs
(so in this case that AB,AC and the four dotted-green diagonals cannot all be rigid, but any five of those six can)
In real life this could arise if the yellow and green tiles aere orange and white respectively
and the colours that make AB,BC,CD,AD rigid are X,X,Y,Y respectively
In my rule there is no mention of fattening - we just rely on the fact that any two EDs that share a vertex will form two angles (one at least 108 degrees, one at most 180), and that in either case if there is an edge coming out of the shared vertex that is shared by the tiles that have the EDs, and if the colours of those tiles are (among) the ones that make each other's EDs rigid, we are screwed: if the angle is less than 180 then at least one of the tiles is too close to its own colour, and if it is at least 180 then at least one of the tiles is too big.
If a tile P of colour X and a tile Q of colour Y share a vertex A, and if P has another vertex B such that AB is rigid because of colour Y, and Q has another vertex C such that AC is rigid because of colour X, then P and Q cannot meet at any other vertex D, other than in the exceptional case ##EDIT## where BD and CD are both also rigid, and P and Q are not consecutive tiles at either A or D (i.e., they don't share an edge.)
This rule doesn't seem to apply here because "P has another vertex B" isn't true ??