Skip to main content

Reinforcement Learning Tools

Project description

VVLAB

基于PytorchOpenAI Gym实现强化学习的工具包

安装

注意: 工具包有使用pytorch和numpy,建议使用conda新建环境后安装。

  1. 安装工具包
    从GitHub下载包

    git clone https://github.com/LampV/Reinforcement-Learning
    

    进入文件夹

    cd Reinforcement-Learning
    

    安装vvlab到本地

    pip install ./src
    
  2. 运行示例

    python examples.ddpg.py
    

    若程序正常运行,说明安装成功

使用

  1. agents
    通过vvlab.agents中提供的基类可以创建自己的强化学习智能体,其通用方法如下:

    # import 基类
    from vvlab.agents import xxxBase
    # 继承基类并实现必要的函数  
    class myxxx(xxxBase):  
        def _build_net(self):
            pass
    

    具体的使用方式在examples/下都能找到代码示例和注释文档

  2. models
    要调用简单的pytorch神经网络结构作为DRL的神经网络,只需要import即可

    from vvlab.models import SimpleDQNNet
    
  3. envs
    要调用附带的envs,需要让 __init__.py 中的代码执行以注册到 gym,之后按照标准的gym方式创建即可:

    import vvlab  
    env = gym.make('Maze-v0)
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vvlab-0.1.9.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vvlab-0.1.9-py2.py3-none-any.whl (23.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file vvlab-0.1.9.tar.gz.

File metadata

  • Download URL: vvlab-0.1.9.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for vvlab-0.1.9.tar.gz
Algorithm Hash digest
SHA256 824ed7575128bb64b338e5aab5fbe1ab9dd52daf19e9165a1405ad3fbdc74689
MD5 dd249e5d2fafdd3684d9315f9a36adc8
BLAKE2b-256 59302c8e6051153120f7dc09205ed2ed92f797489e6b3238155e88a98027ebf2

See more details on using hashes here.

File details

Details for the file vvlab-0.1.9-py2.py3-none-any.whl.

File metadata

  • Download URL: vvlab-0.1.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for vvlab-0.1.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08417bf84b781a65dc71d10d9e9021bc0437ab1bb0bb78aebcc643db78d4d310
MD5 c94c4acab18c3ccde1edb910ed0bdd70
BLAKE2b-256 49488b2a6fa4de13090cb1df4d0809ab58cdf0a97a8c566bbfc72b3eec7584c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page