mixle.meta module¶
Compatibility shim: mixle.meta moved to mixle.system.meta.
The heuristic improvement-budget allocator (ImprovementOption, improve_by_regret) is now part
of one cohesive package, mixle.system, instead of six cross-importing top-level modules.
Existing from mixle.meta import X imports keep working (with a DeprecationWarning); new
code should import from mixle.system (or mixle.system.meta) directly.
- class ImprovementOption(name, cost, run, estimated_regret)[source]
Bases:
objectCandidate improvement action with estimated cost and recoverable quality gain.
costmust be finite and nonnegative andestimated_regretfinite. Neither was checked, so underbudget=0an option costing-5ran and reportedspent=-5(running work created budget), and a NaN-cost option ran too, because the over-budget comparisonspent + cost > budgetis false for NaN – the ceiling failed open – and leftspent=NaNbehind.- 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:
objectExecution report for a budgeted meta-improvement run.
- improve_by_regret(system, question_set, options, *, budget)[source]
Run options by estimated gain per dollar and stop on measured regression.
budgetmust be finite and nonnegative, and option names must be unique –order,skippedandrealized_gain_per_dollarare all keyed by name, so duplicates silently overwrite each other’s measured result.Note what this does NOT do:
opt.run()mutates the livesystembefore any measurement, and a regression detected afterwards only stops further options – the regressing change stays applied. Callers who need rejection to restore the previous state must run options against a system they can themselves discard.report.stopped_on_regressionnames the round that regressed so that decision can be made.