labyrinth.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Labyrinther 作者: olety 项目源码 文件源码
def plot_anim(self, movesets, **kwargs):
        pass
        # DOESNT WORK SINE THE LENGTH OF A MOVESET IS VARIABLE
        # setup = self.plot_moveset(movesets[0], show=False, export=True, export_plots=True, plot=True)
        # fig = setup['fig']
        # ax = setup['ax']
        # plots = setup['plots']
        #
        # def update(i):
        #     label = 'Generation {}'.format(i)
        #     path, bumps = self.plot_moveset(movesets[i], export_data=True)
        #     path_xs, path_ys = Labyrinth._transform_array_into_xy(path)
        #     bumps_xs, bumps_ys = Labyrinth._transform_array_into_xy(bumps)
        #     # plots[0].set_offsets(bumps_xs, bumps_ys)
        #     # plots[1].set_offsets(path[0])
        #     # plots[2].set_offsets((path_xs[-1], path_ys[-1]))
        #     for i, j in enumerate(range(len(path)-2, -1, -1), 3):
        #         plots[i].set_positions([path_xs[i], path_ys[i]], [path_xs[i + 1], path_ys[i + 1]])
        #     # plots[len(plots)-1]
        #     return plots
        #
        # mywriter = animation.FFMpegWriter()
        # ani = animation.FuncAnimation(fig, update, frames=np.arange(0, len(movesets)), interval=200)
        # ani.save('asd.mp4', writer=mywriter)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号