mixle.meta moduleΒΆ

Heuristic allocation of improvement effort against a held-out scorecard.

Given a System and a set of ImprovementOption actions, each with an estimated cost and estimated recoverable scorecard quality, this module spends the budget on the highest estimated gain-per-dollar option first. Only realized gain is trusted: evaluate() remeasures the scorecard before and after each option runs, and detect_regression() stops the allocation immediately when a round regresses.

This module provides a deterministic heuristic baseline. A learned meta-policy should replace it only after it demonstrates better realized scorecard gain per dollar under the same measurement protocol.

class ImprovementOption(name, cost, run, estimated_regret)[source]

Bases: object

Candidate improvement action with estimated cost and recoverable quality gain.

Parameters:
property regret_per_dollar: float

Estimated recoverable gain per unit cost.

class MetaImprovementReport(order=<factory>, skipped=<factory>, scorecard_before=None, scorecard_after=None, realized_gain_per_dollar=<factory>, spent=0.0, stopped_on_regression=None)[source]

Bases: object

Execution report for a budgeted meta-improvement run.

Parameters:
  • order (list[str])

  • skipped (list[str])

  • scorecard_before (SystemScorecard | None)

  • scorecard_after (SystemScorecard | None)

  • realized_gain_per_dollar (dict[str, float])

  • spent (float)

  • stopped_on_regression (RegressionReport | None)

improve_by_regret(system, question_set, options, *, budget)[source]

Run options by estimated gain per dollar and stop on measured regression.

Parameters:
Return type:

MetaImprovementReport