-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from EdanToledo/feat/ddpg-variants
Feat/ddpg variants
- Loading branch information
Showing
13 changed files
with
1,451 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defaults: | ||
- logger: ff_ddpg | ||
- arch: anakin | ||
- system: ff_ddpg | ||
- network: mlp_ddpg | ||
- env: brax/ant | ||
- _self_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defaults: | ||
- logger: ff_td3 | ||
- arch: anakin | ||
- system: ff_td3 | ||
- network: mlp_td3 | ||
- env: brax/ant | ||
- _self_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults: | ||
- base_logger | ||
|
||
system_name: ff_ddpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults: | ||
- base_logger | ||
|
||
system_name: ff_td3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ---MLP D4PG Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256, 256] | ||
use_layer_norm: True | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.heads.LinearOutputHead | ||
post_processor: | ||
_target_: stoix.networks.postprocessors.TanhToSpec | ||
|
||
q_network: | ||
input_layer: | ||
_target_: stoix.networks.inputs.ObservationActionInput | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256, 256] | ||
use_layer_norm: True | ||
activation: silu | ||
critic_head: | ||
_target_: stoix.networks.heads.ScalarCriticHead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ---MLP D4PG Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256, 256] | ||
use_layer_norm: True | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.heads.LinearOutputHead | ||
post_processor: | ||
_target_: stoix.networks.postprocessors.TanhToSpec | ||
|
||
q_network: | ||
input_layer: | ||
_target_: stoix.networks.inputs.ObservationActionInput | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256] | ||
use_layer_norm: True | ||
activation: silu | ||
critic_head: | ||
_target_: stoix.networks.heads.ScalarCriticHead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# --- Defaults FF-D4PG --- | ||
|
||
total_timesteps: 1e8 # Set the total environment steps. | ||
# If unspecified, it's derived from num_updates; otherwise, num_updates adjusts based on this value. | ||
num_updates: ~ # Number of updates | ||
seed: 42 | ||
|
||
# --- RL hyperparameters --- | ||
update_batch_size: 1 # Number of vectorised gradient updates per device. | ||
rollout_length: 8 # Number of environment steps per vectorised environment. | ||
epochs: 16 # Number of sgd steps per rollout. | ||
warmup_steps: 256 # Number of steps to collect before training. | ||
buffer_size: 1_000_000 # size of the replay buffer. | ||
batch_size: 256 # Number of samples to train on per device. | ||
actor_lr: 1e-4 # the learning rate of the policy network optimizer | ||
q_lr: 1e-4 # the learning rate of the Q network network optimizer | ||
tau: 0.01 # smoothing coefficient for target networks | ||
gamma: 0.99 # discount factor | ||
max_grad_norm: 0.5 # Maximum norm of the gradients for a weight update. | ||
decay_learning_rates: False # Whether learning rates should be linearly decayed during training. | ||
max_abs_reward : 20_000 # maximum absolute reward value | ||
exploration_sigma : 0.1 # standard deviation of the exploration noise | ||
huber_loss_parameter: 1.0 # parameter for the huber loss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# --- Defaults FF-D4PG --- | ||
|
||
total_timesteps: 1e8 # Set the total environment steps. | ||
# If unspecified, it's derived from num_updates; otherwise, num_updates adjusts based on this value. | ||
num_updates: ~ # Number of updates | ||
seed: 42 | ||
|
||
# --- RL hyperparameters --- | ||
update_batch_size: 1 # Number of vectorised gradient updates per device. | ||
rollout_length: 8 # Number of environment steps per vectorised environment. | ||
epochs: 16 # Number of sgd steps per rollout. | ||
warmup_steps: 256 # Number of steps to collect before training. | ||
buffer_size: 1_000_000 # size of the replay buffer. | ||
batch_size: 256 # Number of samples to train on per device. | ||
actor_lr: 1e-4 # the learning rate of the policy network optimizer | ||
q_lr: 1e-4 # the learning rate of the Q network network optimizer | ||
tau: 0.01 # smoothing coefficient for target networks | ||
gamma: 0.99 # discount factor | ||
max_grad_norm: 0.5 # Maximum norm of the gradients for a weight update. | ||
decay_learning_rates: False # Whether learning rates should be linearly decayed during training. | ||
max_abs_reward : 20_000 # maximum absolute reward value | ||
exploration_sigma : 0.1 # standard deviation of the exploration noise | ||
policy_noise: 0.2 # standard deviation of the policy noise | ||
policy_frequency: 2 # frequency of the policy update in the TD3 algorithm (delayed policy update) | ||
noise_clip: 0.5 # noise clip parameter of the Target Policy Smoothing Regularization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.