-
Notifications
You must be signed in to change notification settings - Fork 24
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 #86 from RPegoud/feat/rainbow
Feat/rainbow
- Loading branch information
Showing
23 changed files
with
524 additions
and
88 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 |
---|---|---|
|
@@ -3,6 +3,8 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
cuda-* | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
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
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
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
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
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
4 changes: 2 additions & 2 deletions
4
stoix/configs/default_ff_dueling_dqn.yaml → stoix/configs/default_ff_rainbow.yaml
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
defaults: | ||
- logger: base_logger | ||
- arch: anakin | ||
- system: ff_dqn | ||
- network: mlp_dueling_dqn | ||
- system: ff_rainbow | ||
- network: mlp_noisy_dueling_c51 | ||
- env: gymnax/cartpole | ||
- _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,14 @@ | ||
# ---MLP Dueling DQN Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.CNNTorso | ||
channel_sizes: [32, 64, 64] | ||
kernel_sizes: [64, 32, 16] | ||
strides: [4, 2, 1] | ||
use_layer_norm: False | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.dueling.NoisyDistributionalDuelingQNetwork | ||
layer_sizes: [512] | ||
use_layer_norm: False | ||
activation: silu |
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
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,12 @@ | ||
# ---MLP Dueling DQN Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256] | ||
use_layer_norm: False | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.dueling.DistributionalDuelingQNetwork | ||
layer_sizes: [128, 128] | ||
use_layer_norm: False | ||
activation: silu |
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# ---MLP Dueling DQN Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.MLPTorso | ||
layer_sizes: [256, 256] | ||
use_layer_norm: False | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.dueling.DuelingQNetwork | ||
layer_sizes: [128, 128] | ||
use_layer_norm: False | ||
activation: silu | ||
# We dont use an action head here, because we are using a dueling network | ||
# which has a value and advantage head. |
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,9 @@ | ||
# ---Noisy MLP DQN Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.NoisyMLPTorso | ||
layer_sizes: [256, 256] | ||
use_layer_norm: True | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.heads.DiscreteQNetworkHead |
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,12 @@ | ||
# ---MLP Dueling DQN Networks--- | ||
actor_network: | ||
pre_torso: | ||
_target_: stoix.networks.torso.NoisyMLPTorso | ||
layer_sizes: [256, 256] | ||
use_layer_norm: False | ||
activation: silu | ||
action_head: | ||
_target_: stoix.networks.dueling.NoisyDistributionalDuelingQNetwork | ||
layer_sizes: [512] | ||
use_layer_norm: False | ||
activation: silu |
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
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-RAINBOW --- | ||
|
||
system_name: ff_rainbow # Name of the system. | ||
|
||
# --- RL hyperparameters --- | ||
rollout_length: 4 # Number of environment steps per vectorised environment. | ||
epochs: 128 # Number of sgd steps per rollout. | ||
warmup_steps: 16 # Number of steps to collect before training. | ||
total_buffer_size: 1_000_000 # Total effective size of the replay buffer across all devices and vectorised update steps. This means each device has a buffer of size buffer_size//num_devices which is further divided by the update_batch_size. This value must be divisible by num_devices*update_batch_size. | ||
total_batch_size: 512 # Total effective number of samples to train on. This means each device has a batch size of batch_size/num_devices which is further divided by the update_batch_size. This value must be divisible by num_devices*update_batch_size. | ||
priority_exponent: 0.5 # exponent for the prioritised experience replay | ||
importance_sampling_exponent: 0.4 # exponent for the importance sampling weights | ||
n_step: 5 # how many steps in the transition to use for the n-step return | ||
q_lr: 6.25e-5 # the learning rate of the Q network network optimizer | ||
tau: 0.005 # 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. | ||
training_epsilon: 0.0 # epsilon for the epsilon-greedy policy during training | ||
evaluation_epsilon: 0.0 # epsilon for the epsilon-greedy policy during evaluation | ||
max_abs_reward: 1000.0 # maximum absolute reward value | ||
num_atoms: 51 # number of atoms in the distributional Q network | ||
v_min: 0.0 # minimum value of the support | ||
v_max: 500.0 # maximum value of the support | ||
sigma_zero: 0.25 # initialization value for noisy variance terms |
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
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.