Lorenz Quack wrote:
Also, what would be a use case for non-square matrices?
Mapping coordinates in R^3 to coordinates in R^2 can be readily
accomplished with a 2x3 matrix. To generalize, an m x n matrix can be
used to linearly transform R^n -- R^m.
Jeff Cagle
The book Python Programming for the Absolute Beginner uses this algorithm:
Number the board
012
345
678
best_moves = [4,0,2,6,8,1,3,5,7]
choose first available out of best_moves
It turns out that you can modify this scheme pretty easily with
one-turn-lookahead to guarantee a draw for either
in this problem too, but haven't gotten much further than
thinking about the threading involved in sitting outside an application
and sending it virtual mouse-clicks. So I don't know how much help I'd
be, but I'm definitely interested.
Jeff Cagle