Skip to main content

wjwgym(暂名): 强化学习工具包

基于Pytorch与OpenAI Gym实现强化学习训练涉及到:

  • 强化学习智能体编写
  • 神经网络创建
  • gym环境编写

wjwgym提供了常用强化学习智能体 DQN DDPG QLearning 的pytorch实现,完成了其中的通用部分。可以作为智能体编写的参考,也可以直接作为基类用于创建自己的强化学习智能体。同时实现了简单的神经网络和gym环境,可以作为实现的参考。

Agents

wjwgym.agents 中实现了DQNBase DDPGBase 和 LinearBase 三个基类,分别作为DQN DDPG 和 QLearning/Sarsa 的通用抽象。

  • DQN_base
    或称DoubleDQN,在标准DQN基础上增加了经验回放和fixed_target。实现了标准的训练 获取动作 添加记录到经验回放池等方法,同时提供了自己实现神经网络构建的接口。
  • DDPG_base
    实现了DDPG通用的训练 获取动作 添加记录到经验回放池方法,同时提供Actor和Critic神经网络创建的接口。有默认的噪声函数实现,也支持自己实现噪声函数。
  • Linear_base 实现了线性学习通用的QTable,但训练函数需要自己创建。

Models

wjwgym.models 中实现了几种简单的神经网络,用于创建示例。

Envs

wjwgym.envs 中实现了简单的环境用于创建示例,在wjwgym.envs._init__中给出了将环境注册到gym中的方法。需要注意:

  • 需要将包安装到site-packages下
  • 需要 import wjwgym 或者 from wjwgym import envs,__init__文件中的注册代码才会生效。

Release files for wjwgym 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wjwgym 0.1.2
File Size Uploaded
wjwgym-0.1.2.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wjwgym 0.1.2
File Interpreter ABI Platform
wjwgym-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / wjwgym-0.1.2.tar.gz

Download URL wjwgym-0.1.2.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
04849cfdee13801d67436ec2a4822676d32f43f9c7271278a6a0aa7ee53b3171
BLAKE2b-256 checksum
How to use checksums
842f7fd78827e1e95dac4d930c1a876bf667580415bedd9f09182bc45e2a1bdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / wjwgym-0.1.2-py3-none-any.whl

Download URL wjwgym-0.1.2-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfcbe88574d6b5c328f29cfb90ce303c676290fe98df6dad7870314ddb469e92
BLAKE2b-256 checksum
How to use checksums
21d35ea932bc0c226d4f870838a9c02d73366ded0371a119de48cd9a3023d832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page