Skip to content

Commit a1f84ab

Browse files
author
Tim-phant
committed
adjust scoring metrics
1 parent ff8e6c6 commit a1f84ab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pufferlib/ocean/boxoban/boxoban.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct {
6060
int difficulty_id; // 0=basic,1=easy,2=medium,3=hard,4=unfiltered
6161
Client* client;
6262
int win;
63-
float epiosde_return;
63+
float episode_return;
6464
} Boxoban;
6565

6666
void ensure_map_loaded(void);
@@ -126,8 +126,9 @@ void init (Boxoban* env) {
126126
void add_log(Boxoban* env) {
127127
float denom = (float)env->n_boxes;
128128
float num = (float)env->on_target;
129-
env->log.perf += (env->win== 1) ? 1.0 : num/denom;
130-
env->log.score += env->log.perf;
129+
float perf = (env->win== 1) ? 1.0 : num/denom;
130+
env->log.perf += perf;
131+
env->log.score += perf;
131132
env->log.episode_length += env->tick;
132133
env->log.episode_return += env->episode_return;
133134
env->log.on_targets += env->on_target;

0 commit comments

Comments
 (0)