Skip to content

feat: enhance reward functions with optimum-aware options and add hyb…#10

Open
Grzmro wants to merge 3 commits into
DAS2from
reward
Open

feat: enhance reward functions with optimum-aware options and add hyb…#10
Grzmro wants to merge 3 commits into
DAS2from
reward

Conversation

@Grzmro

@Grzmro Grzmro commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@Grzmro Grzmro requested a review from wniec June 4, 2026 06:59
Comment thread das/env/reward.py

import numpy as np

_GAP_FLOOR = 1e-8 # BBOB precision target: gaps below this count as "solved".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice cap. It may interfer with AOCC computation. Double check that fitness isn't clipped there twice

Comment thread das/env/reward.py


def reward_binary(new_best_y, old_best_y, initial_range, is_final=False):
def reward_binary(new_best_y, old_best_y, initial_range, is_final=False, optimum=None):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be nice to have Unit tests for all those reward definitions

Comment thread das/env/reward.py

def reward_log_scaled(new_best_y, old_best_y, initial_range, is_final=False, optimum=None):
"""Log-scaled incremental improvement (original r1)."""
if old_best_y == float("inf"):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

logarithm of the first reward was added in order to avoid reward hacking. Generally in the case of the rewards that do not take global optimum into account, it's hard for the reward not to get hacked. I think It's also important to keep in mind, that inserting global minimum into reward is making meta-bbo task significantly easier. It would be nice to compare global-optimum-aware rewards to each other, but not necessarily to the ones that do not take GO into account.

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