Thursday, October 21

Magic Cube (魔方)

Have you ever played Magic Cube (魔方) before? I do like it. Actually, I'm pretty good at it though. I can make 6 surface perfectly. No, no, I'm not telling you how to play Magic Cube in this blog.

14 years ago, when I was in highschool, I went to "Olymipc Information Competition" Local Contest, and the question is to build a Magic Cube, and I didn't have any idea how to do it, until yesterday.

Yesterday I was reading papers about backtracking in CSP problem, then a lightning hit me: This is exactly what I should have use in that contest, to build a Magic Cube! Make the initial state, then try every steps. Depth-First Iterative Deeping will get the optimal solution for this problem efficiently! (Of course the solution is exponential, that's why the question was marked: only 3 steps to the solution. I can still remember that after 14 years.)

I've learned much, but I didn't know how to use it. Now I'm on the right track.

Labels: ,