当前位置:网站首页>强化学习入门项目spinning up(1)安装
强化学习入门项目spinning up(1)安装
2022-06-21 15:53:00 【小帅吖】
0.前言

好久之前就看到很多人推荐学习spinning up,无奈自己电脑只有win系统。最近终于在实验室的新机器上装好了双系统,于是最近打算进行spinning up的系列学习。
整个项目包括以下内容:
- 对 RL 术语、算法种类和基础理论的简短介绍。
- 一篇关于如何成长为 RL 研究角色的文章。
- 按主题组织的重要论文的精选列表。
- 一个有据可查的代码库,包含关键算法的简短、独立的实现,以及一些作为热身的练习。
本篇文章主要记录spinning up的安装过程。
差点忘记分享spinning up的链接了。
中文文档链接:https://spinningup.qiwihui.com/zh_CN/latest/index.html
英文文档链接:https://spinningup.openai.com/en/latest/index.html
github地址:https://github.com/openai/spinningup
安装的过程主要是下图的五个部分。
1.安装python
这部分我们按照文档说明安装,首先我们需要有anaconda,这个python包管理软件我相信大家都熟悉,就不多说了。
通过下方命令创建名为spinningup的一个新环境
conda create -n spinningup python=3.6


要在刚创建的环境中使用Python,可以通过下面的命令激活环境:
conda activate spinningup

2.安装 OpenMPI
OpenMPI作用:为了实现RL并行 (采样和网络更新等)
sudo apt-get update && sudo apt-get install libopenmpi-dev

3.安装 Spinning up
git clone https://github.com/openai/spinningup.git
cd spinningup
pip install -e .

有可能你会遇到下面的报错:
也就是mpi4py安装失败
参考:https://blog.csdn.net/CAIYUNFREEDOM/article/details/121750296
使用conda install mpi4py对其单独安装
然后再次执行一遍
pip install -e .

可以看到没有报错了。
4.检查安装成功与否
python -m spinup.run ppo --hid "[32,32]" --env LunarLander-v2 --exp_name installtest --gamma 0.999

训练过程:
训练完毕:
训练结束后,观看有关训练过的策略的视频:
python -m spinup.run test_policy data/installtest/installtest_s0

绘制训练曲线:
python -m spinup.run plot data/installtest/installtest_s0

5.安装 MuJoCo(可选)
这里先不安装,如果想要安装可以参考官方文档进行。
边栏推荐
- In 2022, the number of mobile banking users in Q1 will reach 650million, and ESG personal financial product innovation will be strengthened
- 在线JSON转YAML工具
- 一文get到SOLID原则的重点
- The key points of the article get to solid principle
- MQTT协议介绍
- 2021数据库市场,Aerospike与顶级厂商争锋
- Encryption market "escape": clearing, selling and running
- 微信小程序-TabBar用法
- 2 万字 + 30 张图 | 细聊 MySQL undo log、redo log、binlog 有什么用?
- It can be called a masterpiece! Read through the JVM notes and easily handle the Alibaba 30K interview!
猜你喜欢

如何编写测试用例

WDS必知必会

2022年Q1手机银行用户规模达6.5亿,加强ESG个人金融产品创新

2021数据库市场,Aerospike与顶级厂商争锋

站在数字化风口,工装企业如何“飞起来”

Encryption market "escape": clearing, selling and running

Implementation and landing of any to any real-time voice change RTC dev Meetup

2 万字 + 30 张图 | 细聊 MySQL undo log、redo log、binlog 有什么用?

在线文本列表批量添加行号工具

CVPR2022|用魔法打败魔法,网易互娱AILab图像鉴伪新方法破解伪造人脸
随机推荐
Go语言开发代码自测绝佳go fuzzing用法详解
[evaluation with prizes] you can give feedback on my products. There is a prize!
Uniswap decentralized exchange system development scheme
WEB3 安全系列 || 攻击类型和经验教训
20000 words + 30 pictures | what's the use of chatting about MySQL undo log, redo log and binlog?
What are the differences between SVN and VSS
Analysis on development details of NFT card chain game system
重磅丨国内首份呈现数据库发展历程的图鉴正式发布!
Any to Any 实时变声的实现与落地丨RTC Dev Meetup
Wechat applet tabbar usage
单一职责原则(SRP)
[live broadcast preview] at 19:00 on June 24, hcsd live broadcast -- employment guide, which will take you through the interview points for the upcoming autumn recruitment and summer internship~~
数据库连接不了不知道哪出问题了
Web网页自动化实战《5.获取所有酒店的名字、价格、评分信息,并写入文件》下篇
Richardsutton: experience is the ultimate data of AI. The four stages lead to the development of real AI
首批入围企业公示!年度TOP100智能网联供应商评选
Advanced performance test series 5. server development, VMware virtual technology
一文get到SOLID原则的重点
如何编写测试用例
Typescript (6) function