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.7.tar.gz (12.4 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.7-py2.py3-none-any.whl (17.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vvlab-0.1.7.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.10

File hashes

Hashes for vvlab-0.1.7.tar.gz
Algorithm Hash digest
SHA256 66c75991dc08cd625e717b01658bd9cbf997c190d558f9702788762eab64c8b9
MD5 3a7ca16c3408df1ff0e39d026210f034
BLAKE2b-256 0014c3c4042a936e0825f50aeda2a80286b05f1b43f7e710e612a0b917f050fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vvlab-0.1.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.10

File hashes

Hashes for vvlab-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9cd922e6021705a82320d67b6e28f7c1fc1ea9134717b9a1ea303dd46e3e1e26
MD5 27b245105c19ef7096ba154458350019
BLAKE2b-256 9f0a7871ec05535206a154cfc78c082071de87ab9319752b524ce778411bd711

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