This page will give you the solution to the 3×3 coffin puzzle as you can find in The 7th Guest. The solution given will close every coffin. It will not be the quickest solution but it will definitely solve the puzzle.
Please give the state of the coffin (O for open, C for closed) from left to right from top to bottom separated by comma’s.
The solution given here shows what to do with the coffins. 1 is upper left, 9 is lower right.
Massive thanks to Mark Thornquist for his algorithm.