In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how to use OpenAI baselines. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "How to use OpenAI baselines"!
The first is to install the gym environment
This article uses Atari games, so you need to install them in gym, otherwise some games may not be installed by default:
pip install -e '. [atari]'
These are the exact words:
The Atari environments are a variety of Atari video games. If you didn’t do the full install, you can install dependencies via pip install -e ‘. [atari]’ (you’ll need cmake installed) and then get started as follow:
import gymenv = gym.make('SpaceInvaders-v0')env.reset()env.render()
The next step is the clone baselines repository:
git clone https://github.com/openai/baselines.git
Then enter the directory to run:
The table of contents reads as follows:
total 48drwxrwxr-x 6 jqw jqw 4096 Jun 8 16:50 .drwxrwxr-x 3 jqw jqw 4096 Jun 7 11:07 .. drwxrwxr-x 15 jqw jqw 4096 Jun 8 19:42 baselinesdrwxr-xr-x 2 root root 4096 Jun 8 16:50 baselines.egg-infodrwxrwxr-x 2 jqw jqw 4096 Jun 7 11:08 data-rw-rw-r-- 1 jqw jqw 504 Jun 7 11:08 Dockerfiledrwxrwxr-x 8 jqw jqw 4096 Jun 7 11:08 .git-rw-rw-r-- 1 jqw jqw 285 Jun 7 11:08 .gitignore-rw-rw-r-- 1 jqw jqw 1087 Jun 7 11:08 LICENSE-rw-rw-r-- 1 jqw jqw 3417 Jun 7 11:08 README.md-rw-rw-r-- 1 jqw jqw 957 Jun 7 11:08 setup.py-rw-rw-r-- 1 jqw jqw 224 Jun 7 11:08 .travis.ymlpython3 -m baselines.a2c.run_atari
It's OK, the other algorithms are the same reason.
Note: This is python3,
Then you need to install numpy, matplotlib, tensorflow, etc. under python3, omitted here
At this point, I believe that everyone has a deeper understanding of "how to use OpenAI baselines", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.