From personal experience trying to make things hover using electromagnets, I have found that they are never stable. Just setting up magnets like you suggest wouldn't work too well. I'm wondering, though, if you could get a certain amount of control using an infrared proximity sensor in the center of each square. It would sense the distance between the piece and the square, and turn on the electromagnet accordingly. I still don't think it would be very stable or reliable--you'd need an extremely fast processor, but it might be possible.
I love the idea!
Good luck!
Regards,
Der Strom