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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vvlab-0.1.6.tar.gz
  • Upload date:
  • Size: 3.8 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.6.tar.gz
Algorithm Hash digest
SHA256 d569e2a4fe3bffc26144062b6714c80201b5119eaa160fc1e6f88934b79a294d
MD5 c0c74ca173e8b8d0c113cb725b85d741
BLAKE2b-256 02827279ce1ea3f3747fa7db6adc6bb0a31d47b1b49eba8b0de4a49cdce86864

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vvlab-0.1.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 98fee57aaf2674790f8e4fe2431f3b933716ef7ab8a4883fd516c978f435d77c
MD5 dbb0649470f2970d57e3eb40445c1adc
BLAKE2b-256 4853f6527967789bd39d3c684f1c9b906d1d6d900ddbb9b00447e2efbc20d39b

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