Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/double_pendulum.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ num_layers = 2

[train]
gpus = 1
total_timesteps = 50000000
total_timesteps = 200000000
learning_rate = 0.005
anneal_lr = 1
min_lr_ratio = 0
Expand Down
5 changes: 1 addition & 4 deletions ocean/double_pendulum/double_pendulum.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ struct Env {
int max_upright_steps;
int upright_count;
float best_height;
int got_upright;
int physics_failed;

float cart_mass;
Expand Down Expand Up @@ -178,7 +177,6 @@ void puf_reset(DoublePendulum* env) {
env->max_upright_steps = 0;
env->upright_count = 0;
env->best_height = 0.0f;
env->got_upright = 0;
env->physics_failed = 0;
compute_observations(env);
}
Expand Down Expand Up @@ -305,9 +303,8 @@ float height_record_reward(DoublePendulum* env) {
if (height > env->best_height && height > 0.9f) {
reward += 0.05f * (height - 0.9f) / 0.1f;
}
if (stable && !env->got_upright) {
if (stable) {
reward += 0.1f;
env->got_upright = 1;
}
env->best_height = fmaxf(env->best_height, height);
return reward;
Expand Down