“Daniel Bonilla Jaramillo asked:
“Chess has never had any appeal to me, but recently my brother bought a chess set, and I realized that the board can be represented as an 8×8 matrix, and each type of of piece as a number from 0 to 6, the 6 pieces, and the empty square. So I’ve been looking for some info on the internet, but I haven’t found too much. Do you know if anybody has made some research on this, or published books, or articles. Matrices have applications on stochastic processes, optimization, best-decision taking, so wouldn’t it be possible to create models for best moves according to a situation, and such?
What do you think?”
From the answers:
“Linear algebra has been applied to chess endgames in the following paper: http://library.msri.org/books/Book29/files/stiller.pdf.
“The main problem with trying to represent a chess game as a series of matrices (each representing a state of the board between consecutive moves) is that while it is fairly trivial to represent the board as such, it is not conducive to generating such a board through matrix multiplication.
I just spent a few hours over the past couple of days trying to do this and eventually found this on Google after I realised it can’t work.
The main problem is that Matrix multiplication to go from one matrix to another relies on computing the inverse of the initial matrix so that it is ‘cancelled out’ before moving to the next matrix.
Unfortunately, you can’t compute the inverse of a matrix that has identical rows (meaning it has a zero determinant).
Whether you organise a chess board vertically or horizontally, either the middle ranks begin identical (all empty) or the outer files appear identical (Rook,pawn,empty,empty,empty,empty,-pawn,-Rook / Bishop, pawn, empty,empty,empty,empty,-pawn,-Bishop).
You could do the stepping between states by matrix addition, but it’s less appealing computationally.
…I definitely don’t try to imply that Linear Algebra is not applicable to chess (as others have mentioned it definitely can be), all I am saying is that representing the board as an 8×8 matrix leads to most positions being over-defined and hence non-invertible as matrices.