Here are some useful lists for processing the TTT data...
The data below assume that a TTT board consists of a string of 9 characters of 'x', 'o', and '_' . The board positions are numbered from 0 to 8, in reading order.
For instance, the string "x_xoo_x_o" represents the following board:
x | | x
---------
o | o |
---------
x | | o
Wins =
[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]
# Transformations (rotations are counter-clockwise)
Rot90 = [6,3,0,7,4,1,8,5,2]
Rot180 = [8,7,6,5,4,3,2,1,0]
Rot270 = [2,5,8,1,4,7,0,3,6]
VertFlip= [2,1,0,5,4,3,8,7,6]
Transformations =
[[Rot90],[Rot180],[Rot270],[VertFlip],[Rot90,VertFlip],[Rot180,VertFlip],[Rot270,VertFlip]]
There are 7 unique symmetry transformations, other than the identity, which consist of the 3 pure rotations, a flip, and combinations of a rotation and a flip. Every other symmetry transformations can be reduced to one of these.