Chess Board Algorithm

The basic data structure for representing a board configuration during a chess game as homogenous in order that it was possible to identify all 64 squares (8 x 8) uniquely by row and column.  However during a chess game it is possible for any chess piece of any colour to be in any square and, of course, it is allowed that pieces disappear from the data, so we do not have to check for content consistency in this respect.  Therefore we must have a data structure that allows for the row / column reference to contain data describing the piece in that square (e.g. white queen, black pawn, etc.).

Taking this one step further we could use a linked list, to save memory, for each row / column reference and data content that contains data on how that piece moves on the board and presents the valid moves to other free or capturable piece on the board.

The next step would be to develop an algorithm use the data to process all possible combinations of moves from the current move and recommend the optimum (or range of optimum) moves to ensure success – something that chess masters and most chess simulations do (the most famous being IBM’s Big Blue).