For fun, hand-optimized winner computation.
Hand-crafted encoding of the board in 32 bits.

This speeds up considerably the AI.