Skip to content

Commit

Permalink
[0.4.5] update DDPG
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjim0816 committed Dec 24, 2023
1 parent c82035c commit 5f0f054
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 325 deletions.
4 changes: 2 additions & 2 deletions joyrl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Email: [email protected]
Date: 2023-01-01 16:20:49
LastEditor: JiangJi
LastEditTime: 2023-12-24 17:49:27
LastEditTime: 2023-12-24 19:04:37
Discription:
'''
from joyrl import algos, framework, envs, utils
from joyrl.run import run

__version__ = "0.4.4.1"
__version__ = "0.4.5"

__all__ = [
"algos",
Expand Down
Empty file added joyrl/algos/DDPG/__init__.py
Empty file.
32 changes: 32 additions & 0 deletions joyrl/algos/DDPG/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python
# coding=utf-8
'''
Author: JiangJi
Email: [email protected]
Date: 2023-12-15 13:16:24
LastEditor: JiangJi
LastEditTime: 2023-12-19 13:17:37
Discription:
'''
import numpy as np
class AlgoConfig:
def __init__(self):
self.action_type = 'dpg' # action type, dpg: deterministic policy gradient
self.buffer_type = 'REPLAY_QUE' # replay buffer type
self.buffer_size = 100000 # replay buffer size
self.batch_size = 128 # batch size
self.gamma = 0.99 # discount factor
self.policy_loss_weight = 0.002 # policy loss weight
self.critic_lr = 1e-3 # learning rate of critic
self.actor_lr = 1e-4 # learning rate of actor
self.tau = 0.001 # soft update parameter
self.value_min = -np.inf # clip min critic value
self.value_max = np.inf # clip max critic value
self.actor_layers = [
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
]
self.critic_layers = [
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
{'layer_type': 'Linear', 'layer_size': [256], 'activation': 'ReLU'},
]
4 changes: 4 additions & 0 deletions joyrl/algos/DDPG/data_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from joyrl.algos.base.data_handler import BaseDataHandler
class DataHandler(BaseDataHandler):
def __init__(self, cfg):
super().__init__(cfg)
96 changes: 0 additions & 96 deletions joyrl/algos/DDPG/ddpg.py

This file was deleted.

56 changes: 0 additions & 56 deletions joyrl/algos/DDPG/env.py

This file was deleted.

152 changes: 0 additions & 152 deletions joyrl/algos/DDPG/main.py

This file was deleted.

Loading

0 comments on commit 5f0f054

Please sign in to comment.