Skip to main content

net_reward

Function net_reward 

Source
pub fn net_reward(benefit: f64, migration_cost: f64) -> f64
Expand description

Net reward of running under a layout once the cost of getting there is charged against it: benefit − migration_cost.

Feeding this (rather than raw benefit) to a bandit is what makes switching layouts self-limiting — a challenger has to beat the incumbent by more than the repack it would cost, so a learner cannot thrash between layouts for a marginal gain. (The cost-into-reward form from contextual index-tuning bandits; the same idea as ski-rental “amortise the one-time cost”.)