Is there an easy way to "encode" problems, so that they yield a unique strings?
Patrick Traill: Herman, having edited this, I have just realised that this is your personal sub-page, so please feel free to revert / remove my contributions if they are unwanted.
|Table of contents||Table of diagrams
Position to encode
Position to encode, stripped
Patrick Traill: Depending how unique you want to get, you may need to impose some conventions to exclude symmetrically equivalent positions.
Patrick Traill: The following convention encodes positions rather than problems, as it does not specify either who is to move or what is to be achieved. In principle one, should also specify what rules apply.
- = ... A = ..B B = ..W C = .B. D = .BB E = .BW F = .W. G = .WB H = .WW I = B.. J = B.B K = B.W L = BB. M = BBB N = BBW O = BW. P = BWB Q = BWW R = W.. S = W.B T = W.W U = WB. V = WBB W = WB. X = WW. Y = WWB Z = WWW
Patrick Traill: Specifying “largest/smallest dimension along edge” (for types 2/3 and 4/5) is ambiguous when the dimensions are equal. I propose specifying “first/second dimension along edge”.
. W B . . B . . . W W B W W W B B B B B B B . .
G A - Y Z M M I
So, adding sizes (4x6) and type (corner), we get:
The first three characters are always present, and after that, there is one character per 3 points on the board. So a 9x9 corner problem (81 intersections) is encoded as 30 characters.
For 19×19 = 361 intersections one needs 124 characters and for the maximum (36×36) one needs 3 + (36×36) = 3 + 1296 / 3 = 435 characters :)
 The usual order is width×height and not small×large.