panobbgo.strategies.rewarding.StrategyRewarding#

class panobbgo.strategies.rewarding.StrategyRewarding(problem, credit=None, explore=None, **kwargs)[source]#

This strategy rewards given heuristics by selecting those more often, which produce better search points.

Two credit-assignment modes (credit= kwarg or config.rewarding_credit):

"ema" (default)

performance is an exponential moving average of the reward per evaluation spent by that heuristic (reward 1 - exp(-improvement) when the evaluation improves the best, else 0; smoothing 1 - config.discount). Selection is probability matching over the heuristics that currently have points, with an exploration floor of explore (config.rewarding_explore, default 0.2) spread evenly.

"legacy"

Every point drawn from a heuristic multiplies its performance by config.discount (0.95); a new best adds 1 - exp(-improvement) to the emitter’s performance. Selection is proportional to performance + config.smooth. This credits the emitter of the best point rather than improvement per evaluation spent, so a heuristic that emits a generation of 90 points is discounted by 0.95**90 at once while a one-shot heuristic keeps its weight for the whole run — the strategy degenerates to a biased round-robin (planning/DISCOVERY_2026-09-09.md §6).

Measured on the standard IOH battery (mean AOCC, 12-seed decision roster, paired per seed, same arm set): "ema" with explore=0.2 scores +0.0135 [+0.0032, +0.0238] over "legacy" (9/12 seeds), the gain sitting at 2-D (+0.0248 [+0.0049, +0.0447]) and flat at 5-D (+0.0022 [-0.0030, +0.0074]).

@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations)

__init__(problem, credit=None, explore=None, **kwargs)[source]#

@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations)

Methods

__init__(problem[, credit, explore])

@type problem: panobbgo.lib.Problem @param problem: @param parse_args: @param testing_mode: @param kwargs: Additional configuration parameters (e.g. max_eval, max_evaluations).

add(Heur, **kwargs)

add_analyzer(a)

Add an analyzer to the strategy.

add_heuristic(h)

Add a heuristic to the strategy.

analyzer(who)

check_dependencies()

This method is called in self.start() (and only there) for checking all the dependencies of all modules.

discount(heur[, discount, times])

Discount the given heuristic after emitting a point.

execute()

Overwrite this method when you extend this base strategy.

heuristic(who)

Look up a heuristic by its who tag.

info()

init_module(module)

StrategyBase calls this method.

on_converged(reason, stats)

Called when the Convergence analyzer detects convergence.

on_new_best(best)

reward(best)

Give this heuristic a reward (e.g. when it finds a new point).

start()

validate_setup()

Validate that the framework is properly set up before starting optimization.

Attributes

PROBLEM_KEY

analyzers

avg_time_per_task

average walltime per finished task, NaN before the first one.

best

evaluators

Compatibility property for legacy code that references evaluators.

heuristics

name

time_cpu

effective cpu time in seconds

time_start_str

time_wall

wall time in seconds