panobbgo.strategies.rewarding.StrategyRewarding#
- class panobbgo.strategies.rewarding.StrategyRewarding(problem, credit=None, explore=None, **kwargs)[source]#
This strategy rewards given
heuristicsby selecting those more often, which produce better search points.Two credit-assignment modes (
credit=kwarg orconfig.rewarding_credit):"ema"(default)performanceis an exponential moving average of the reward per evaluation spent by that heuristic (reward1 - exp(-improvement)when the evaluation improves the best, else 0; smoothing1 - config.discount). Selection is probability matching over the heuristics that currently have points, with an exploration floor ofexplore(config.rewarding_explore, default 0.2) spread evenly."legacy"Every point drawn from a heuristic multiplies its
performancebyconfig.discount(0.95); a new best adds1 - exp(-improvement)to the emitter’s performance. Selection is proportional toperformance + 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 by0.95**90at 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"withexplore=0.2scores +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)StrategyBasecalls 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_KEYanalyzersavg_time_per_taskaverage walltime per finished task,
NaNbefore the first one.bestevaluatorsCompatibility property for legacy code that references evaluators.
heuristicsnametime_cpueffective cpu time in seconds
time_start_strtime_wallwall time in seconds