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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vvlab-0.1.8.tar.gz
  • Upload date:
  • Size: 15.1 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.8.tar.gz
Algorithm Hash digest
SHA256 8d4a454bd2cb868dbbebd6c9a9bd66a7daf62c0d6ba8a0e1aab0861e198e0b50
MD5 0b92b260d6dc78c428eae0e4a92d491d
BLAKE2b-256 d887b9452410aa61f08e235019f85b66321a2408ed68a7e8bbe6afb3e2bf8105

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vvlab-0.1.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cbdaeae6d7f60770bbd39550cb07379d2ad24bf10692887967fb10a626ef76be
MD5 4f57c310e2c8362d22e4fe4132e22859
BLAKE2b-256 35b6f0bb7adfc72488ea82f9787bd60e0ed07b64b805cb2641f96857c2b74b87

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