Details
A mask is a rectangular array containing only zeroes and ones.
A template is a rectangular array containing non-negative integers or
Blank (_) values.
A complete set of binary templates follows from a mask by turning 0's into blanks, 1's into independent slots, and then filling the slots with 1's and 0's in all possible ways.
Similarly, a complete set of c-color templates follows by filling the mask slots with all possible Tuples of the numbers 0,1, …, c-1, where of course c is a positive integer.
A template is mask-consistent if it belongs to the complete c-color set derived from mask.
Sets of potentially many templates should have the same bounding size, say {a,b}, and they certainly do if derived from a single mask of bounding size {a,b}.
A tiling pattern is any rectangular array of non-negative integers.
If all {a,b} subarrays of an {m,n} pattern match a template from input templates, the tiling pattern is said to be "consistent with local constraints listed in templates", or for short, "template consistent".
By "minimal" we mean that any found subset of templates can not be reduced by removing a single templates without making it impossible to form a tiling pattern of size s.
There are two methods to search for minimal sets. One is to start with cardinality n subsets and, for positive results, check reducibility to cardinality n-1 subsets. The other is to perform a breadth-first search of increasingly large subsets up to n cardinality. This resource switches between methods automatically according to coverage.