Skip to content

Conversation

@riccardosavorgnan
Copy link
Collaborator

@riccardosavorgnan riccardosavorgnan commented Oct 30, 2025

Implemented the distance_weighted_score and total_goal_distance metric.

For each agent:
total_goal_distance = 2d_distance(initial_pos, goal_pos)
distance_weighted_score = total_goal_distance * score

The metrics collected are then averaged across agents as per current metric path. Example run: https://wandb.ai/emerge_/dc_pufferdrive/runs/5yyvzp3m?nw=nwuserrsavorgnanrs

The below image shows the "normalised distance of solved goals" (blue line), computed as:
distance_weighted_score / (score * total_goal_distance)

We're still investigating this metric, but an initial observation is that at convergence the solved goals have the same distance on average as the total population of goals, indicating that the unsolved goals might be "unsolved at random" with respect to the goal distance.

Screenshot 2025-10-30 at 11 43 31

total_goal_distance metric.

For each agent:
total_goal_distance = 2d_distance(initial_pos, goal_pos)
distance_weighted_score = total_goal_distance * score

The metrics shown in the dashboard are averages across
agents.
env->log.total_goal_distance += goal_distance;
if(e->reached_goal_this_episode && !e->collided_before_goal){
env->log.score += 1.0f;
float goal_distance = ego_goal_distance_t0(e);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, do you know where this function is defined? I can't find it in the repo

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 311 of drive.h

if(e->reached_goal_this_episode && !e->collided_before_goal){
env->log.score += 1.0f;
float goal_distance = ego_goal_distance_t0(e);
env->log.distance_weighted_score += 1.0f * goal_distance;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be curious to see the distribution of distances to the goal, do you mind adding that? (can be done with wandb.Histogram)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants