21 Nov 2016

The Hardest 8-Puzzle

If you are working on any 8-puzzle related tasks, try your method with the following initial board which is considered to be the hardest to solve. Actually, it requires 31 moves to solve.

8 6 7
2 5 4
3 0 1

Someone may prefer empty/space rather than using 0. But the concept keeps the same.

8 Nov 2016

matplotlib tips: draw circle, rectangle, save figure and maxmize figure

matplotlib是一个非常强大的python库,拥有众多作图函数与matlab类似的语法,使用非常方便.但是经常有一些小问题需要处理.这里记下解决方案,涉及到: 画圆, 画矩形, 保存图片, 和图片默认最大化. 以后如果碰到其他问题再添加.