Re: [pygame] State of the math branch

2009-11-15 Thread Jeff Cagle
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

Re: [pygame] Just finished TicTacToe, but How would I do some AI?

2007-09-23 Thread 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

[pygame] GUI unit testing - was What about Python 3?

2007-09-03 Thread Jeff Cagle
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