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
6 changes: 6 additions & 0 deletions config/drone.ini
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ max = 2e8
mean = 8e7
scale = auto

[sweep.train.clip_coef]
distribution = uniform
min = 0.01
max = 0.9
scale = auto

# hover
[sweep.env.hover_alpha_dist]
distribution = log_normal
Expand Down
9 changes: 5 additions & 4 deletions ocean/battle/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,9 @@ void compute_observations(Battle* env) {
obs[obs_idx++] = agent->y;
obs[obs_idx++] = agent->z;
obs[obs_idx++] = agent->y - ground_height(env, agent->x, agent->z);
obs[obs_idx++] = abs(agent->x) - 0.95f*env->size_x;
obs[obs_idx++] = abs(agent->z) - 0.95f*env->size_z;
obs[obs_idx++] = abs(agent->y) - 0.95f*env->size_y;
obs[obs_idx++] = fabsf(agent->x) - 0.95f*env->size_x;
obs[obs_idx++] = fabsf(agent->z) - 0.95f*env->size_z;
obs[obs_idx++] = fabsf(agent->y) - 0.95f*env->size_y;
obs[obs_idx++] = agent->speed;
obs[obs_idx++] = agent->health;
obs[obs_idx++] = agent->max_turn;
Expand Down Expand Up @@ -921,7 +921,8 @@ void puf_step(Battle* env) {
if (i < env->num_agents/2) {
env->agents[i].rewards[0] = reward;
env->agents[i].terminals[0] = 1;
env->log.score = env->log.episode_return;
env->log.score += agent->episode_return;
env->log.perf += (agent->episode_return > 0.0f) ? 1 : 0;
env->log.episode_length += agent->episode_length;
env->log.episode_return += agent->episode_return;
env->log.collision_rate += collision;
Expand Down
Loading