Sat Feb 15, 2014 4:28 am
I would say the thing to do is to use an array of switches. As Ravenous said, only one piece moves at a time, and since you know where each piece starts, you should know where each piece is at any given time. You have a lot of options Reed switches or hall effect sensors to sense a magnet, tactile switches, photoresistors, or even continuity sensors could do what you're looking for. I'd recommend something digital, so probably not the photoresistor.
In order to not need to use port expanders, you will probably want to use some form of multiplexing to read which switches are pressed, and then scan the board every second or two. I haven't seen it, but I'm sure it's already been done to use Charlieplexing, similar to what you'll find in an LED cube or LED matrix. Wire one lead of each sensor in a column together, and the other lead to the row, so that you can apply a voltage to a column, and then read whether you have continuity in any given row. This way for any NxN board, you only need 2n GPIO pins, not N^2 pins.
Conveniently, a chess board is 8x8, which means that using this method, you need 16 GPIO pins, one less than the Pi's standard header has. That still leaves you one more for something like a light to use as a turn or timer indicator, or as a switch (e.g. reset) if you like. If you have a Rev. 2 board, there's a second header that you can solder in for an additional 4 GPIO pins in case you want more than one extra for your purposes.