【Spinning Up】绘制结果

【Spinning Up】绘制结果

转载链接:
https://blog.csdn.net/WUDIxi/article/details/104448418
Spinning Up自带了一个plotting模块,用来绘制输出,调用格式如下:

python -m spinup.run plot [path/to/output_directory ...] [--legend [LEGEND ...]]
    [--xaxis XAXIS] [--value [VALUE ...]] [--count] [--smooth S]
    [--select [SEL ...]] [--exclude [EXC ...]]

路径参数

包含我们希望绘制结果的日志目录(log directories)(或者日志目录的父目录)。plotter会自动递归地搜索实验输出。

例如,假设我们的日志目录如下所示:

data/
    bench_algo1/
        bench_algo1-seed0/
        bench_algo1-seed10/
    bench_algo2/
        bench_algo2-seed0/
        bench_algo2-seed10/

通过运行如下的命令:

python spinup/utils/plot.py data/bench_algo

就能实现algo1和algo2的比较。到时候出现的图,会有两条线,多个随机种子求平均,中间的线为均值线,阴影为方差。

示意图:

在这里插入图片描述

可选参数解析:

在这里插入图片描述

还有–value,这个可以选到底plot什么值,默认是AverageTestReward啥的。

联系方式

ps: 欢迎做强化的同学加群一起学习:

扫描二维码关注公众号,回复: 12942535 查看本文章

深度强化学习-DRL:799378128

欢迎关注知乎帐号:未入门的炼丹学徒

CSDN帐号:https://blog.csdn.net/hehedadaq

猜你喜欢

转载自blog.csdn.net/hehedadaq/article/details/114044217