here's an even crappier drawing than the first one
this one would be what i think would work (probably more complex than is required) for using a linear actuator to open and close the door on the box (or open and close a drawer in the box...or whatever)
so in this scenario...putting your pieces on the two yellow squares on the chess board would cause the circuit to close and send + polarity signal to the linear actuator thereby causing it to extend....this extension would need to be translated to the door....a simple slide on the door would work (not gonna even attempt to draw it but i know what it would look like)...when the actuator would push out it would push the door open (or open a drawer which would be really easy and nifty)..
if you remove the two pieces that open the door/drawer (you couldn't leave either of them in place to close the door or you'd create a short) then the system would "de-energize"
then if you put your magnetic pieces on the two green squares...the circuit would close but this time the polarity would be reversed which would bring the actuator back in...thereby closing the door/drawer...
most linear actuators have limit switches built in as well so you wouldn't need to worry about it staying powered up if you forgot to take the pieces off at the end of the travel...
oh...and hfcg....i don' t mean to keep replying as if i know what the OP wants to know etc....i'm just interested in this project myself as i might build one or something like it