惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
腾讯CDC
G
Google Developers Blog
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
美团技术团队
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志

博客园 - 范仁义

吊打市面上100%的markdown编辑器 范仁义软件合集 全网最通俗易懂傅里叶变换 【强化学习玩转超级马里奥】05-最最简单的超级马里奥训练过程 【强化学习玩转超级马里奥】04-stable-baselines3 库介绍 【强化学习玩转超级马里奥】03-马里奥环境代码说明 【强化学习玩转超级马里奥】02-运行超级马里奥 【强化学习玩转超级马里奥】01-nes-py 包安装实例 【强化学习玩转超级马里奥】00-强化学习玩马里奥课程介绍 linux查找操作 分析MongoDB架构案例 legend3---bootstrap modal框出现蒙层,无法点击modal框内容(z-index问题) legend3---laravel报419错误 laravel自定义中间件实例 laravel中间件Middleware原理解析及实例 git: Failed to connect to github.com port 443: Timed out 记忆规律 tinymce上传的图片不指定宽高 z-index总结
【强化学习玩转超级马里奥】01-超级马里奥环境安装
范仁义 · 2022-03-18 · via 博客园 - 范仁义

【强化学习玩转超级马里奥】01-超级马里奥环境安装

一、环境安装

1、安装超级马里奥环境

https://pypi.org/project/gym-super-mario-bros/
pip install gym-super-mario-bros

2、安装 python 版本的 nes 模拟器

https://pypi.org/project/nes-py/

https://github.com/Kautenja/nes-py
pip install nes-py
💜、nes-py 安装注意

nes-py安装的时候需要依赖 Microsoft C++ Build Tools

https://pypi.org/project/nes-py/

a、nes 模拟器是什么

https://zhuanlan.zhihu.com/p/34636695

b、nes-py 是什么

nes_py 是 python 用来模拟 nes 的包,也就是 python 版本的 nes 模拟器

一、安装超级马里奥环境

安装最新版本

pip install gym-super-mario-bros

安装指定版本

pip install gym-super-mario-bros-7.3.0


pip install gym-super-mario-bros

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: gym-super-mario-bros in d:\software\e_anaconda\envs\pytorch\lib\site-packages (7.3.0)
Requirement already satisfied: nes-py>=8.0.0 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from gym-super-mario-bros) (8.1.8)
Requirement already satisfied: tqdm>=4.48.2 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py>=8.0.0->gym-super-mario-bros) (4.62.3)
Requirement already satisfied: pyglet<=1.5.11,>=1.4.0 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py>=8.0.0->gym-super-mario-bros) (1.5.11)
Requirement already satisfied: numpy>=1.18.5 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py>=8.0.0->gym-super-mario-bros) (1.21.2)
Requirement already satisfied: gym>=0.17.2 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py>=8.0.0->gym-super-mario-bros) (0.19.0)
Requirement already satisfied: cloudpickle<1.7.0,>=1.2.0 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from gym>=0.17.2->nes-py>=8.0.0->gym-super-mario-bros) (1.6.0)
Requirement already satisfied: colorama in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from tqdm>=4.48.2->nes-py>=8.0.0->gym-super-mario-bros) (0.4.4)
Note: you may need to restart the kernel to use updated packages.

二、安装python 版本的 nes 模拟器

pip install nes-py

pip install nes-py

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: nes-py in d:\software\e_anaconda\envs\pytorch\lib\site-packages (8.1.8)
Requirement already satisfied: tqdm>=4.48.2 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py) (4.62.3)
Requirement already satisfied: gym>=0.17.2 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py) (0.19.0)
Requirement already satisfied: pyglet<=1.5.11,>=1.4.0 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py) (1.5.11)
Requirement already satisfied: numpy>=1.18.5 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from nes-py) (1.21.2)
Requirement already satisfied: cloudpickle<1.7.0,>=1.2.0 in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from gym>=0.17.2->nes-py) (1.6.0)
Requirement already satisfied: colorama in d:\software\e_anaconda\envs\pytorch\lib\site-packages (from tqdm>=4.48.2->nes-py) (0.4.4)
Note: you may need to restart the kernel to use updated packages.

