介绍

前一篇《GIF图像文件格式-用Mathematica实现编码过程》中的压缩GIF文件功能,对围棋谱的可视化非常合适:相比于直接使用Mathematica导出的GIF,可以节省99%以上的存储空间。

本程序GitHub地址: https://github.com/SqRoots/gifor/tree/master/usage-of-playing-go-chess
下载后,打开“gifor/usage-of-playing-go-chess/demo.nb”,可以进行测试。

实例

为此我还从新浪围棋采集了大量SGF围棋棋谱,而且每天仍在继续采集,截止到20191108,已经采集了 51845 份。
下面是部分关于AlphaGo棋谱的例子(压缩对比,动图):

文件名帧数压缩后文件大小直接导出文件大小压缩比
go-chess-世界AlphaGo0历程40模块40天01-41341.gif1252帧0.28MB49.52MB0.57%
go-chess-世界AlphaGo0历程40模块40天02-41340.gif617帧0.16MB19.31MB0.83%
go-chess-世界AlphaGo0历程40模块40天03-41339.gif347帧0.09MB8.61MB1.05%
go-chess-世界AlphaGo0历程40模块40天04-41338.gif484帧0.12MB13.56MB0.88%
go-chess-世界AlphaGo0历程40模块40天05-41337.gif523帧0.13MB15.01MB0.87%
go-chess-世界AlphaGo0历程40模块40天06-41336.gif713帧0.17MB22.86MB0.74%
go-chess-世界AlphaGo0历程40模块40天07-41335.gif550帧0.14MB16.32MB0.86%
go-chess-世界AlphaGo0历程40模块40天08-41334.gif468帧0.12MB13.17MB0.91%
go-chess-世界AlphaGo0历程40模块40天09-41333.gif517帧0.13MB15.09MB0.86%
go-chess-世界AlphaGo0历程40模块40天10-41332.gif453帧0.12MB12.22MB0.98%
go-chess-世界AlphaGo0历程40模块40天11-41331.gif502帧0.13MB14.39MB0.90%
go-chess-世界AlphaGo0历程40模块40天12-41330.gif605帧0.15MB18.55MB0.81%
go-chess-世界AlphaGo0历程40模块40天13-41329.gif518帧0.13MB15.08MB0.86%
go-chess-世界AlphaGo0历程40模块40天14-41328.gif305帧0.08MB7.21MB1.11%
go-chess-世界AlphaGo0历程40模块40天15-41327.gif450帧0.12MB12.3MB0.98%
go-chess-世界AlphaGo0历程40模块40天16-41326.gif537帧0.13MB15.58MB0.83%
go-chess-世界AlphaGo0历程40模块40天17-41325.gif710帧0.17MB22.85MB0.74%
go-chess-世界AlphaGo0历程40模块40天18-41324.gif505帧0.13MB14.68MB0.89%
go-chess-世界AlphaGo0历程40模块40天19-41323.gif522帧0.13MB15.07MB0.86%
go-chess-世界AlphaGo0历程40模块40天20-41322.gif445帧0.12MB12.19MB0.98%