dqn实现 pendulum_PyTorch实现的深度强化学习算法集

该仓库包含了使用PyTorch实现的深度强化学习算法,包括DQN、A2C等。实现了CartPole、Pendulum等环境,并提供了训练和测试模型的步骤。
摘要由CSDN通过智能技术生成

Deep Reinforcement Learning (DRL) Algorithms with PyTorch

This repository contains PyTorch implementations of deep reinforcement learning algorithms. This implementation uses PyTorch. For a TensorFlow implementation of algorithms, take a look at tsallis_actor_critic_mujoco.

Algorithms Implemented

Deep Q-Network (DQN)

Advantage Actor Critic (A2C)

Vanilla Policy Gradient (VPG)

Natural Policy Gradient (NPG)

Trust Region Policy Optimization (TRPO)

Proximal Policy Optimization (PPO)

Deep Deterministic Policy Gradient (DDPG)

Twin Delayed DDPG (TD3)

Soft Actor-Critic (SAC)

Automating entropy adjustment on SAC (ASAC)

Tsallis Actor-Critic (TAC)

Automating entropy adjustment on TAC (ATAC)

Environments Implemented

CartPole-v1 (as described in here)

Pendulum-v0 (as described in here)

MuJoCo environments (HalfCheetah-v2, Ant-v2, Humanoid-v2, etc.) (as described in here)

Results

CartPole-v1

Observation space: 4

Action space: 2

Pendulum-v0

Observation space: 3

Action space: 1

HalfCheetah-v2

Observation space: 17

Action space: 6

Ant-v2

Observation space: 111

Action space: 8

Humanoid-v2

Observation space: 376

Action space: 17

Requirements

Usage

The repository's high-level structure is:

├── agents

└── common

├── results

├── data

└── graphs

├── tests

└── save_model

1) To train the agents on the environments

To train all the different agents on MuJoCo environments, follow these steps:

git clone https://github.com/dongminlee94/deep_rl.git

cd deep_rl

python run_mujoco.py

For other environments, change the last line to run_cartpole.py, run_pendulum.py.

If you want to change configurations of the agents, follow this step:

python run_mujoco.py \

--env=Humanoid-v2 \

--algo=atac \

--seed=0 \

--iterations=200 \

--steps_per_iter=5000 \

--max_step=1000

2) To watch the learned agents on the above environments

To watch all the learned agents on MuJoCo environments, follow these steps:

cd tests

python mujoco_test.py --load=envname_algoname_...

You should copy the saved model name in tests/save_model/envname_algoname_... and paste the copied name in envname_algoname_.... So the saved model will be load.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值