视频位置

强化学习玩超级马里奥【2022 年 3 月最新】(学不会可以来打我)_哔哩哔哩_bilibili
https://www.bilibili.com/video/BV1iL411A7zo?spm_id_from=333.999.0.0

强化学习库 Stable-Baselines3_哔哩哔哩_bilibili
https://www.bilibili.com/video/BV1ca41187qB?spm_id_from=333.999.0.0

超参数调优框架 optuna_哔哩哔哩_bilibili
https://www.bilibili.com/video/BV1ni4y1C7Sv?spm_id_from=333.999.0.0

强化学习玩超级马里奥-读书编程笔记
https://fanrenyi.com/lesson/48

超参数调优框架 optuna-读书编程笔记
https://fanrenyi.com/lesson/49

强化学习库 Stable-Baselines3-读书编程笔记
https://fanrenyi.com/lesson/50

《强化学习玩超级马里奥》课程讲解如何用强化学习来训练超级马里奥。本课程是保姆级教程,通俗易懂,一步步带你敲代码。深度学习库用的 Pytorch,强化学习库用的是 Stable-Baselines3,超参数调优框架用的是 Optuna。代码及资料 github 地址:【 https://github.com/fry404006308/fry_course_materials/tree/master 】中的【220310_强化学习玩马里奥】

代码 github 位置

fry_course_materials/220310_强化学习玩马里奥 at master · fry404006308/fry_course_materials · GitHub
https://github.com/fry404006308/fry_course_materials/tree/master/220310_强化学习玩马里奥

博客位置

其它更多博客内容可以去 github 代码中查看

https://github.com/fry404006308/fry_course_materials/tree/master/

【强化学习玩转超级马里奥】05-最最简单的超级马里奥训练过程 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021552.html

【强化学习玩转超级马里奥】04-stable-baselines3 库介绍 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021529.html

【强化学习玩转超级马里奥】03-马里奥环境代码说明 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021518.html

【强化学习玩转超级马里奥】02-运行超级马里奥 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021507.html

【强化学习玩转超级马里奥】01-nes-py 包安装实例 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021496.html

【强化学习玩转超级马里奥】01-超级马里奥环境安装 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021460.html

【强化学习玩转超级马里奥】00-强化学习玩马里奥课程介绍 - 范仁义 - 博客园
https://www.cnblogs.com/Renyi-Fan/p/16021398.html

课程内容

【强化学习玩转超级马里奥】00-强化学习玩马里奥课程介绍

【强化学习玩转超级马里奥】01-超级马里奥环境安装

【强化学习玩转超级马里奥】01-nes-py 包安装实例

【强化学习玩转超级马里奥】02-运行超级马里奥

【强化学习玩转超级马里奥】03-马里奥环境代码说明

【强化学习玩转超级马里奥】04-stable-baselines3 库介绍

【强化学习玩转超级马里奥】05-最最简单的超级马里奥训练过程

【强化学习玩转超级马里奥】06-1-预处理与矢量化环境-预处理

【强化学习玩转超级马里奥】06-2-预处理与矢量化环境-矢量化环境

【强化学习玩转超级马里奥】07-1-模型训练参数设置-模型训练参数设置

【强化学习玩转超级马里奥】07-2-模型训练参数设置-修改参数接着训练

【强化学习玩转超级马里奥】07-3-模型训练参数设置-打印模型的参数

【强化学习玩转超级马里奥】08-保存最优模型

【强化学习玩转超级马里奥】09-1-隔多少步保存模型

【强化学习玩转超级马里奥】09-2-隔多少步保存模型-测试保存的模型

【强化学习玩转超级马里奥】10-阶段二训练与测试

【强化学习玩转超级马里奥】11-超参数调优库 optuna 介绍

【强化学习玩转超级马里奥】12-1-optuna 库选择超参数-optuna 库选择超参数

【强化学习玩转超级马里奥】12-2-optuna 库选择超参数-超参数选择具体实例

【强化学习玩转超级马里奥】12-3-optuna 库选择超参数-测试超参数调优出来的模型

【强化学习玩转超级马里奥】13-用选好超参数的模型去训练