Each pattern is a type, followed by a colon, followed by six slices, followed by an optional weight (the weight parameter is used only for certain types of patterns).
pattern = type : slice; slice; slice; slice; slice; slice; weight
The six slices form a fan around the center cell. If the pattern is rotated 60 degrees, the first slice will map onto the second slice, the second onto the third, etc. This allows the patterns to be easily rotated on the hex board.
Each slice extends out by MAX_EXTENSION cells. If MAX_EXTENSION=7, then the slices would be laid out like this:
| | slice 1 27 slice 2 | 20 26 | 14 19 25 | 9 13 18 24 | 5 8 12 17 23 <-- slice 0 2 4 7 11 16 22 21 15 10 6 3 1 0 * 0 1 3 6 10 15 21 22 16 11 7 4 2 slice 3 --> 23 17 12 8 5 | 24 18 13 9 | 25 19 14 | slice 5 26 20 | 27 slice 4 | |
Each slice is composed of five comma separated features.
slice = feature, feature, feature, feature, feature
Each feature is a 32-bit integer used as a bitmask where the set bits denote cells int which that feature is "on".
All features must be a subset of CELLS. BLACK, WHITE, MARKED1 and MARKED2 must all be pairwise disjoint.
For example, let s be a slice in which CELLS=7, BLACK=4, WHITE=1, MARKED1=0, and MARKED2=0. Then this slice uses cells 0, 1 and 2; cell 0 contains a white stone, cell 1 is empty, and cell 2 contains a black stone.